Hi,
I have written a simple program that logs on to a
server and calls a few methods then logs off. The server implements its own
unique methods as an access control mechanism. This program works fine. When I
attempt to do the same thing in a multithreaded program I am able to login
successfully, but receive the following exception when I try to call a method to
get the data I am after. The exception is:
** (process:32344): WARNING **: exception raised by
ccRecharge method 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'
I can't figure out what is wrong. The only thing I
can think of that is different between the two programs is how I call
CORBA_ORB_init. In the multithreaded version, main() starts up a thread and it
is this thread that initialises the orb. This thread then passes the orb in a
structure to another thread that calls all the server's methods. Is it a problem
if CORBA_ORB_init is not called by main() and not passed the same argc and argv
variables that are passed to main() upon process startup? Or should I set up the
orb as a global variable?
If you can't guess, I am new to Orbit and CORBA.
What is the purpose of passing argc and argv across to CORBA_ORB_init and what
options can be set this way? I am currently using
CORBA_exception_init(adaptor->ev);
adaptor->orb = CORBA_ORB_init(&argc, argv,
"orbit-local-mt-orb", adaptor->ev);
In case it helps, I am using RedHat 9.0 and
Orbit2-2.6.0-2
Thanks,
Jeff
|