Skip to main content

Problem

  • Product Name: VisiBroker for Java
  • Product Version: All
  • Platform/OS version: All

A VisiBroker client orb is deployed in a servlet implementation. It is observed that the web container hangs. Upon further investigation, the following are observed.

  1. There are many instances of VisiBroker threads. Typically, it goes into a few thousands threads and consume high CPU and memory.
  2. There are many instances of VisiBroker "GarbageCollector" threads.
  3. You may also see many instances of VisiBroker "Are you Alive" threads if you are using osagent.
  4. There are many UDP and TCP ports opened.

It was assumed that the default implementation for orb.init(String[], java.util.Properties) method is a singleton.

Resolution

This issue occurs as every HTTP request into the servlet creates an instance of VisiBroker orb instance. Each VisiBroker orb instance spawn 1 "GarbageCollector" thread and open a new UDP and TCP port to communicate with the osagent. I have extracted this paragraph from Section 4.5.1 of the CORBA 2.6 Specification.

The ORB initialization operation is an application's bootstrap call into the CORBA world. The ORB_init call is part of the CORBA module but not part of the ORB interface. Applications can be initialized in one or more ORBs. When an ORB initialization is complete, its pseudo reference is returned and can be used to obtain other references for that ORB.

The CORBA specification states the orb.init() implemented by the CORBA vendors is not designed to be a singleton. It is up to the application layer to determine whether to make this orb instance a singleton. VisiBroker complies to the implementation stated in the CORBA specification.

In pdf page 157 of the VisiBroker 6.5 for Java Developer guide, it states the following

You are advised to create only one single instance of the VisiBroker ORB per process as the ORB can use a significant amount of system resources.
 

Related articles:

[[wiki:Pitfall in creating multiple ORBs in VisiBroker for Java]]


#Security
#VisiBroker
#ORB.init()
#ORB