MESSAGE( "Manager_i::destroy " << _ListOfEnginesComponents.size() << " components" ) ;
for ( i = 0 ; i < _ListOfEnginesComponents.size() ; i++ ) {
try {
- _NamingService->Destroy_Name( _ListOfComponentsNames[ i ].c_str() ) ;
+// _NamingService->Destroy_Name( _ListOfComponentsNames[ i ].c_str() ) ;
_ListOfEnginesComponents[ i ]->destroy() ;
MESSAGE( "Manager_i::destroy Component " << _ListOfComponentsNames[ i ] ) ;
}
MESSAGE( "Manager_i::destroy " << _ListOfEnginesContainers.size() << " containers" ) ;
for ( i = 0 ; i < _ListOfEnginesContainers.size() ; i++ ) {
try {
- _NamingService->Destroy_Name( _ListOfContainersNames[ i ].c_str() ) ;
+// _NamingService->Destroy_Name( _ListOfContainersNames[ i ].c_str() ) ;
_ListOfEnginesContainers[ i ]->destroy() ;
MESSAGE( "Manager_i::destroy Container " << _ListOfContainersNames[ i ] ) ;
}
CORBA::release(_Poa) ;
delete(_Id) ;
this->_remove_ref();
- _NamingService->Destroy_Name( "/Kernel/ContainersManager" ) ;
+// _NamingService->Destroy_Name( "/Kernel/ContainersManager" ) ;
}
Manager_i::~Manager_i() {
MESSAGE( "Manager_i::~Manager_i" ) ;
+ exit( 0 ) ;
}
Containers::MachineParameters * Manager_i::Parameters() {
}
}
if ( !CORBA::is_nil( _ContainerObject ) ) {
- _EnginesContainer = Engines::Container::_narrow( _ContainerObject ) ;
- if ( _EnginesContainer->type() == MyParams.ContainerType ) {
- int size = _ListOfContainers->length() ;
- _ListOfContainers->length( size + 1 ) ;
- _ListOfContainers[ size ] = Engines::Container::_duplicate( _EnginesContainer ) ;
- MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
- << _EnginesContainer->name() << " " << _EnginesContainer->type() ) ;
+ try {
+ _EnginesContainer = Engines::Container::_narrow( _ContainerObject ) ;
+ if ( MyParams.ContainerType == Engines::Undefined ||
+ _EnginesContainer->type() == MyParams.ContainerType ) {
+ int size = _ListOfContainers->length() ;
+ _ListOfContainers->length( size + 1 ) ;
+ _ListOfContainers[ size ] = Engines::Container::_duplicate( _EnginesContainer ) ;
+ MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
+ << _EnginesContainer->name() << " " << _EnginesContainer->type() ) ;
+ }
+ else {
+ MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
+ << _EnginesContainer->name() << " " << _EnginesContainer->type() << " # "
+ << MyParams.ContainerType ) ;
+ }
+ }
+ catch ( ... ) {
+ MESSAGE( "Manager_i::FindContainers " << _FullContainerName << " catched NOT responding " ) ;
}
- else {
- MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
- << _EnginesContainer->name() << " " << _EnginesContainer->type() << " # "
- << MyParams.ContainerType ) ;
- }
}
else {
MESSAGE( "Manager_i::FindContainers " << _FullContainerName << " unknown" ) ;
MESSAGE( "Manager_i::FindContainers " << j << " " << _FullContainerName ) ;
_ContainerObject = _NamingService->Resolve( _FullContainerName.c_str() ) ;
if ( !CORBA::is_nil( _ContainerObject ) ) {
- _EnginesContainer = Engines::Container::_narrow( _ContainerObject ) ;
- if ( MyParams.ContainerType == Engines::Undefined ||
- _EnginesContainer->type() == MyParams.ContainerType ) {
- int size = _ListOfContainers->length() ;
- _ListOfContainers->length( size + 1 ) ;
- _ListOfContainers[ size ] = Engines::Container::_duplicate( _EnginesContainer );
- MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
- << _EnginesContainer->name() << " " << _EnginesContainer->type() ) ;
- }
- else {
- MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
- << _EnginesContainer->name() << " " << _EnginesContainer->type() << " # "
- << MyParams.ContainerType ) ;
- _EnginesContainer = Engines::Container::_nil() ;
- }
+ try {
+ _EnginesContainer = Engines::Container::_narrow( _ContainerObject ) ;
+ if ( MyParams.ContainerType == Engines::Undefined ||
+ _EnginesContainer->type() == MyParams.ContainerType ) {
+ int size = _ListOfContainers->length() ;
+ _ListOfContainers->length( size + 1 ) ;
+ _ListOfContainers[ size ] = Engines::Container::_duplicate( _EnginesContainer );
+ MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
+ << _EnginesContainer->name() << " " << _EnginesContainer->type() ) ;
+ }
+ else {
+ MESSAGE( "Manager_i::FindContainers --> " << _EnginesContainer->machineName() << " "
+ << _EnginesContainer->name() << " " << _EnginesContainer->type() << " # "
+ << MyParams.ContainerType ) ;
+ _EnginesContainer = Engines::Container::_nil() ;
+ }
+ }
+ catch( ... ) {
+ MESSAGE( "Manager_i::FindContainers " << _FullContainerName << " catched NOT responding" ) ;
+ }
}
else {
MESSAGE( "Manager_i::FindContainers " << _FullContainerName << " unknown" ) ;
if ( !CORBA::is_nil( _ComponentObject ) ) {
MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesContainer->machineName() << " "
<< _EnginesContainer->name() ) ;
- _EnginesComponent = Engines::Component::_duplicate( Engines::Component::_narrow( _ComponentObject ) ) ;
- int size = _ListOfComponents->length() ;
- _ListOfComponents->length( size + 1 ) ;
- _ListOfComponents[ size ] = Engines::Component::_duplicate( _EnginesComponent ) ;
- MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesComponent->instanceName()
- << " " << _EnginesComponent->interfaceName() ) ;
+ try {
+ _EnginesComponent = Engines::Component::_duplicate( Engines::Component::_narrow( _ComponentObject ) ) ;
+ int size = _ListOfComponents->length() ;
+ _ListOfComponents->length( size + 1 ) ;
+ _ListOfComponents[ size ] = Engines::Component::_duplicate( _EnginesComponent ) ;
+ MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesComponent->instanceName()
+ << " " << _EnginesComponent->interfaceName() ) ;
+ }
+ catch ( ... ) {
+ MESSAGE( "Manager_i::FindOrStartContainerLocked catched NOT responding" ) ;
+ }
}
}
}
if ( !CORBA::is_nil( _ComponentObject ) ) {
MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesContainer->machineName() << " "
<< _EnginesContainer->name() << " Component " << _FullComponentName ) ;
- _EnginesComponent = Engines::Component::_duplicate( Engines::Component::_narrow( _ComponentObject ) ) ;
- MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesComponent->instanceName() << " "
- << _EnginesComponent->interfaceName() ) ;
+ try {
+ _EnginesComponent = Engines::Component::_duplicate( Engines::Component::_narrow( _ComponentObject ) ) ;
+ MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << _EnginesComponent->instanceName() << " "
+ << _EnginesComponent->interfaceName() ) ;
+ }
+ catch ( ... ) {
+ MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << myParams.HostName << " "
+ << myParams.ContainerName << " " << _ComponentName << " catched NOT responding" ) ;
+ }
}
else {
MESSAGE( "Manager_i::FindOrStartContainerLocked --> " << myParams.HostName << " "
FactoryServerAddComponent = MyContainersMgr.FindOrLoad_Component( DefaultParams , "AddComponent" )
print FactoryServerAddComponent.GetContainerRef()._get_name(),FactoryServerAddComponent._get_instanceName(),FactoryServerAddComponent._get_interfaceName()
+DefaultParams.ContainerType = Engines.Python
+DefaultParams.ContainerName = ''
+Containers = MyContainersMgr.FindContainers( DefaultParams )
+i = 0
+while i < len( Containers ) :
+ print "Container running on",Containers[ i ]._get_machineName(),"with name",Containers[ i ]._get_name(),"and type",Containers[ i ].type()
+ i = i + 1
+
DefaultParams.ContainerType = Engines.Undefined
DefaultParams.ContainerName = ''
ContainerParameters( DefaultParams )
-FactoryServeSubComponent = MyContainersMgr.FindOrLoad_Component( DefaultParams , "SubComponent" )
+FactoryServerSubComponent = MyContainersMgr.FindOrLoad_Component( DefaultParams , "SubComponent" )
ListOfComponents = MyContainersMgr.FindComponents( DefaultParams , '' )
i = 0
while i < len( ListOfComponents ) :
print ListOfComponents[ i ].GetContainerRef()._get_name(),ListOfComponents[ i ]._get_instanceName(),ListOfComponents[ i ]._get_interfaceName()
i = i + 1
+DefaultParams.ContainerName = 'ServerPy'
+ServerPy = MyContainersMgr.FindContainer( DefaultParams )
+print "Container running on",ServerPy._get_machineName(),"with name",ServerPy._get_name(),"and type",ServerPy.type()
+
DefaultParams.ContainerName = 'SuperVisionContainer'
SuperVisionContainerAddComponent = MyContainersMgr.FindOrLoad_Component( DefaultParams , "AddComponent" )
DefaultParams.ContainerName = ''