// enable
cm.enableInternal();
//activate immediately
cm.activateInternal( getTrackingCount().get() );
ComponentInstance instance;
if ( getComponentMetadata().isPersistentFactoryComponent() )
{
instance = new ModifyComponentInstance<S>(cm);
}
else
{
instance = cm.getComponentInstance();
if ( instance == null || instance.getInstance() == null )
{
// activation failed, clean up component manager
cm.dispose( ComponentConstants.DEACTIVATION_REASON_DISPOSED );
throw new ComponentException( "Failed activating component" );
}