Managing Implementation Repository

0 Likes

Back

The VisiBroker Implementation Repository Service maintains a registry of activation information for all object implementations registered with it. It also automatically activates (or spawns) the process which contains the object implementation on demand when a client accesses the object. Hence it is also known as Object Activation Daemon (OAD).

The Implementation Repository Browser inside VBConsole can be used to manage the Implementation Repository. This article assumes that you already understand the basic concept of OAD, and also have some experience managing the Implementation Repository using the “oadutil” command line tool. If necessary, you may refer to the chapter on "Using the Object Activation Daemon (OAD)" inside the VisiBroker (Java and C ) Developer's Guide in VisiBroker 8.5 documentation to learn more about VisiBroker Implementation Repository Service and OAD.

Please note that the Implementation Repository Browser described in this article is based on VisiBroker 8.5.

OAD Info View

To view all the OAD instances that are running in your ORB Domain, simply expand the “Implementation Repositories” icon in the Navigation Pane. Next, click the OAD instance that you wish to manage. The Implementation Repository Browser is displayed in the Content Pane.

To view the configuration of the selected OAD instance, click the “OAD Properties” button in the Content Pane.

OAD Info View

The field names displayed in this view are explained below:

  • Object type: Repository Id of the OAD interface.
  • Host: Host name of the machine which the OAD runs in.
  • IP address: IP address of the machine which the OAD runs in.
  • IIOP listener port: The IIOP listener port number which the OAD listens on.

The information displayed lets know the locations where the OAD instances are currently running in the production environment.

Registered objects View

To view the registration information of all the object implementations registered with the OAD, click the “Registered objects view” button in the Content Pane. You can refresh this view by clicking the same button again.

OAD Registered Objects View

The field names displayed in the “Registered Objects” view are explained below:

  • Repository ID: Repository Id of the Object registered.
  • Object / POA Name: Object Name or POA name of the Object registered.
  • State: The activation status of the Object implementation.
  • Policy: Shared or Unshared Server Activation Policy used to register the Object.
  • Key, Value: The list of Name-Value pair parameters being used to activate the selected Object.

These information can be useful when debugging some Server activation issues which may be caused by incorrect parameters being set during the registration of object implementation.

Similar information can also be displayed by using the “oadutil” command line tool as shown below:

$ oadutil list -h 10.16.12.169 -full
oadutil list: located 2 record(s)

Implementation #1:
-------------------
repository_id = *
object_name = /bank_agent_poa
reference data =
path_name = vbj
activation_policy = UNSHARED_SERVER
args = (length=1)[Server; ]
env = (length=1)[vbroker.oad.locateAlways=true; ]

Nothing active for this implementation

Implementation #2:
-------------------
repository_id = IDL:Bank/AccountManager:1.0
object_name = BankManager
reference data =
path_name = vbj
activation_policy = SHARED_SERVER
args = (length=1)[Server; ]
env = (length=1)[vbroker.oad.locateAlways=true; ]

Nothing active for this implementation

A few other operations are available in this View. You can register or unregister the object implementations, and also reconfigure the activation policy and attributes for existing registry entries.

Registering Object Implementation

Let me demonstrate to you how to register an object implementation that requires the following activation policy and attributes by using the Implementation Repository Browser.

  • Activation Policy: Unshared Server
  • Repository Id: IDL:Bank/AccountManager:1.0
  • Instance Name: BankManager
  • Main Java Class Name: Server
  • Environment variable: vbroker.oad.locateAlways=true
  • OAD Host: 10.16.12.229

First, click the “Register Implementation Repository” button to open the “OAD Object Properties” dialog box.

OAD Register Object Implementation

In the “General” Tab of the “OAD Object Properties” dialog box, enter the required activation policy and attributes of the object implementation:

OAD Object Properties - General Tab

In the “Environments” Tab, click the “Add a variable” button to pop up the “Environment” dialog box and then add the required environment variable:

OAD Object Properties - Environment Tab

Similar operation can also be performed using the “oadutil reg …” command:

oadutil reg -r IDL:Bank/AccountManager:1.0 -o "BankManager" -java Server -p unshared -e vbroker.oad.locateAlways=true –host 10.16.12.229

Unregistering Object Implementation

You can easily unregister an object implementation from the Implementation Registry by selecting it and then clicking the “Unregister Implementation Registry” button. As a precaution, a dialog box pops up for you to confirm the action before continuing.

Similar operation can also be performed using the “oadutil unreg …” command. For example, the following command can be used to unregister an object implementation with a Repository Id of “IDL:Bank/AccountManager:1.0” from an OAD running in the host “10.16.12.229”.

oadutil unreg -r IDL:Bank/AccountManager:1.0 -host 10.16.12.229

Reconfiguring Object Implementation

You can easily reconfigure the activation policy and attributes object of existing object implementation by selecting it and then clicking the “Configure Implementation Registry” button. The “OAD Object Properties” dialog box pops up to let you modify the activation policy and attributes.

Using "oadutil" to reconfigure an existing object implementation requires 2 separate commands. You need to first unregister the object implementation that needs to be reconfigured (using the “oadutil unreg …” command), and then re-register the object implementation (using “oadutil reg …” command) with the updated activation policy and attributes.

For example, to change the activation policy of the previously added object implementation from “unshared” to “shared” using “oadutil” command line tool, you need to run the following two "oadutil" commands:

oadutil unreg -r IDL:Bank/AccountManager:1.0 -host 10.16.12.229

oadutil reg -r IDL:Bank/AccountManager:1.0 -o "BankManager" -java Server -p shared -e vbroker.oad.locateAlways=true –host 10.16.12.229

As you can see, the Implementation Repository Browser provides a more intuitive and user friendly GUI as compared to the “oadutil” command line tool. This can facilitate the job of managing the Implementation Repository.

Configuring OAD

OAD can be configured with a properties file. The “VisiBroker Properties File Editor” Tool can help you edit this file. You can launch this Editor under the “Tools” pull-down menu within the VBConsole. It is a helpful tool for inexperienced users who are not familiar with the exact OAD property names, their possible values and syntax.

Alternatively, you can directly edit the OAD properties file using any text editor if you are familiar with the OAD properties.

To start editing an OAD properties file, you can either open an existing file or create a new file under the “File” pull-down menu of the“VisiBroker Properties File Editor”. Next, select "Implementation Repository Configuration Wizard" under the “Wizard” pull-down menu.

Implementation Repository Configuration Wizard

Menu location: Wizard -> Implementation Repository -> Implementation Repository Configuration Wizard

Implementation Repository Configuration Wizard

This Wizard helps you configure the following OAD properties:

  • vbroker.se.iiop_tp.scm.iiop_tp.listener.port
  • vbroker.agent.enableLocator
  • vbroker.agent.port
  • vbroker.oad.implName
  • vbroker.oad.iorFile
  • vbroker.oad.path
  • vbroker.oad.implPath
  • vbroker.oad.systemRoot
  • vbroker.oad.vbj
  • vbroker.oad.spawnTimeOut
  • vbroker.oad.verbose
  • vbroker.oad.readOnly
  • vbroker.oad.quoteSpace
  • vbroker.oad.killOnUnregister
  • vbroker.oad.verifyRegistration

After you have configured the OAD properties using the Wizard, you can still manually modify the generated properties or add any other properties currently not handled by the Wizard using the integrated text editor. The following screen shot shows the “VisiBroker Properties File Editor” Tool editing the “oad.properties” file.

VisiBroker Properties File Editor - oad.properties

In this example, the “vbroker.oad.ldLibPath” property (required for activating VBC Server) is added manually as it is currently not generated by the Wizard.

Finally, save the properties file. In order for OAD to load all the properties from the file successfully, you must start OAD with the “vbj” (instead of "oad") launcher by specifying the OAD implementation class and setting the “ORBpropStorage=oad.properties” property. For example:

vbj -DORBpropStorage=oad.properties com.inprise.vbroker.activationImpl.OADserv

Note that if the OAD is started with the “oad” launcher instead, then the following properties cannot be overridden in the properties file:

  • vbroker.oad.implName
  • vbroker.oad.implPath
  • vbroker.oad.path
  • vbroker.oad.systemRoot
  • vbroker.oad.windir

This is because the “oad” launcher will internally override these properties based on the runtime environment settings it detects. However, they can be overridden with environment variables or from the command line.

In summary, the Implementation Repository Browser can facilitate your job of managing the Implementation Repositories and OADs running in your ORB Domain.

Back  |  Next

Labels:

How To-Best Practice
Comment List
Related
Recommended