[
https://jira.jboss.org/browse/JBAS-7950?page=com.atlassian.jira.plugin.sy...
]
jaikiran pai updated JBAS-7950:
-------------------------------
Attachment: jbas7950.ear
JBAS-7950-source.tar.gz
Attached jbas7950.ear which reproduces this issue. Just place this .ear in the
default/deploy folder of AS6 (M4 or even AS trunk is fine). On server start, access
http://localhost:8080/jbas7950/test.jsp. That jsp just sends a message to queue/A which is
being listened to by the MDB. The MDB just prints out the delivery count and also
message.getJMSRedelivered() value (note that the call to that method always returns false
which indicates it's broken too) and intentionally throws an RuntimeException
@Override
public void onMessage(Message msg)
{
try
{
System.out.println("Delivery count: " + (++count));
System.out.println("Message re-delivered expected to be true, got : " +
msg.getJMSRedelivered());
}
catch (JMSException jmse)
{
// just log
System.out.println("Ignoring jmse: " + jmse.getMessage());
}
// intentionally throw exception
throw new RuntimeException("Intentional runtime exception");
}
After you access that jsp, watch the server console, you will notice that the message is
being redelivered continuously. You'll see the output similar to:
16:55:45,099 INFO [STDOUT] Delivery count: 3307
16:55:45,099 INFO [STDOUT] Message re-delivered expected to be true, got : false
16:55:45,099 ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException:
Intentional runtime exception
16:55:45,100 ERROR [HornetQMessageHandler] Failed to deliver message:
javax.ejb.EJBTransactionRolledbackException: Intentional runtime exception
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148)
[:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227)
[:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)
[:0.0.1]
...
I have also attached a JBAS-7950-source.tar.gz file containing the source of this example.
Can be built through Ant. Just run "ant" from the "build" folder.
It'll generate the .ear in the "dist" folder.
HornetQ keeps re-delivering the message infinitely on a failure to
deliver to MDB
----------------------------------------------------------------------------------
Key: JBAS-7950
URL:
https://jira.jboss.org/browse/JBAS-7950
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JMS (HornetQ)
Environment: AS trunk (hornetq 2.1.0 Beta2)
Reporter: jaikiran pai
Assignee: Tim Fox
Fix For: TBD
Attachments: JBAS-7950-source.tar.gz, jbas7950.ear
As discussed in the referenced forum thread, when HornetQ first fails to deliver a
message to a MDB, it continues to redeliver the message infinitely. Also note that the JMS
Message.getJMSRedelivered() is also broken - it keeps returning false even on a
redelivered message.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira