0 Replies Latest reply on Jul 26, 2005 3:55 PM by Ross Cooksey

    Message redelivery not working in 4.0.1sp1

    Ross Cooksey Newbie

      Message redelivery doesn't seem to be working in 4.0.1sp1. The twist is that the same code base works in 4.0 and 4.0.2.

      ejb-jar.xml contents





      mdb code:

      public void onMessage(javax.jms.Message message) throws EJBException {
      ObjectMessage objectMessage = (ObjectMessage)message;
      try {
      if (objectMessage.getObject() instanceof Event) {
      Event event = (Event)objectMessage.getObject();
      log.info("Received event of type " + event.getEventType());
      } catch (Exception e) {
      log.severe("Failed to process event: " + ServicesException.getPrintStackTraceAsString(e));

      Client code:

      public static void postMessage(String queueConnectionFactory, String queueName, Serializable object, String url) throws Exception{
      Connection connection = null;
      try {
      Context jndiContext = getContext(url);
      connection = getConnection(jndiContext, queueConnectionFactory);
      Destination destination = (Queue) jndiContext.lookup(queueName);
      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      MessageProducer messageProducer = session.createProducer(destination);
      ObjectMessage message = session.createObjectMessage();
      }catch (Exception e) {
      throw e;
      if (connection != null )

      When restarting jboss the logs would seem to indicate that the messages still reside in persistant storage (hypersonic in this case). Interesting that the redelivery count is greater than the limit.

      15:42:54,573 WARN [AbstractDLQHandler] Message redelivered=10 max=3 sending it
      to the dlq org.jboss.mq.SpyObjectMessage {
      Header {
      jmsDestination : QUEUE.EventsQueue
      jmsDeliveryMode : 2
      jmsExpiration : 0
      jmsPriority : 4
      jmsMessageID : ID:3-11223164246971
      jmsTimeStamp : 1122316424697
      jmsCorrelationID: null
      jmsReplyTo : null
      jmsType : null
      jmsRedelivered : true
      jmsPropReadWrite: false
      msgReadOnly : true
      producerClientId: ID:3

      A little help would be appreciated (going back to 4.0 or upgrading to 4.0.2 not an option as this time)