Skip to main content

Problem:

  • Product Name: VisiBroker for Java
  • Product Version: 6.5, 7.0 & 8.0
  • Product Component: OAD
  • Platform/OS: All
  • JDK: n.a.

How to pass JVM options like -Xmx and -Xms to Java CORBA Server process using oadutil

Resolution:

oadutil is a java process used to register cobra server object to the Object Activation Daemon (OAD). oadutil does not support passing JVM parameters (like -Xms, -Xmx, etc)  through command line for CORBA server.

A JAVA CORBA Server is typically registered to the OAD using the following command.

oadutil reg -poa /bank_agent_poa -java Server -verbose -p unshared

If it is required to pass JVM options like -Xms and -Xmx, the following command does not work

oadutil reg -poa /bank_agent_poa -java Server -verbose -p unshared -a "-Xms32M" -a "Xmx64M"

The above command limit the memory usage of the oadutil process instead of the CORBA server process as desired.

In earlier versions of VisiBroker, VBJ is implemented as a script. Therefore, you can pass the -Xmx64m in a command line and pass to JVM later.

In new versions, VBJ is enhanced as the JNI launcher/wrapper from Visibroker 6.5. The oadutil command is also a launcher. oadutil will configure itself first instead ofpassing to the VBJ command. 

The workaround is to create a script that will start the JAVA CORBA Server using the vbj command. The script is registered using the oadutil command as below:

oadutil reg -poa /bank_agent_poa -cpp /run_server.sh -verbose -p unshared

Contents of run_server.sh:

vbj -J-Xms32M -J-Xmx64M $@ Server

Author : Umapati Singh

Old KB# 26719

#VisiBroker
#Security
#VisiBrokerOAD