VisiBroker for Java Developer’s Guide : Using the BOA with VisiBroker

Using the BOA with VisiBroker
This section describes how to use the BOA with VisiBroker.
Note
BOA support is provided as backward compatibility for VisiBroker version 4.0 (CORBA spec. 2.1) and 3.x versions. For current CORBA specification support, see “Using POAs”.
Compiling your BOA code with VisiBroker
If you have existing BOA code that you developed with a previous version of VisiBroker, you can continue to use it with the current version as long as you keep the following in mind:
To generate the necessary BOA base code, you must use the “-boa” option with the idl2java tool. For more information on using idl2java to generate the code, see “Using the BOA with VisiBroker”.
Because the BOA_init() is no longer available under org.omg.CORBA.ORB, you must cast the VisiBroker ORB to com.inprise.vbroker.CORBA.ORB.
Because the BOA class is no longer available in the org.omg.CORBA package, you must now refer to it in the com.inprise.vbroker.CORBA package. For more information on the VisiBroker ORB package, see the VisiBroker for Java APIs documentation.
Supporting BOA options
All BOA command line options supported by VisiBroker 4.x are still supported.
Limitations in using the BOA
Two features are not supported with VisiBroker 4.x BOA:
_boa() on DSI objects is not supported.
Using object activators
BOA object activators are supported by VisiBroker. However, these activators can be used only with BOA, not POA. The POA uses servant activators and servant locators in place of object activators.
In this release of VisiBroker, the Portable Object Adaptor (POA) supports the features that were provided by the BOA in VisiBroker 3.x releases. For backward compatibility reasons, you may still use the object activators with your code.
Naming objects under the BOA
Though the BOA is deprecated in VisiBroker, you may still use it in conjunction with the Smart Agent to specify a name for your server objects which may be bound to in your client programs.
Object names
When creating an object, a server must specify an object name if the object is to be made available to client applications through the osagent. When the server calls the BOA.obj_is_ready method, the object's interface name will only be registered with the VisiBroker osagent if the object is named. Objects that are given an object name when they are created return persistent object references, while objects which are not given object names are created as transient.
The use of an object name by your client application is required if it plans to bind to more than one instance of an object at a time. The object name distinguishes between multiple instances of an interface. If an object name is not specified when the bind() method is called, the osagent will return any suitable object with the specified interface.
Notes