Hi,
I googled the problem and found some information regardign XA transactions problem that Messages will only move to Backout Queue when we deploy our MDB as XA Transactions (Container managed). Secondly I want to inform you that I am using MQ Server Trial version for Windows and using its adapter to communicate with MQ server from jBoss. I deployed my MDB with following ejb-jar.xml and jboss.xml;
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="EJBJar_OfsMessageMDB" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>OFSMessage</display-name>
<enterprise-beans>
<message-driven id="MessageDriven_OfsMessageMDB">
<display-name>OFSMessage Bean</display-name>
<ejb-name>OFSMessageMDB</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>*Bean*</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<!--<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>-->
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>t24OFSQueue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>useJNDI</activation-config-property-name>
<activation-config-property-value>false</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>hostName</activation-config-property-name>
<activation-config-property-value>10.44.5.88</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>port</activation-config-property-name>
<activation-config-property-value>1414</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>queueManager</activation-config-property-name>
<activation-config-property-value>T24QM</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-ref id="ResourceRef_jmsQueueConnectionFactory">
<description>T24 Queue Connection Factory</description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24ConnectionFactory">
<description>T24 JCA Connection Factory</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24OFSReplyQueue">
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
<message-driven id="MessageDriven_OfsMessageMDB_DLQ">
<display-name>OFSMessage Bean DLQ</display-name>
<ejb-name>OFSMessageMDB_DLQ</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Bean</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<!--<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>-->
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>SYSTEM.DEAD.LETTER.QUEUE</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>useJNDI</activation-config-property-name>
<activation-config-property-value>false</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>hostName</activation-config-property-name>
<activation-config-property-value>10.44.5.88</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>port</activation-config-property-name>
<activation-config-property-value>1414</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>queueManager</activation-config-property-name>
<activation-config-property-value>T24QM</activation-config-property-value>
</activation-config-property>
</activation-config>
<resource-ref id="ResourceRef_jmsQueueConnectionFactory_DLQ">
<description>T24 Queue Connection Factory</description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24ConnectionFactory_DLQ">
<description>T24 JCA Connection Factory</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24OFSReplyQueue_DLQ">
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
jboss.xml java:wmq/myFC is connection factory I created for wmq.jms.rar I got from WebSphere MQ Trial Version
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<message-driven>
<resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>
<ejb-name>OFSMessageMDB</ejb-name>
<configuration-name>Standard Message Inflow Driven Bean</configuration-name>
<destination-jndi-name>queue/t24OFSQueue</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<!--<jndi-name>java:/ConnectionFactory</jndi-name>-->
<jndi-name>*java:wmq/myFC*</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<!-- <res-type>javax.jms.Queue</res-type>
-->
<jndi-name>queue/t24OFSReplyQueue</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactory</jndi-name>
<!-- <res-type>com.jbase.jremote.JConnectionFactory</res-type>
-->
</resource-ref>
</message-driven>
<message-driven>
<resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>
<ejb-name>OFSMessageMDB_DLQ</ejb-name>
<configuration-name>Standard Message Inflow Driven Bean</configuration-name>
<destination-jndi-name>queue/t24OFSDLQ</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<!--<jndi-name>java:/ConnectionFactory</jndi-name>-->
<jndi-name>*java:wmq/myFC*</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<!-- <res-type>javax.jms.Queue</res-type>
-->
<jndi-name>queue/t24OFSReplyQueue</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactory_DLQ</jndi-name>
<!-- <res-type>com.jbase.jremote.JConnectionFactory</res-type>
-->
</resource-ref>
</message-driven>
</enterprise-beans>
</jboss>
If I simply change my transaction attribute in ejb-jar.xml file from 'Bean' to 'Container', deployment failed with following exception;
Error With Container Transaction Type
11:55:58,073 WARN
ServiceController Problem starting service jboss.j2ee:service=EJB,plugin=invoker,binding=message-inflow-driven-bean,jndiName=local/OFSMessa
geMDB@1882473413
org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:t24O
FSQueue@T24QM@10.44.5.88; - nested throwable: (com.ibm.mq.connector.DetailedResourceException: MQJCA1004: Distributed transactions are unavailable., error code:
MQJCA1004 An attempt was made to use distributed transactions in an environment where they are not available. Make sure that the WebSphere
MQ extended transactional client is installed if required, or use a bindings connection.)
Could you please guide me how to install this extended transactional client because the jar required to implement that is not available in my 'MQServer_Install_Dir/java/lib' directory Or do I need to upgarde my version to proper release?
Thanks
--
Sjunejo