This section describes how to modify the above example to support container-managed transactions. In this modified example, TIBCO Enterprise Message Service server participates in a distributed transaction started by WebLogic server.
To create the JMS Connection factory that supports XA, perform the following:
ejb-jar.xm
l:<assembly-descriptor> <container-transaction> <method> <ejb-name>exampleMessageDriven1</ejb-name> <method-name>*</method-name> </method> <method> <ejb-name>exampleMessageDriven2</ejb-name> <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor>
connection-factory-jndi-name
in the file weblogic-ejb-jar.xml
. To use a message driven bean with container manager transactions, it should use a JMS connection factory that supports XA. Change connection-factory-jndi-name
to XATopicConnectionFactory
.Rebuild, redeploy, and run the example MDB in the same manner as described in the previous sections.
TIBCO Enterprise Message Service™ Application Integration Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |