Skip to main content

Problem:

How to use partition resources (eg: vbroker.properties) in the user application

Resolution:

Product Name: AppServer
Product Version: 6.x & above
Product Component: Partition


Issue

The application needs to use vbroker.properties in its own ORB.

Solution

The vbroker.properties can be passed to the application"s ORB.

The application developer can follow the steps below for using vbroker.properties in the application ORBs:

1. Add a property in partition_server.config located in \\var\\domains\\base\\configurations\\ \\mos\\\\adm\\properties

eg:
vmprop vbroker.properties.file=$var(installRoot)/var/domains/base/configurations/j2eeSample/mos/MyPartition/adm/properties/vbroker.properties


This will be added as a system property.

2. Load the properties using this property in your code and pass the properties object to the ORB creation.

Properties props = new Properties();
props.load(new FileInputStream(System.getProperty("vbroker.properties.file")));
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);

Likewise, any of the partition"s resources(eg: properties, xml, etc) can be used in the user application.

Old KB# 29366

#Security
#VisiBroker