[omniORB] [Q] initializing naming service in a different thread
V S P
toreason at fastmail.fm
Sat Apr 18 14:55:21 BST 2009
Hi,
a quick question
I first coded the app such that in 'main' it gets
the naming context
and then I spawn 'worker threads' and then when a thread
processes my requests, it uses the pointer to the naming context
(initialized in main) and try to obtain a reference to
the desired corba server. I am not using any 'locks' I just insure
that the worker threads start after the naming server context is
available.
That appears to throw 'BAD_INV_ORDER' (bad invocation order)
exception. It does not do it when I have everything in one thread
am I correct to assume that getting the naming context has to be in the
same thread as resolving the desired server's context?
(I was trying to save some time by not contacting naming service every
time I need I process the request, but perhaps the proper thing to do is
to
save the 'resolved server context' once per thread and store it in
thread local data)
thank you
--
V S P
toreason at fastmail.fm
--
http://www.fastmail.fm - Send your email first class
More information about the omniORB-list
mailing list