{
String name = descriptor.getName();
String componentName = name + COMPONENT_SUFFIX;
try
{
Component component = new Component(
descriptor.getComponentClass(),
name,
descriptor.getScope(),
descriptor.isStartup(),
descriptor.getJndiName()
);
context.set(componentName, component);
if ( redeployStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
{
Init.instance().addHotDeployableComponent( component.getName() );
}
}
catch (Throwable e)
{
throw new RuntimeException("Could not create Component: " + name, e);