Thread View: comp.object.corba
3 messages
3 total messages
Started by Morris Luk
Mon, 05 Aug 2002 21:35
Bind question on visibroker 4.5.1
Author: Morris Luk
Date: Mon, 05 Aug 2002 21:35
Date: Mon, 05 Aug 2002 21:35
17 lines
1698 bytes
1698 bytes
Hi: I read the visibroker document and learned that using ORBagentAddr would skip the UDP broadcast and only the Smart Agent on the destination machine I specified would be contacted. But it did not seem to be the case. 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. Is this a known bug for visibroker? Did you encounter this problem? Any pointers would help? Thanks.
Re: Bind question on visibroker 4.5.1
Author: 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).
Re: Bind question on visibroker 4.5.1
Author: Morris Luk
Date: Tue, 13 Aug 2002 13:11
Date: Tue, 13 Aug 2002 13:11
54 lines
4087 bytes
4087 bytes
davisglynne@hotmail.com (Glynne Davis) wrote in message news:<2a88fc0b.0208120359.102536b2@posting.google.com>... > > 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. This is exactly my question because it did not give me the server I need sometimes. I felt surprised. This seems unanswered still. > > 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). Maybe I did not mention clear enough about the whole picture. This was just a testing. The reason for do this testing was because one day, a developer by mistake started her osagent with the services having the same names as in production environment using the production port number on her local machine. This caused issues on production because sometimes it talked to the correct production osagent but sometimes it talked to the osagent on her machine which did not have production logic. Until that happened, we thought that by using ORBagentAddr, we can always talk to just a particular osagent. This seemed to be not true. So I'm just wondering if this is a know bug in visibroker. Or I have missed something. Thanks.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads