1.
|
Start the tibemsd server and the tibemsadmin console.
|
2.
|
Create three queues (queue/A, queue/B and queue/DLQ) and two XA connection factories ( XAQueueConnectionFactory and XATopicConnectionFactory), by entering the following commands in tibemsadmin:
|
> create factory XAQueueConnectionFactory xaqueue url=tcp://7222
> create factory XATopicConnectionFactory xatopic url=tcp://7222
%JBOSS_DEPLOY%\jms\jms-ds.xml
%JBOSS_CONF%\jboss-service.xml
%JBOSS_CONF%\standardjboss.xml
<mdb-output>\META-INF\jboss.xml
|
You should copy the files in the %JBOSS_DEPLOY% directory to another directory, rather than rename the files in place. JBoss attempts to deploy all files in that directory, regardless of name or file extension.
|
5.
|
Reconfigure the JMSProviderLoader mbean to load TIBCO Enterprise Message Service instead of JBoss MQ. To do so, edit the file %JBOSS_DEPLOY%\jms\jms-ds.xml to resemble these lines:
|
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
java.naming.security.principal=jbosslookup
java.naming.security.credentials=jbosslookup
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
java.naming.factory.url.pkgs=com.tibco.tibjms.naming
java.naming.provider.url=tibjmsnaming://localhost:7222
<jndi-name>JmsXA</jndi-name>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory
<config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
<config-property name="JmsProviderAdapterJNDI"
type="java.lang.String">java:/TIBCOJMSProvider</config-property>
<max-pool-size>20</max-pool-size>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
7.
|
Reconfigure the MDB to use the queue connection factory reference for TIBCO Enterprise Message Service. To do so, edit the file <mdb-output>\META-INF\jboss.xml as shown:
|
<ejb-name>TextMDB</ejb-name>
<destination-jndi-name>queue/B</destination-jndi-name>
<res-ref-name>jms/QCF</res-ref-name>
<jndi-name>ConnectionFactory</jndi-name>
<res-name>queuefactoryref</res-name>
<res-jndi-name>java:/JmsXA</res-jndi-name>
<ejb-name>TextMDB</ejb-name>
<destination-jndi-name>queue/B</destination-jndi-name>
<mdb-user>MDBUser</mdb-user>
<mdb-passwd>MDBPassword</mdb-passwd>
<res-ref-name>jms/QCF</res-ref-name>
<resource-name>queuefactoryref</resource-name>
This change modifies the MDB to use the queue connection factory for EMS. MDBUser and MDBPassword are used to authenticate the MDB user when it connects to the EMS server. If authorization is disabled in the server, the MDBUser and Password lines can be omitted.
9.
|
In the %JBOSS_CONF%\standardjboss.xml file, modify the following line.
|
This change sets "TIBCOJMSProvider" as the JMS Provider Adapter JNDI name.
%JBOSS_DEPLOY%\jms\jbossmq-service.xml
%JBOSS_DEPLOY%\jms\jbossmq-destinations-service.xml
13.
|
Add EMS_HOME\lib\tibjms.jar to the CLASSPATH of the client program.
|