Using the User Callout Java Library
The user callout Java library is used to transform a message that the adapter publishes into a structure that you want to publish. The user callout Java library can be customized to apply limited transformations to outgoing and incoming messages.
For example, a publisher adapter can modify a message by adding a field, or publish an empty message if a certain criteria is met. A subscriber adapter can modify a message so that the message can be written to the database by using a filter, or have the subject name inserted into the table.
Before a message is sent or received, the adapter checks the callout library. If the callout library has not been modified, the message is passed back to the adapter unchanged. If the user callout Java library has been modified, the message is passed back to the adapter with the modification. After receiving a modified message from the callout library, an adapter configuration sends or consumes the message like any other message.
- Adding a User Library in a Project
To build the callout library, you have to first add a user library. - Adding a Java Package and Class
After you add a user library in a project, you have to add a Java package and class. - Using the adbPreCommit Function
The adbPreCommit function is used to perform a custom operation, such as invoking a stored procedure or sending a TIBCO Rendezvous message, just before a transaction is committed. This function is called by the subscriber after all insert, update, and delete operations have been performed on both parent and child tables. - Using the alterMsgPub() and alterMsgSub() Functions
Two functions are available for creating callouts: alterMsgPub() is used to create a callout for a publisher, and alterMsgSub() is used to create a callout for a subscriber. You can use the alterMsgPub() and alterMsgSub() functions to alter messages in the TIBCO ActiveEnterprise Message and XML wire formats. - Exporting the JAR File
After you create a Java project and add a callout library and Java package and class, you can export the project by exporting the JAR file. - Replacing the Original JAR File
After exporting the JAR file, you have to use it to replace the original JAR file.