TEST_F(Initialization, Component) { Session_Container_i a_container(orb, root_poa.in()); Components::CCMObject_var component = create_sender(a_container, home); component->configuration_complete(); a_container.activate_component(component); //component->_request("hertz"); ASSERT_FALSE( CORBA::is_nil(component)); }
void AssemblyImpl::configurationComplete() throw(Components::CreateFailure) { DEBUG_OUT2( "AssemblyImpl: start the application for ", package_ ); // // call configuration complete according to startorder // std::vector < std::string > ::iterator iter; for(iter = data_.start_order_.begin(); iter != data_.start_order_.end(); iter++) { std::string id = (*iter); Components::CCMObject_var comp = instanceMap_[id]; if( comp ) { try { DEBUG_OUT2( "..... configuration_complete for ", id ); comp->configuration_complete(); } catch (CORBA::Exception& ex) { NORMAL_ERR2( "AssemblyImpl: EXCEPTION during configuration_complete: ", ex ); throw Components::CreateFailure(); } catch ( ... ) { NORMAL_ERR( "AssemblyImpl: UNKNOWN EXCEPTION during configuration_complete" ); throw Components::CreateFailure(); } } } // // call configuration complete for all remaining components // Components::CCMObject_var comp; std::map < std::string, Components::CCMObject_var > ::iterator instanceIter; bool found = false; for(instanceIter = instanceMap_.begin(); instanceIter != instanceMap_.end(); instanceIter++ ) { // // if not yet started, start it // for(iter = data_.start_order_.begin(); iter != data_.start_order_.end(); iter++ ) { if( instanceIter->first == *iter ) { found = true; break; } } if( !found ) { try { DEBUG_OUT2( "..... configuration_complete for ", instanceIter->first ); instanceIter->second->configuration_complete(); } catch ( CORBA::Exception& ex ) { NORMAL_ERR2( "AssemblyImpl EXCEPTION during configuration_complete : ", ex ); throw Components::CreateFailure(); } catch ( ... ) { NORMAL_ERR( "AssemblyImpl: UNKNOWN EXCEPTION during configuration_complete" ); throw Components::CreateFailure(); } } } // set assembly state to active state_ = Components::Deployment::INSERVICE; }