VisiBroker for C++ 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, go to “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.
Note
To generate the necessary BOA base code, you must use the “-boa” option with the idl2cpp tool. For more information on using idl2cpp to generate the code, see “IDL to C++ mapping”.
Supporting BOA options
All BOA command line options supported by VisiBroker 4.x are still 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.
Note
If you pass an empty string for the object name to the object constructor in VisiBroker for C++, a persistent object is created, (that is, an object which is registered with the Smart Agent). If you pass a null reference to the constructor, a transient object is created.
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.
Note
In VisiBroker 3.x, it was possible to have a server process that provided different interfaces, all of which had the same object name, but in the current version of VisiBroker, different interfaces may not have string-equivalent names.