[Ace-users] [tao-users] How to control thread usage in combined client/server application
jwillemsen at remedy.nl
Thu Nov 29 03:51:11 CST 2007
Thanks for using the PRF form. The behaviour you see is the way TAO works by
default, any thread making corba calls can be reused to handle incoming
invocations. With the -ORBClientConnectionHandler RW you should be able to
disable the thread reuse/
2650 AC Berkel en Rodenrijs
www.theaceorb.nl / www.remedy.nl
*** Integrated compile and test statistics see
*** Commercial service and support for ACE/TAO/CIAO ***
*** See http://www.theaceorb.nl/en/support.html ***
> TAO VERSION: 1.6.1
> ACE VERSION: 5.6.1
> HOST MACHINE and OPERATING SYSTEM:
> AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
> Fedora Core 6 x86_64
> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)
> THE $ACE_ROOT/ace/config.h FILE:
> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
> ssl = 1
> no_hidden_visibility = 1
> include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
> buildbits = 64
> CONTENTS OF
> (used by MPC when you generate your own makefiles):
> cat >
> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
> AREA/CLASS/EXAMPLE AFFECTED:
> Custom application
> DOES THE PROBLEM AFFECT:
> OTHER (please specify)?
> Application logic with client/server combined
> Remote method runs in not desired thread.
> I have two client/server combined application.
> First, mostly client, application have designated thread with
> POA and object and loops on orb->run.
> When starts, first application calls remote method in second
> and pass object reference for callbacks.
> First application interacts with user and simultaneously calls second
> Second, mostly server, application answers to these calls.
> Second application have dedicated thread in wich on some conditions
> calls method on passed callback object.
> Mostly all works fine. BUT!!! I've noticed that sometimes callback
> method runs in wrong, not designated thread!
> It runs in main thread when normal remote call waits for response.
> And even more, sometimes normal calls to second application runs in
> dedicated thread when it waits response for running callback method
> remote call.
> This callbacks is not nested upcalls. But seems to be treated like it.
> Biggest problem arise when applications use TSS (Thread specific
> storage) and we can't make sure that all calls will be in
> desired threads!
> I've tried several SvcConf options ST,RW:
> static Client_Strategy_Factory "-ORBClientConnectionHandler ST"
> Unfortunately without any luck.
> The question is: how I can control thread usage?
> REPEAT BY:
> I've written very simple client/server combined applications and can
> provide it if needed.
> SAMPLE FIX/WORKAROUND:
> [If available ]
> Sorry for my bad english.
More information about the Ace-users