Skip to main content

Problem:

Avoid calling orb init() function multiple times

For instance, some code calls org.omg.CORBA.ORB.init(...) method and resolves the naming service when the thread wakes up each time. The memory usage for the client keeps on increasing and caused the machine to crash.

Resolution:

  • Product Name: VisiBroker for Java
  • Product Version: All
  • Product Component: ORB
  • Platform/OS version: All
  • JDK: ALL
  • Patch Level: All

 

In C , calling orb->init(...) with same arguments will not create new orb.
On the other hand, for Java, every time org.omg.CORBA.ORB.init(...) gets invoked, a new instance of orb will be created!
As an ORB will take quite some memory and resources, it is strongly recommended against creating multiple ORBs just for simple lightweight usage as mentioned above.

Author: Rick Wang Ya Peng

Old KB# 26722

#Security
#VisiBroker