Skip to main content

developerWorks >  WebSphere  >  Forums  >  WebSphere MQ  >  developerWorks

MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem    Point your RSS reader here for a feed of the latest messages in this thread


Tags for this thread: 

     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 8 - Pages: 1 - Last Post: Nov 9, 2009 7:16 PM Last Post By: Glenns_Screen
sjunejo

Posts: 47
Registered: Apr 14, 2009 04:23:53 AM
MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 04, 2009 06:06:09 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

I am using MQ Server 7 with jBoss cluster at the momoent. Everything is fine but my message not redirecting to DLQ if its backed out.

I defined BOTHRESH as follows;

alter qlocal('qIN') BOTHRESH(2)

On IBM website it says if we do not define any BOQNAME (i.e. null) the message will be redirected to QMGR.DEAD.LETTER.QUEUE but its not :(

Am I missing something?

I tested above by putting message on 'qIN' using 'amqsput', jBoss application server failed to deliver the message and retries '2' times (as described above in BOTHRESH) with exception but after that MQ should requeue the message on QMGR dead letter queue automatically but its not, because MDB listening to DLQ is not doing anything (its silent). I prove above by putting message directly onto QMGR.DEAD.LETTER.QUEUE and it gets processed by my MDB straight away.

Please help;

Thanks

--

SJunejo
Glenns_Screen

Posts: 399
Registered: Apr 17, 2006 11:58:20 PM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 04, 2009 08:10:46 PM   in response to: sjunejo in response to: sjunejo's post
 
Click to report abuse...   Click to reply to this thread Reply
Does a display of the queue manager attributes show that QMGR.DEAD.LETTER.QUEUE is its official dead letter queue?
sjunejo

Posts: 47
Registered: Apr 14, 2009 04:23:53 AM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 05, 2009 04:04:20 AM   in response to: Glenns_Screen in response to: Glenns_Screen's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Glenns,

Yes, following are the details;

display qmgr deadq
1 : display qmgr deadq
AMQ8408: Display Queue Manager details.
QMNAME(T24QM) DEADQ(SYSTEM.DEAD.LETTER.QUEUE)

Note: In my first post I used my DLQ name as QMGR.DEAD.LETTER.QUEUE to elaborate the scenario. My actual DLQ is 'SYSTEM.DEAD.LETTER.QUEUE' which is always get created by default when we create QMGR.

My QLocal information is as follows;

display qlocal('t24OFSQueue')
2 : display qlocal('t24OFSQueue')
AMQ8409: Display Queue details.
QUEUE(t24OFSQueue) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2009-11-04)
ALTTIME(10.26.49) BOQNAME( )
BOTHRESH(2) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2009-10-27) CRTIME(11.32.50)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFPRESP(SYNC) DEFREADA(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR( ) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(2)
MAXDEPTH(5000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) PROPCTL(COMPAT)
QDEPTHHI(80) QDEPTHLO(20)
QDPHIEV(DISABLED) QDPLOEV(DISABLED)
QDPMAXEV(ENABLED) QSVCIEV(NONE)
QSVCINT(999999999) RETINTVL(999999999)
SCOPE(QMGR) SHARE
STATQ(QMGR) TRIGDATA( )
TRIGDPTH(1) TRIGMPRI(0)
TRIGTYPE(FIRST) USAGE(NORMAL)

Any thoughts, Thanks;

--

SJunejo
AIX-Queries

Posts: 20
Registered: Oct 07, 2008 05:45:59 AM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 05, 2009 10:10:30 AM   in response to: Glenns_Screen in response to: Glenns_Screen's post
 
Click to report abuse...   Click to reply to this thread Reply
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
Glenns_Screen

Posts: 399
Registered: Apr 17, 2006 11:58:20 PM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 05, 2009 07:54:42 PM   in response to: AIX-Queries in response to: AIX-Queries's post
 
Click to report abuse...   Click to reply to this thread Reply
>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?

MQ Extended Transactional Client is not free or included in MQ Server, you need to purchase it separately from IBM.
AIX-Queries

Posts: 20
Registered: Oct 07, 2008 05:45:59 AM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 06, 2009 05:49:23 AM   in response to: Glenns_Screen in response to: Glenns_Screen's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Gleens,

I sorted the problem actually by installing the 'Java Extended Transaction' which is part of the MQ Server installation. By default its opt out during installation phase. If we choose custom option and select this option which is under 'Java and Web Services' section, this will install the 'com.ibm.mqetclcient.jar' which we need to copy to our application server (jBoss) 'lib' directory and change my MDB ejb-jar.xml as follows;

ejb-jar.xml
<ejb-jar>
<enterprise-beans>
...
<trans-attribute>Container</trans-attribute>
...
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MDB_Name</ejb-name>
<method-name>*</method-name>
</method>
<!-- NotSupported|Supports|Required|RequiresNew|Mandatory|Never -->
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

Most Importantly, by default XA-Transactions are disblaed in WMQ adapter so created my Connection Factory For WMQ as follows (i.e. wmq-jmsra-ds.xml or watever file name we use)

<tx-connection-factory>
<jndi-name>wmq/myFC</jndi-name>
<xa-transaction>true</xa-transaction>
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<config-property name="hostName" type="java.lang.String">IP_Address</config-property>
<config-property name="port" type="java.lang.String">MQ_Listener_Port</config-property>
<config-property name="queueManager" type="java.lang.String">Queue_Manager_Name</config-property>
<max-pool-size>20</max-pool-size>
</tx-connection-factory>

and it solved the problem. Thanks

--
SJunejo
Glenns_Screen

Posts: 399
Registered: Apr 17, 2006 11:58:20 PM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 08, 2009 05:53:22 PM   in response to: AIX-Queries in response to: AIX-Queries's post
 
Click to report abuse...   Click to reply to this thread Reply
Be careful if you copy a com.ibm.mq*.jar file, as this creates a dependency that may break the app in the future. Its better to leave the jar where it was installed by MQ and include the directory in the classpath used by your app.
sjunejo

Posts: 47
Registered: Apr 14, 2009 04:23:53 AM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 08, 2009 06:21:51 PM   in response to: Glenns_Screen in response to: Glenns_Screen's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Glenns,

Thanks for the advice, I will keep this in mind :-).

But I am concern about the following;

I am using jBoss Application Server cluster with MQ Server. Cluster consist of two severs. First server is hosted on the same machine where MQ server is installed and running and I can add a path to '*.jar' in CLASSPATH but how would I use (reference) the same (jar) functionality in other instace of the application server which is running on the sepaerate machine?

Infact in production environment even MQ server will be (Should be) hosted on seperate machine as well so how would I refer the 'jar' which exist on seperate machine to even both (or in general) all the instances of the application server in cluster?

Thanks
--
Sjunejo
Glenns_Screen

Posts: 399
Registered: Apr 17, 2006 11:58:20 PM
Re: MQ Server - jBOSS Clustering - BOTHRESH and BOQNAME - Problem
Posted: Nov 09, 2009 07:16:50 PM   in response to: sjunejo in response to: sjunejo's post
 
Click to report abuse...   Click to reply to this thread Reply
Is the jar included in MQ Client? If yes, it is free and can be distributed within the terms of MQ Client licensing. If no, you will need to purchase a license for MQ Server on the second server.
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums