[jboss-jira] [JBoss JIRA] Closed: (JBMESSAGING-1284) Redelivery delay does is not followed when runtime exception is thrown in asynchronous receive( onmessage in an MDB)

Tim Fox (JIRA) jira-events at lists.jboss.org
Mon Sep 22 05:08:21 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBMESSAGING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Fox closed JBMESSAGING-1284.
--------------------------------

    Fix Version/s: Unscheduled
                       (was: 1.4.1.GA)
                       (was:  1.4.0.SP3.CP04)
       Resolution: Rejected


> Redelivery delay does is not followed when runtime exception is thrown in asynchronous receive( onmessage in an MDB)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBMESSAGING-1284
>                 URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1284
>             Project: JBoss Messaging
>          Issue Type: Bug
>    Affects Versions: 1.4.0.SP3_CP01
>            Reporter: Jay Howell
>            Assignee: Tim Fox
>             Fix For: Unscheduled
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list