[omniORB] How to get rid of the POA?

Andreas Bille Andreas.Bille at sun.com
Mon Sep 15 14:59:46 BST 2003


Hello all,
spinning around a little bit, I found no solution to the
(beginners?) problem to peform several run/destroy-cylces with omniORB,
if during such a cycle the POA is resolved.
That is, the second call

'Poa = self.Orb.resolve_initial_references(PoaName)'

in the attached 'test.py'
gives :

<prog>
omniORB: Error: Unable to create an endpoint of this description: 
giop:tcp:localhost:54321
Traceback (most recent call last):
  File "./test.py", line 47, in ?
    sh.shutdown()
  File "./test.py", line 35, in shutdown
    Poa = self.Orb.resolve_initial_references(PoaName)
  File "/usr/lib/python2.3/site-packages/CORBA.py", line 480, in 
resolve_initial_references

omniORB.CORBA.INITIALIZE: Minor: INITIALIZE_TransportError, COMPLETED_NO.
</prog>

I used omniORB-4.0.2/omniORBpy-2.2 over Python-2.3.
Does anybody know a way out?

Greetings,
Andreas Bille


-------------- next part --------------
#!/usr/bin/env python

import time
import threading
import CORBA, PortableServer



#globals
Port = '54321'
PoaName = 'RootPOA'


class Shutdown(threading.Thread):
	def __init__(self,msg):
		threading.Thread.__init__(self)
		self.msg = msg
		self.start()
		return
	
	def run(self):
		print self.msg,'will be destroyed in 5 seconds'
		try:
			argv = ['-ORBendPoint','giop:tcp:localhost:' + Port]
			self.Orb = CORBA.ORB_init(argv,CORBA.ORB_ID)
			self.Orb.run()
			self.Orb.destroy()
			print self.msg + ' destroyed'
		except Exception,e:
			print e
		return
	
	def shutdown(self):
		time.sleep(5)		
		Poa = self.Orb.resolve_initial_references(PoaName)
		self.Orb.shutdown(True)
		self.join()
		return
	pass


if __name__ == '__main__':
	sh = Shutdown('first run')
	sh.shutdown()
	
	sh = Shutdown('second run')
	sh.shutdown()
	


More information about the omniORB-list mailing list