[omniORB-dev] Bidirectional omniORBpy
Luke Tunmer
luke.tunmer at trigenix.com
Fri Feb 13 17:39:02 GMT 2004
I'm having problems getting bidirectional support to work on a Python
client talking to a Python server. We need this to work through
Firewalls and VPN.
I'm following the instructions in the omniORBpy User's Guide. The
connection was proving to be very unreliable - about one in 5 (or less)
completed successfully, while the rest threw the following exception:
COMM_FAILURE: Minor: COMM_FAILURE_WaitingForReply, COMPLETED_MAYBE.
omniORB: From endpoint: giop:tcp:127.0.0.1:6437. Detected GIOP 1.2
protocol error in input message. Connection is closed.
This is what the client side does:
new_args = sys.argv[:]
new_args.append("-ORBofferBiDirectionalGIOP")
new_args.append("1")
new_args.append("-ORBclientTransportRule")
new_args.append("* unix,tcp,ssl,bidir")
orb = CORBA.ORB_init(new_args, CORBA.ORB_ID)
rootPOA = orb.resolve_initial_references("RootPOA")
poaManager = rootPOA._get_the_POAManager()
poaManager.activate()
policies = [ BiDirPolicy.BidirectionalPolicy(BiDirPolicy.BOTH) ]
poa = rootPOA.create_POA("BiDirPOA", poaManager, policies)
bidir_poaManager = poa._get_the_POAManager()
bidir_poaManager.activate()
And the server side does this:
args.append("-ORBacceptBiDirectionalGIOP")
args.append("1")
args.append("-ORBserverTransportRule")
args.append("* tcp,unix,ssl,bidir")
# Initialise the ORB
orb = CORBA.ORB_init(args, CORBA.ORB_ID)
# Find the root POA
poa = orb.resolve_initial_references("RootPOA")
poa_man = poa._get_the_POAManager()
poa_man.activate()
poa_ins = orb.resolve_initial_references("omniINSPOA")
pman_ins = poa_ins._get_the_POAManager()
pman_ins.activate()
policies = [ BiDirPolicy.BidirectionalPolicy(BiDirPolicy.BOTH) ]
bidir_poa = poa.create_POA("BidDirPOA", poa_man, policies)
bidir_poaManager = bidir_poa._get_the_POAManager()
bidir_poaManager.activate()
server_i = Trigcompiler_i(options.debug_level)
server_ref = bidir_poa.activate_object(server_i)
root_i = RootFinder_i(server_ref)
poa_ins.activate_object_with_id("TrigcompilerRoot", root_i)
The client attempts to connect to the server using a corbaloc object
reference.
The server side is publishing a simple object reference on the
omniINSPOA (which does not have the bidirectional policy set on it), and
the client fails to talk to it - it hasn't even got to the point of
trying to get to the object activated on the bidirectional POA.
We are using OmniPy 2.3, OmniOrb 4.0.3, Windows XP.
Any help, or pointers to what I can try next would be much appreciated.
Regards
Luke
More information about the omniORB-dev
mailing list