Skip to main content

A tool to display all the objects activated with a POA

  • February 16, 2013
  • 0 replies
  • 0 views

Problem

  • Product Version: VB 6.0 onwards
  • Product Component: ORB

A tool to display all the objects activated with a POA is very useful to troubleshoot problems encountered during production. The tool should display all the objects registered with the POA, and the details of the object should be similar to what printIOR offers.

Resolution

You will need to use a combination of POA and ServerManager APIs to achieve this requirement.

Firstly, the PortableServer::POA_ptr::find_POA() API helps to get the handle of the POA you are looking for. Then, you will have to use ServerManager functionality(which is a proprietary extension of the ORB's capabilities) to get the objects activated in a POA.

The ServerManager is intended mainly for diagnostic purposes and is how the VisiBroker console functionality is implemented. In the examples directory there is a "ServerManager/basic" example which shows the kind of information that can be queried. Check out the html page describing the example. The server must be started with the following options for the ServerManager functionality to be enabled:

vbroker.orb.enableServerManager=true

vbroker.serverManager.name=<name>

To inspect objects associated with the "RootPOA", you would be looking for a container with a name like "/ORB/RootPOA/ActiveObjectMap". Once you have got hold of the container, you will need to invoke get_all_properties() API on the container handle and loop through it to get all the object Ids activated under "RootPOA".

Then, use the PortableServer::POA_ptr::id_to_reference() to get the object reference and invoke ORB::object_to_string() to get the stringified IOR information of every object reference activated under "RootPOA" or for any other child POAs under "RootPOA".

Please also refer the articles below for more information about the ServerManager and using VisiBroker console:

[[How can the Active Object Map be queried to get a count of active objects]]

[[wiki:Managing Location Service and Smart Agent]]


#ServerManager
#Security
#POA
#ActivatedObjects
#VisiBroker
#ActiveObjects