1 Reply Latest reply on May 26, 2004 10:55 AM by Adrian Brock

    JMS_JBOSS_REDELIVERY_COUNT must be Number

    Stephane Nicoll Master

      Apparently this thread was lost so I repost it.

      We are using JBoss 3.2.3, Postgresql as JDBC2PM.

      We have some processors (MDB) that read messages from queues and do some action. If it fails, the message is sent to an error queue with extra info in the aim we can 'repost' the mesage after a while (if the error is thrown because of missing info, etc).

      So for that we copy all properties in the original message and we invoke the processor with a Properties and text content which is XML).

      If the processor fails, it build a new TextMessage with the XML and copy all properties to the message.

      "Sometimes" we do have the following:

      Failed to send rejected instruction to the error queue
      javax.jms.JMSException: JMS_JBOSS_REDELIVERY_COUNT must be Number: 1
      at org.jboss.mq.SpyMessage.checkProperty(SpyMessage.java:434)
      at org.jboss.mq.SpyMessage.setStringProperty(SpyMessage.java:516)


      Having looked to the code, it checks if the parameter is an instance of Number. Why not trying to parse it back to a number and if a numberformatexception is thrown, just let it goes up nested in a JMSException?

      As far as I remember, the spec states that you could use either setStringProperty, or setIntProperty.

      How can I avoid this?

      Regards,

      Stephane