It is possibile to set the consumer as persistent, meaning that the corresponding CORBA servant refernces continue to be valid after a SU shutdown and restart. This feature is implemented in a portable way setting the PERSISTENT policy on the POA managing the servant. The persistent behaviour can be activated setting to "true" the persistent attribute on the address tag of the port in the wsdl:
<imolacorba:address name="SequencePushConsumer" localizationType="NameService" persistent="true">
The poa name and the object id of the created servant can be set using two properties specified on the orb properties map. The two properties are:
<imolacorba:property name="jbi4corba.peristent_poa_name" value="myPoaName"/> <imolacorba:property name="jbi4corba.object_id" value="myId"/>
This two properties are optional and if not set they will default to:
Notice that the persistent behaviour is compatible both with the ServiceName and the IOR localization mode.
For many orb this is not enough to obtain a persistent servant and often a non portable, specific configuration is required. Currently only jacorb is tested on this feature, in the following paragraph the jacorb specific configurations are shown.
Jacorb needs some additional specific configuration to activate a persistent consumer. In jacorb a persistent consumer can be obtained in two ways:
In both cases it's necessary to add the jacorb.implname property to the orb properties:
<imolacorba:property name="jacorb.implname" value="myImplName"/>
This properties defines the implementation name of the servant and if not specified it defaults to the interface name of the endpoint:
To implement a persistent consumer using a implemenation repository the following properties must be specified:
The use of the properties is shown in the following example:
<imolacorba:property name="ORBInitRef.ImplementationRepository" value="file:///path/imr-ior.txt"/> <imolacorba:property name="jacorb.use_imr" value="on"/>
To implement a persistent consumer using a well known location the following property must be specified:
an example is shown here:
<imolacorba:property name="OAPort" value="12345"/>
The port must be free of course. The url the corba servant will be accepting connection is defined by the following pattern:
corbaloc:iiop:<host>:<OAPort>/<jacorb.implname>/<jbi4corba.peristent_poa_name>/<jbi4corba.object_id>