[omniORB] omniORB-list Digest, Vol 141, Issue 3
Ramón Talavera
ramon.talavera at gmail.com
Mon Jan 19 08:03:05 GMT 2015
string_to_object(NameServiceURI) works nicely as told by Evgeni Rojkov.
Documentation usually uses resolve_initial_references with a plain
"NameService" value, using URIs adds a little bit of complexity to the
resolution code snippet but forces to eliminate the hard-coded constant
value "NameService" which improves quality.
Martin, Johnny, Evgeni, Duncan;
Thank you very much indeed for your quick answers.
Regards,
Ramon Talavera
On Fri, Jan 16, 2015 at 2:09 PM, <omniorb-list-request at omniorb-support.com>
wrote:
> Send omniORB-list mailing list submissions to
> omniorb-list at omniorb-support.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> or, via email, send a message with subject or body 'help' to
> omniorb-list-request at omniorb-support.com
>
> You can reach the person managing the list at
> omniorb-list-owner at omniorb-support.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of omniORB-list digest..."
>
>
> Today's Topics:
>
> 1. Basic simple question. Can two or more references to
> different ORBS coexist? (Ram?n Talavera)
> 2. Re: Basic simple question. Can two or more references to
> different ORBS coexist? (Martin Ba)
> 3. Re: Basic simple question. Can two or more references to
> different ORBS coexist? (Johnny Willemsen)
> 4. Re: Basic simple question. Can two or more references to
> different ORBS coexist? (evgeni.rojkov at durr.com)
> 5. Re: Basic simple question. Can two or more references to
> different ORBS coexist? (Duncan Grisby)
> 6. Re: Changing where the ORB host and port. (Duncan Grisby)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 16 Jan 2015 13:01:16 +0100
> From: Ram?n Talavera <ramon.talavera at gmail.com>
> To: omniorb-list at omniorb-support.com
> Subject: [omniORB] Basic simple question. Can two or more references
> to different ORBS coexist?
> Message-ID:
> <CANhGRHqQtiYpYDhSNSorpMx6HJ7K3h=
> P+EKgswuibShsK5LR0g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I am testing and somehow feeling shy for asking such a simple question:
>
> Can two or more references to different ORBS coexist?
>
> In more detail:
>
> Can there be two or more CORBA::ORB_var configured with different calls
> to CORBA::ORB_init(argc, argv) passing different arguments in each call?
>
> My tests are obtaining the same address for all orb pointers and the
> arguments to the successive calls to ORB_init seem to be ignored.
>
> Is this normal behaviour? I am trying to make the code for a program which
> uses servants registered under two different orbs and the result I am
> getting is that the second servant is registered onto the NameService of
> the first orb, no matter if told to register on orb2.
>
> Thanks in advance,
> Ramon Talavera
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20150116/2b4c2ae1/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 16 Jan 2015 13:05:50 +0100
> From: Martin Ba <0xcdcdcdcd at gmx.at>
> To: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] Basic simple question. Can two or more
> references to different ORBS coexist?
> Message-ID: <54B8FE9E.4080602 at gmx.at>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 16.01.2015 13:01, Ram?n Talavera wrote:
> > I am testing and somehow feeling shy for asking such a simple question:
> >
> > Can two or more references to different ORBS coexist?
> >
> > In more detail:
> >
> > Can there be two or more CORBA::ORB_var configured with different calls
> > to CORBA::ORB_init(argc, argv) passing different arguments in each call?
> >
> > My tests are obtaining the same address for all orb pointers and the
> > arguments to the successive calls to ORB_init seem to be ignored.
> >
>
> No, omniORB can't do this. At all. There is only one global ORB.
>
> cheers,
> Martin
>
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 16 Jan 2015 13:12:07 +0100
> From: Johnny Willemsen <jwillemsen at remedy.nl>
> To: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] Basic simple question. Can two or more
> references to different ORBS coexist?
> Message-ID: <54B90017.4090406 at remedy.nl>
> Content-Type: text/plain; charset=windows-1252
>
> Hi,
>
> >> I am testing and somehow feeling shy for asking such a simple question:
> >>
> >> Can two or more references to different ORBS coexist?
> >>
> >> In more detail:
> >>
> >> Can there be two or more CORBA::ORB_var configured with different calls
> >> to CORBA::ORB_init(argc, argv) passing different arguments in each
> call?
> >>
> >> My tests are obtaining the same address for all orb pointers and the
> >> arguments to the successive calls to ORB_init seem to be ignored.
> >>
> >
> > No, omniORB can't do this. At all. There is only one global ORB.
>
> TAO and TAOX11 both can do this
>
> Johnny
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 16 Jan 2015 12:42:26 +0000
> From: <evgeni.rojkov at durr.com>
> To: <ramon.talavera at gmail.com>, <omniorb-list at omniorb-support.com>
> Subject: Re: [omniORB] Basic simple question. Can two or more
> references to different ORBS coexist?
> Message-ID:
> <ED45FAE1A3A9C441B1C22E6894D7030113148840 at GTL-EX002.emea.duerr.int
> >
> Content-Type: text/plain; charset="utf-8"
>
> Hello Ramon,
> looking in the CORBA::ORB_init() implementation in corbaOrb.cc (ominORB
> 4.1.7) you will see single instance (the_orb) having reference counting.
> So parametrization could be done ones.
> But there is no limitation having/accessing servants on all available
> hosts/ports.
> You could access different NameService(s) with
> omni::omniURI::stringToObject(nameServiceUri) also.
>
> Best regards,
> Evgeni Rojkov
>
> CORBA::ORB_ptr
> CORBA::ORB_init(int& argc, char** argv, const char* orb_identifier,
> const char* options[][2])
> {
> omni_tracedmutex_lock sync(orb_lock);
>
> if( the_orb ) {
> the_orb->_NP_incrRefCount();
> return the_orb;
> }
> .....
>
>
> Von: Ram?n Talavera [mailto:ramon.talavera at gmail.com]
> Gesendet: Freitag, 16. Januar 2015 13:01
> An: omniorb-list at omniorb-support.com
> Betreff: [omniORB] Basic simple question. Can two or more references to
> different ORBS coexist?
>
> I am testing and somehow feeling shy for asking such a simple question:
>
> Can two or more references to different ORBS coexist?
>
> In more detail:
>
> Can there be two or more CORBA::ORB_var configured with different calls
> to CORBA::ORB_init(argc, argv) passing different arguments in each call?
>
> My tests are obtaining the same address for all orb pointers and the
> arguments to the successive calls to ORB_init seem to be ignored.
>
> Is this normal behaviour? I am trying to make the code for a program which
> uses servants registered under two different orbs and the result I am
> getting is that the second servant is registered onto the NameService of
> the first orb, no matter if told to register on orb2.
>
> Thanks in advance,
> Ramon Talavera
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20150116/5311a875/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 5
> Date: Fri, 16 Jan 2015 13:04:14 +0000
> From: Duncan Grisby <duncan at grisby.org>
> To: Ram?n Talavera <ramon.talavera at gmail.com>
> Cc: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] Basic simple question. Can two or more
> references to different ORBS coexist?
> Message-ID: <1421413454.1609.6.camel at home3.grisby.org>
> Content-Type: text/plain; charset="UTF-8"
>
> On Fri, 2015-01-16 at 13:01 +0100, Ram?n Talavera wrote:
>
>
> > Can two or more references to different ORBS coexist?
>
> Not in omniORB, no.
> >
> > Can there be two or more CORBA::ORB_var configured with different
> > calls to CORBA::ORB_init(argc, argv) passing different arguments in
> > each call?
> >
> No, but...
>
> > Is this normal behaviour? I am trying to make the code for a program
> > which uses servants registered under two different orbs and the result
> > I am getting is that the second servant is registered onto the
> > NameService of the first orb, no matter if told to register on orb2.
>
> The naming service you register your objects in has no relationship
> whatsoever to the ORB. The naming service is just a collection of CORBA
> objects like any other objects. If you want to register object A in
> naming service 1 and object B in naming service 2, then just do that.
> There's no need for A and B to have different ORBs.
>
> Cheers,
>
> Duncan.
>
> --
> -- Duncan Grisby --
> -- duncan at grisby.org --
> -- http://www.grisby.org --
>
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 16 Jan 2015 13:09:24 +0000
> From: Duncan Grisby <duncan at grisby.org>
> To: Ram?n Talavera <ramon.talavera at gmail.com>
> Cc: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] Changing where the ORB host and port.
> Message-ID: <1421413764.1609.8.camel at home3.grisby.org>
> Content-Type: text/plain; charset="UTF-8"
>
> On Thu, 2015-01-15 at 19:31 +0100, Ram?n Talavera wrote:
>
>
> > ORB orb=init_orb(host1,port1);
> > client1=getClient("ASERVANT");
> > orb=CORBA::init_orb(host2,port2);
> >
> > client2=getClient("ASERVANT");
> >
> [...]
> > It seems that the client2 gets a reference to the servant ASERVANT
> > from host1,port1, as if the second init_orb had been ignored and it is
> > still using the nameservice of the first time it received a
> > configuration .
>
> Indeed. As we say in the other thread, omniORB's ORB is a singleton and
> you can't have more than one.
>
> But why do you want to? Is it just about the naming service, or is it
> something to do with which ports your server is listening on?
>
> Duncan.
>
> --
> -- Duncan Grisby --
> -- duncan at grisby.org --
> -- http://www.grisby.org --
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
> End of omniORB-list Digest, Vol 141, Issue 3
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20150119/ecd4633e/attachment.html>
More information about the omniORB-list
mailing list