[omniORB] add register_initial_reference() to omniORBpy
Wei Jiang
sdjiangwei at gmail.com
Mon Mar 2 16:32:47 GMT 2009
Test Result:
[jw at lt ~]$ python
Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from omniORB import CORBA
>>> orb=CORBA.ORB_init()
>>> orb.register_initial_reference('MyPOA',orb.resolve_initial_references('RootPOA'))
>>> orb.list_initial_services()
['MyPOA', 'RootPOA', 'POACurrent']
>>> dir(orb.resolve_initial_references('MyPOA'))
['AdapterAlreadyExists', 'AdapterInactive', 'AdapterNonExistent',
'InvalidPolicy', 'NoServant', 'ObjectAlreadyActive',
'ObjectNotActive', 'ServantAlreadyActive', 'ServantNotActive',
'WrongAdapter', 'WrongPolicy', '_NP_RepositoryId', '_POA__release',
'__del__', '__doc__', '__getstate__', '__init__', '__methods__',
'__module__', '__omni_obj', '__omni_poa', '__setstate__',
'_d_AdapterAlreadyExists', '_d_AdapterInactive',
'_d_AdapterNonExistent', '_d_InvalidPolicy', '_d_NoServant',
'_d_ObjectAlreadyActive', '_d_ObjectNotActive',
'_d_ServantAlreadyActive', '_d_ServantNotActive', '_d_WrongAdapter',
'_d_WrongPolicy', '_duplicate', '_get_interface',
'_get_the_POAManager', '_get_the_activator', '_get_the_children',
'_get_the_name', '_get_the_parent', '_hash', '_is_a',
'_is_equivalent', '_narrow', '_nil', '_non_existent', '_release',
'_set_the_activator', '_tc_AdapterAlreadyExists',
'_tc_AdapterInactive', '_tc_AdapterNonExistent', '_tc_InvalidPolicy',
'_tc_NoServant', '_tc_ObjectAlreadyActive', '_tc_ObjectNotActive',
'_tc_ServantAlreadyActive', '_tc_ServantNotActive',
'_tc_WrongAdapter', '_tc_WrongPolicy', '_unchecked_narrow',
'activate_object', 'activate_object_with_id', 'create_POA',
'create_id_assignment_policy', 'create_id_uniqueness_policy',
'create_implicit_activation_policy', 'create_lifespan_policy',
'create_reference', 'create_reference_with_id',
'create_request_processing_policy', 'create_servant_retention_policy',
'create_thread_policy', 'deactivate_object', 'destroy', 'find_POA',
'get_servant', 'get_servant_manager', 'id_to_reference',
'id_to_servant', 'reference_to_id', 'reference_to_servant',
'servant_to_id', 'servant_to_reference', 'set_servant',
'set_servant_manager']
>>> orb.register_initial_reference('',None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 563,
in register_initial_reference
return _omnipy.orb_func.register_initial_reference(self, identifier, obj)
omniORB.CORBA.InvalidName: omniORB.CORBA.InvalidName()
>>> orb.register_initial_reference('nilobj',None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 563,
in register_initial_reference
return _omnipy.orb_func.register_initial_reference(self, identifier, obj)
omniORB.CORBA.BAD_PARAM:
CORBA.BAD_PARAM(omniORB.BAD_PARAM_RegisterNilObject,
CORBA.COMPLETED_NO)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orb.patch
Type: application/octet-stream
Size: 3173 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090302/0ab07e77/orb.obj
More information about the omniORB-list
mailing list