[omniORB] Using sockets for local servants...

evgeni.rojkov at durr.com evgeni.rojkov at durr.com
Fri Feb 1 10:37:38 GMT 2008


>> ... could be to have 2 ORB in the same process ...
As I have heard ones omniORB is singleton.
- calling ORB_init() several time initialise only ones.
- orb->shutdown() will shutdown all servants you have (it is really the case,
tested myself :-).
Please correct me if I am wrong.
Regards, Evgeni


-----Ursprüngliche Nachricht-----
Von: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] Im Auftrag von Álvaro Vega
García
Gesendet: Freitag, 1. Februar 2008 08:53
An: Duncan Grisby
Cc: Jiva DeVoe; omniorb-list at omniorb-support.com
Betreff: Re: [omniORB] Using sockets for local servants...


Hi,

On Thu, 2008-01-31 at 09:49 +0000, Duncan Grisby wrote:
> On Wednesday 30 January, "Jiva DeVoe" wrote:
> 
> > I have an application which has two servants in the same process.  I 
> > think (correct me if I'm wrong) that if I try to connect to a 
> > servant within my own process that omniORB tries to be smart and 
> > uses shared memory for it's communication.  Is this true?  I want my 
> > application to ALWAYS use sockets when communicating to my servant - 
> > event if the client and servant are in the same process.  Is it 
> > possible to configure this?
> 
> omniORB will indeed always use a local case optimisation for calls in 
> the same process. There's no "shared memory" involved in the sense of 
> System V shared memory or something like that -- it's just a call 
> within a process. You can't stop omniORB from doing that.
> 
I don't know if the following is possible with omniORB, I suppose that yes, but
another way to obtain a communication across TCP/IP network could be to have 2
ORB in the same process. In first ORB you can register servant1 and publish IOR1
(ie. in a file after an orb1->object_to_string()). In the second ORB you can
register servant2 and publish IOR2. Then servant1 must obtain IOR2 using
orb1->string_to_object() and servant2 must obtain IOR1 using
orb2->string_to_object().

Then, when servant1 invokes an operation over servant2 using his reference, the
CORBA communication will happen across TCP/IP network, because ORB1 has a remote
reference to servant2 (which had not been published by him).

I hope it could be useful for you.

Álvaro   

> Why do you want all calls to go through sockets?
> 
> Duncan.
> 



_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list



More information about the omniORB-list mailing list