![]() |
This example MDB uses container-managed transactions. For more information, see Container-Managed Transactions (XA).
|
queue/A
, queue/B
and queue/DLQ
) and two XA connection factories (XAQueueConnectionFactory
and XATopicConnectionFactory
), by entering the following commands in tibemsadmin
:> connect > create queue queue/A > create queue queue/B > create queue queue/DLQ > create factory XAQueueConnectionFactory xaqueue > create factory XATopicConnectionFactory xatopic
%JBOSS_DEPLOY%\jms-service.xml %JBOSS_CONF%\jboss-service.xml %JBOSS_CONF%\jndi.properties %JBOSS_CONF%\standardjboss.xml
CLASSPATH
of the JBoss server by modifying the file described below. The value of the jar file paths should be modified for your installation.<!-- TIBCO Enterprise Message Service classpath --> <classpath codebase="file://C:\TIBCO\EMS\clients\java" archives="tibjms.jar, tibjmsapps.jar" />
<!-- The JMS provider loader --> <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=JBossMQProvider"> <attribute name="ProviderName">DefaultJMSProvider</attribute> <attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JBossMQProvider </attribute> <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute> <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute> </mbean>Replace the removed lines with the following lines to cause JMSProviderLoader mbean to load TIBCO Enterprise Message Service:
<!-- The JMS provider loader --> <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=TibjmsProvider"> <attribute name="ProviderName">TIBCOJMSProvider</attribute> <attribute name="ProviderAdapterClass"> com.tibco.tibjms.appserver.jboss.JBossAdapter </attribute> <attribute name="QueueFactoryRef">XAQueueConnectionFactory</attribute> <attribute name="TopicFactoryRef">XATopicConnectionFactory</attribute> </mbean>
QueueConnectionFactory
(in order to create a QueueSender
to send a message back to the initiator), it looks it up as java:comp/env/jms/QCF
. Because we want the QueueConnectionFactory
object that is returned from the lookup to be a TIBCO Enterprise Message Service XAQueueConnectionFactory
, we must store a JNDI LinkRef under that name in the JBoss JNDI implementation that points to the XAQueueConnectionFactory
in the TIBCO Enterprise Message Service implementation. Adding the following lines in jms-service.xml
accomplishes this.<!-- Redirect QueueConnectionFactory to TIBCO Enterprise Message Service --> <mbean code="org.jboss.naming.NamingAlias" name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory"> <attribute name="ToName">tibjmsnaming://localhost/XAQueueConnectionFactory </attribute> <attribute name="FromName">QueueConnectionFactory</attribute> </mbean>
jboss-service.xml
, change the dependency of the EJB Deployer from JBossMQProvider
to TibjmsProvider
.%JBOSS_DEPLOY%
directory. These files are not needed when using TIBCO Enterprise Message Service and therefore must not be deployed:%JBOSS_CLIENT%\jndi.properties
to use TIBCO Enterprise Message Service JNDI by setting the following property:C:\TIBCO\EMS\clients\java\tibjms.jar
to the CLASSPATH
of the client program.
TIBCO Enterprise Message Service™ Application Integration Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |