Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Programming information on OLTP message-driven beans

  • An OLTP message-driven bean must implement exactly one of the following interfaces:

    • AsyncOltpMessageListener

    • OltpMessageListener

  • An OltpMessage object may consist of one or more OltpMessagePart objects and/or one or more OltpMessageRecord objects. Whereas an OltpMessageRecord is of arbitrary length, an OltpMessagePart object must not exceed a length of 32767 bytes.

    You can retrieve the message content from OltpMessagePart and OltpMessageRecord objects as an object of one of the following types:

    • byte[]

    • String

    • ByteContainer

    An OLTP message-driven bean may implement the ByteContainer interface if it wants to exchange structured objects containing text and binary information with an EIS application. Here, code conversion needs to be performed for the text information of the structured object. For objects of type String, code conversion is performed by BeanConnect. For details, see the JavaDoc of BeanConnect.

  • The sequence in which OltpMessagePart- and/or OlpMessageRecord objects are added to an OltpMessage or are returned by an OltpMessage corresponds to the sequence in which the message was sent or received.

  • The interface OltpMessageContext serves two purposes:

    • It provides a method for generating a reply message.

    • It allows status information to be retrieved.

    An OLTP message-driven bean may call the methods of the interface OltpMessageContext only from within the onMessage() method.

  • When calling the method addMessagePart() or the method addMessageRecord() within the method onMessage(), you must use the same OltpMessage that was used to call one of the methods createMessagePart() or createMessageRecord() respectively.

  • Asynchronous OLTP message-driven beans receive asynchronous messages, which arrive independently of the initiator's availability. Therefore, neither a reply message nor an exception thrown by an asynchronous OLTP message-driven bean can be returned to the initiator of the asynchronous message.

  • If transactional communication via the OSI-TP protocol is used between the EIS application and BeanConnect, the method onMessage(OltpMessage) of a dialog based OLTPmessage-driven bean participates in a distributed transaction, if the transaction attribute Required has been assigned to this method.

  • Asynchronous OLTP message-driven beans can never be part of a transaction that is distributed between the EIS application and the application server.

  • The method onMessage() of an asynchronous OLTP message-driven bean which has been deployed with the transaction attribute Required is called in the transaction, which has been started by the proxy (never by the EIS). If the transaction is rolled back, the asynchronous message is redelivered to the OLTP message-driven bean if necessary.

    The OLTP message-driven bean can detect such a situation by evaluating the delivery count value of an asynchronous OltpMessage object. The redeliveryThreshold activation-config property, which is specified at deployment of the OLTP messagedriven bean, defines the number of additional attempts to deliver the message if an error occurs (see "reconnectThreshold" in Setting the configuration properties for UPIC ).

  • The support methods of the interface EncodingDef are available through the interface OltpMessageContext for exchanging messages in codes other than ASCII.

For detailed information, refer to the JavaDoc of BeanConnect.