Persistent Consumer

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:

  • jbi4corba.peristent_poa_name for the poa name
  • jbi4corba.object_id for the object id
    <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:

  • jbi4corba.peristent_poa_name = service port name, ex: SequencePushConsumerCorbaPort
  • jbi4corba.object_id = the QName of server name, es: http://CosNotifyComm.SequencePushConsumerSequencePushConsumer

    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 configurations for Persistent Consumer

Jacorb needs some additional specific configuration to activate a persistent consumer. In jacorb a persistent consumer can be obtained in two ways:

  • using a implementation repository (IMR)
  • using a well know location (corbaloc)

    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:

  • jacorb.implname = interface name QName, ex: http://CosNotifyComm.SequencePushConsumerSequencePushConsumer

    To implement a persistent consumer using a implemenation repository the following properties must be specified:

  • ORBInitRef.ImplementationRepository pointing to a valid url defining the Implementation Repository
  • jacorb.use_imr set to "on"

    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:

  • OAPort specifying the IP port the servant will be listening at.

    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>