Re: a question about how to use a common connection in Orbacus
[email protected] Thu, 19 Oct 2006 17:14:44 +0200
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Message-ID | <OF9F7FC2BF.EF985857-ONC125720C.00539DCA-C125720C.0053BF58@fr.world.socgen> |
I noticed exactly the same thing myself. Your advice is right on the money
regards
Graham
|------------------------------
| stanley.lewis@ion
| a.com
| Sent by:
| ob-users-bounces@
| orbacus.com
|
|
| 10/19/2006 04:55
| PM
|
|
| Please respond to
| stanley.lewis@ion
| a.com
|
|
To
[email protected],
[email protected]
cc
Subject
Re: [OB-Users] a question about how
to use a common connection in
Orbacus
Hi Zhai,
On Tuesday 17 October 2006 10:02, Zhai wrote:
> Hi,
> Now we have a question about how to use a common
> connection in Orbacus.
> In detail, there are a client and a server program.
> First the client initializes an Orb and create a
> common connection to the server, then tens of threads
> are created in the client and all of them use the only
> one connection to communicate to the server to get
> service by invoking its various methods. The question
> is that: int the above condition, would these threads
> use the connection securely and do not interfere with
> each other? if not, how to implement the above
> requirement.
Yes, your applications threads can share the same connection safely for the
most part, however I'd be wary of using _OB_CloseConnection() in this case,
as you can run into situations where one thread can close the connection
while another thread is trying to send an invocation.
One thing to note is that you can also get these threads to use their own
connection if you set the OB::CONNECTION_REUSE_POLICY_ID to false, then
each
thread will open it's own connection to the server.
Regards,
Stan
--
Stan Lewis
Team Orbacus - Your CORBA Source
E-Mail: [email protected]
WWW: http://www.orbacus.com
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html
*************************************************************************
This message and any attachments (the "message") are confidential and intended solely for the addressee(s).
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses
destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.
*************************************************************************
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html