Skip to main content

VBJ 5.2.1: Location Service client gets too many objects from query

  • February 16, 2013
  • 0 replies
  • 0 views

Problem:

  • Product Name: BES VisiBroker Edition
  • Product Version: 5.2.1
  • Product Component: ORB Smart Agent (osagent), Location Service
  • Platform/OS Version: AIX 5.1

When osagent is upgraded from version 5.0.1 to 5.2.1, the location service returns more objects than it did previously. The application has identical objects running on two separate hosts and previously the 5.0.1 agent only returned objects registered with the local agent but now the 5.2.1 returns objects registered with any agent.

Resolution:

In this situation the VB 5.2.1 behavior is expected and correct behavior for the location service in this situation. The following taken from chapter 17 "Using the Location Service" on "Obtaining references to instances of an interface" of the programmers guide for VBJ 4.5:
 
"You can query VisiBroker Smart Agents on a network to find all available instances of a particular interface. When performing the query, you can use either of these methods:

Object[] all_instances(String repository_id)
Use this method to return object references to instances of the interface.

Desc[] all_instance_descs( String repository_id)
Use this method to return an instance description for instances of the interface.

In the example shown in Figure 17.3, a call to either method with the request IDL:Automobile/Car:1.0 would return three instances of the Car interface: Tom's Car on Athena, Tom's Car on Zeus, and Kerri's Car. The Tom's Car instance is returned twice because there are occurrences of it with two different Smart Agents."

What the above implies is that the location service client will contact an agent on the subnet and initially ask for references to all other osagents running in the ORB domain (agents in subnet using same OSAGENT_PORT). Then the location service queries each agent in turn for object references (or Descs) for each instance the matches the RepId. Thus you get every instance of the server available on the ORB domain no matter what osagent it is registered with. This is how the osagent/location service was designed.

The different behavior that you see in version 5.0.1 is most likely due to discovery problems that were fixed in version 5.2.1. Early versions of osagent in VB 5.x exhibited problems discovering other osagents on the subnet. This applied to AIX and Windows platforms. In this situation the client would only get one osagent instance which then reports only the instances registered with it.

 


#VisiBroker
#Security