Article View: comp.object.corba
Article #57Re: Bind question on visibroker 4.5.1
From: Glynne Davis
Date: Mon, 12 Aug 2002 11:59
Date: Mon, 12 Aug 2002 11:59
34 lines
2968 bytes
2968 bytes
> I used ORBagentAddr in the java.util.Properties > for ORB.init() and I had the services running on two different > machines using the same port number. I found that sometimes I bind to > machine A while sometimes I bind to machine B. The service names on > both machines are the same but the logic of them are different so that > I can differentiate. > Surely you need to differentiate between communicating with osagents and communicating with the CORBA objects themselves. The ORBagentAddr can be used to specify that a VisiBroker process communicates with an osagent on a particular host (communicate directly with that agent using p2p UDP instead of finding an agent using UDP broadcast) but that doesn't say anything about the IORs that the agent will return. If you run only one agent, then you will definitely round-robin between the two services. For example, ORBagentAddr points to an osagent on machine A. The osagent on this host holds references to services with identical names and repIds on machines A and B. Each time a reference is requested, it gives out A, B, A, B etc. If you run an osagent on both hosts, then you might get what you need, but that is less predictable (depends on startup order, network latencies etc.) If the service on A is registered with an osagent on A, the service on B is registered with an osagent on B, pointing ORBagentAddr to the particular host will give you the server you need. However, why register these 2 instances of the service with the osagent under identical names if you want to distinguish between them? Why not just register them with different names, and bind to the name you want? When you do a "bind" you also have the option of specifying that you want a reference to an object on a particular host (see the overloaded versions of "bind" that allow you to specify a host address and BindOptions).
Technical Details
Message-ID:
<2a88fc0b.0208120359.102536b2@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<e3ccc19b.0208051335.7da57d33@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109156,d3b1b487ac25ffcc X-Google-Attributes: gid109156,public X-Google-Thread: f753e,d3b1b487ac25ffcc X-Google-Attributes: gidf753e,public X-Google-Thread: 10661c,d3b1b487ac25ffcc X-Google-Attributes: gid10661c,public X-Google-ArrivalTime: 2002-08-12 04:59:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: davisglynne@hotmail.com (Glynne Davis) Newsgroups: comp.object.corba,inprise.public.visibroker,borland.public.visibroker Subject: Re: Bind question on visibroker 4.5.1 Date: 12 Aug 2002 04:59:02 -0700 Organization: http://groups.google.com/ Lines: 34 Message-ID: <2a88fc0b.0208120359.102536b2@posting.google.com> References: <e3ccc19b.0208051335.7da57d33@posting.google.com> NNTP-Posting-Host: 208.161.239.49 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1029153542 20225 127.0.0.1 (12 Aug 2002 11:59:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 12 Aug 2002 11:59:02 GMT