[jboss-jira] [JBoss JIRA] Created: (JBMESSAGING-1284) Redelivery delay does is not followed when runtime exception is thrown in asynchronous receive( onmessage in an MDB)
Jay Howell (JIRA)
jira-events at lists.jboss.org
Tue May 6 10:41:22 EDT 2008
Redelivery delay does is not followed when runtime exception is thrown in asynchronous receive( onmessage in an MDB)
--------------------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-1284
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1284
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.4.0.SP3_CP01
Reporter: Jay Howell
Assigned To: Tim Fox
When throwing a runtime exception out of the onmessage in an mdb and setting the redelivery delay in the message, the redelivery delay is not followed. The following code sets the redelivery delay..
QueueConnection queueConnection = null;
QueueSession queueSession = null;
QueueSender sender = null;
try {
queueConnection = ActionUnitWorkflowCreateQueueUtil.getQueueConnectionFactory().createQueueCo nnection();
queueSession = queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
Queue queue = ActionUnitWorkflowCreateQueueUtil.getQueue();
ActionUnitWorkflowCreateMessage awMsg = new ActionUnitWorkflowCreateMessage(au.getId());
ObjectMessage message = queueSession.createObjectMessage(awMsg);
message.setLongProperty("JMS_JBOSS_REDELIVERY_DELAY", 30000);
message.setLongProperty("JMS_JBOSS_SCHEDULED_DELIVERY",
System.currentTimeMillis()+10000);
sender = queueSession.createSender(queue);
sender.send(message);
queueSession.commit();
} catch (Exception e) {
log.error("Error occurred sending action unit create message for action unit" + au.getId(),e);
} finally {
sender.close();
queueSession.close();
queueConnection.close();
I understand that RuntimeExceptions should not be thrown out of the onmessage in an MDB and the spec all but prohibits it, but if something nasty like a null pointer is thrown out of the onmessage, the redelivery delay should probably still be followed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list