6 Replies Latest reply on Jul 24, 2009 9:15 AM by Sheeraz Junejo

    Message not re-delivered to Specified OR Default DLQ

    Sheeraz Junejo Newbie

      Hi,

      I have some strange problem here. I am using jboss 4.2.3GA with jboss messaging 1.4.

      I have defined deployed following destination using '/farm' method in my cluster consist of two nodes as follows

      *-destination-service.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
      
       <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=t24OFSQueue"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="Clustered">true</attribute>
       <attribute name="MaxDeliveryAttempts">1</attribute>
       <attribute name="RedeliveryDelay">0</attribute>
       <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=t24OFSDLQ</attribute>
       </mbean>
      
       <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=t24OFSDLQ"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="Clustered">false</attribute>
       </mbean>
      
       <mbean code="org.jboss.jms.server.destination.QueueService"
       name="jboss.messaging.destination:service=Queue,name=t24OFSReplyQueue"
       xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="Clustered">true</attribute>
       </mbean>
      </server>
      
      


      Above will successfuly deploy following three queues and my MDB's are successfuly binding to it.

      Request Queue : t24OFSQueue
      Response Queue: t24OFSReplyQueue
      Custom DLQ : t24OFSDLQ

      Now problem is when my MDB fails to post message to destination the message should get redirected to my custom DLQ but its NOT and jboss console shows me following exception only in which there is not even name of redirection or anything. ***** Strange thing is the message is not even redirected to default DLQ (queue/DLQ) created by jboss messaging destination-service.xml******

      10:57:33,543 WARN [JBossMessageProducer] JBoss Messaging does not support disabling message ID generation
      10:57:33,651 ERROR [STDERR] 24-Jul-2009 10:57:33 com.jbase.jremote.io.JRemoteSocketConnection send
      WARNING: Failed to write message
      10:57:33,655 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6755f302[state=NORMAL mc=com.jbase.jremote.jc
      a.JRemoteManagedConnection@66b378c2 handles=0 lastUse=1248428656709 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@10bd3d3b context=org.j
      boss.resource.connectionmanager.InternalManagedConnectionPool@77fef512 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@38bae4a txSync=null]
      com.jbase.jremote.JRemoteException: Failed to write message - Connection reset by peer: socket write error
       at com.jbase.jremote.io.JRemoteSocketConnection.send(JRemoteSocketConnection.java:103)
       at com.jbase.jremote.io.InterceptorConnection.send(InterceptorConnection.java:89)
       at com.jbase.jremote.io.AbstractJRemoteConnection.sendWaitForResponse(AbstractJRemoteConnection.java:47)
       at com.jbase.jremote.io.JConnectionImpl.time(JConnectionImpl.java:281)
       at com.jbase.jremote.jca.JRemoteManagedConnection.isAlive(JRemoteManagedConnection.java:341)
       at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.matchManagedConnections(JRemoteManagedConnectionFactory.java:177)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:213)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
       at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(JRemoteConnectionFactoryImpl.java:121)
       at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(JRemoteConnectionFactoryImpl.java:104)
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.sendMessage(OFSMessageMDB.java:118)
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.onMessage(OFSMessageMDB.java:74)
       at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
       at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
       at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
       at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
       at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
       at org.jboss.ejb.Container.invoke(Container.java:960)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
       at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
       at java.lang.Thread.run(Thread.java:619)
      10:57:33,738 WARN [JBossManagedConnectionPool] Destroying connection that could not be successfully matched: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@67
      55f302[state=DESTROYED mc=com.jbase.jremote.jca.JRemoteManagedConnection@66b378c2 handles=0 lastUse=1248428656709 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManage
      dConnectionPool$OnePool@10bd3d3b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@77fef512 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXARes
      ource@38bae4a txSync=null]
      10:57:34,736 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      javax.resource.ResourceException: Could not connect to remote jBASE instance - Failed to connect to host [127.0.0.1], port [20005]
       at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.connect(JRemoteManagedConnectionFactory.java:145)
       at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.createConnection(JRemoteManagedConnectionFactory.java:99)
       at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.createManagedConnection(JRemoteManagedConnectionFactory.java:93)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
       at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(JRemoteConnectionFactoryImpl.java:121)
       at com.jbase.jremote.jca.JRemoteConnectionFactoryImpl.getConnection(JRemoteConnectionFactoryImpl.java:104)
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.sendMessage(OFSMessageMDB.java:118)
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.onMessage(OFSMessageMDB.java:74)
       at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
       at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
       at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
       at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
       at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
       at org.jboss.ejb.Container.invoke(Container.java:960)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
       at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: com.jbase.jremote.JRemoteException: Failed to connect to host [127.0.0.1], port [20005]
       at com.jbase.jremote.io.JRemoteSocketConnection.connect(JRemoteSocketConnection.java:94)
       at com.jbase.jremote.io.JRemoteSocketConnection.<init>(JRemoteSocketConnection.java:63)
       at com.jbase.jremote.jca.JRemoteManagedConnectionFactory.connect(JRemoteManagedConnectionFactory.java:124)
       ... 44 more
      10:57:34,850 ERROR [STDERR] 24-Jul-2009 10:57:34 com.temenos.ofsmessage.mdb.OFSMessageMDB sendMessage
      SEVERE: Could not connect to remote jBASE instance - Failed to connect to host [127.0.0.1], port [20005]
      10:57:34,889 ERROR [LogInterceptor] RuntimeException in method: public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message):
      java.lang.RuntimeException: Could not connect to remote jBASE instance - Failed to connect to host [127.0.0.1], port [20005]
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.onMessage(OFSMessageMDB.java:91)
       at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
       at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
       at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
       at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
       at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
       at org.jboss.ejb.Container.invoke(Container.java:960)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
       at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
       at java.lang.Thread.run(Thread.java:619)
      10:57:34,964 ERROR [JMSContainerInvoker] Exception in JMSCI message listener
      javax.ejb.EJBException: RuntimeException
       at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:417)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
       at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
       at org.jboss.ejb.Container.invoke(Container.java:960)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1092)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
       at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
       at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
       at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
       at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
       at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
       at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.RuntimeException: Could not connect to remote jBASE instance - Failed to connect to host [127.0.0.1], port [20005]
       at com.temenos.ofsmessage.mdb.OFSMessageMDB.onMessage(OFSMessageMDB.java:91)
       at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
       at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
       at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
       at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      


      what about the first line before exception. Is it serious warning...??

      Any thughts on this please..... :)

        • 1. Re: Message not re-delivered to Specified OR Default DLQ
          Yong Hao Gao Master

          Hi, the warning doesn't matter. It tells you that calling setDisableMessageID() on JBossMessageProducer doesn't take effect.

          It looks like it' s your network problem.

          • 2. Re: Message not re-delivered to Specified OR Default DLQ
            Sheeraz Junejo Newbie


            Network Problem!!!

            No...I failed my MDB INTENTIONALY... I mean i stoped my Database server listner on port 20005 so my MDB will fail to post message and mesage should get redirected to custom or even default DLQ where one more of my MDB is waiting to fetch message from DLQ and post it port 20003 on the same or anyother instance of database server on any port or address using my DLQ resource adaptor.

            Above is one of my FailOver requirements when one of the database server goes down.

            Exception for connection to 127.0.0.1 on port 20005 is from my resource adaptor which is been used by my default MDB(Normal flow when everything is UP and running and HAPPY)

            Hope this helps....:-)

            • 3. Re: Message not re-delivered to Specified OR Default DLQ
              Andy Taylor Master

              Your config looks correct.

              Make sure your MDB's are using XA and you are looking up the correct connection factory, i.e. 'java:/JmsXA'

              • 4. Re: Message not re-delivered to Specified OR Default DLQ
                Sheeraz Junejo Newbie

                hmmm.... thats something new.Where do I have to change my config????

                Following are my ejb-jar.xml and jboss.xml used in MDB.

                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>
                 <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>
                 <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

                <?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>
                 <ejb-name>OFSMessageMDB</ejb-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>
                 </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>
                 <ejb-name>OFSMessageMDB_DLQ</ejb-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>
                 </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>
                


                • 5. Re: Message not re-delivered to Specified OR Default DLQ
                  Andy Taylor Master

                  fyi MDB's are not part of the messaging project, they are part of the Application Server.

                  However,

                  You are using bean managed transactions which means the delivery of the messages to the MDB are outside the scope of the bean managed transaction. This makes sense if you think about it because you will be beginning the tx inside you MDB onMEssage.


                  You need your MDB to be Container manages with a transaction type of 'REQUIRED'. Also when you lookup the connection factory inside your MDb for sending you need to look up the correct one. Usally this is mapped to 'java:/JmsXA'. Doing this means that the delivery of the message and anything you do in your MDB are involved in the same tx, i.e. 1 fails both fail.

                  • 6. Re: Message not re-delivered to Specified OR Default DLQ
                    Sheeraz Junejo Newbie

                    Hi Andy,

                    Thanks for you help. It solved the problem.

                    I have to change following xml in my MDB to get this thing work.

                    jboss.xml to use 'java:/jmsXA' connection factory instead of 'java:/ConnectionFactory'.

                    ejb-jar.xml

                    Add the following lines in the end of file.

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


                    Thanks again :-)