[Ace-users] [tao-users] How to control thread usage in combined client/server application

Johnny Willemsen jwillemsen at remedy.nl
Thu Nov 29 03:51:11 CST 2007


Hi,

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/

Regards,

Johnny Willemsen
Remedy IT
Postbus 101
2650 AC  Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl  

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl ***
*** 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:
>    config-linux.h
> 
>    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 
> $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>    (used by MPC when you generate your own makefiles):
>    cat > 
> $ACE_ROOT/bin/MakeProjectCreator/config/default.features <<EOF
>    ssl=1
>    qos=0
>    cidl=0
>    rwho=0
>    sctp=0
>    EOF
> 
>    AREA/CLASS/EXAMPLE AFFECTED:
>    Custom application
> 
>    DOES THE PROBLEM AFFECT:
>        COMPILATION?
>        No
>        LINKING?
>        No
>        EXECUTION?
>        OTHER (please specify)?
>        Application logic with client/server combined
> 
>    SYNOPSIS:
> Remote method runs in not desired thread.
> 
>    DESCRIPTION:
> I have two client/server combined application.
> First, mostly client, application have designated thread with 
> registered 
> POA and object and loops on orb->run.
> When starts, first application calls remote method in second 
> application 
> and pass object reference for callbacks.
> First application interacts with user and simultaneously calls second 
> application.
> 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.
> 
> -Andrew
> 
> 



More information about the Ace-users mailing list