History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-11
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Colin Crist
Reporter: Bernhard Neuhauser
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Send TextMessage leads to Unsupported priority '-1': priority must be from 0-10

Created: 10/Jan/07 03:06 AM   Updated: 21/Sep/11 04:01 PM
Component/s: None
Affects Version/s: 1.12
Fix Version/s: 1.12

Tested with JRE 1.5.0_09-b03 and 1.6.0-b105
Hermes 1.12 Snapshot from http://hermesjms.com/patches/ 2007_01_09

 Description  « Hide
  1) select a jms topic (jms => sessions => session => topic)
  2) Messages =>send ... => send TextMessage
  3) select textfile => send
Leads to the following error:
JMSException: Unsupported priority '-1': priority must be from 0-10

Seems to be v1.12 related and not a side affect of JRE 6.

 All   Comments   Change History      Sort Order:
Colin Crist [10/Jan/07 09:19 AM]
Whats your JMS provider? Is this something that used to work for you in a previous version? Can you provide a stack trace? Look in the About box to find out where you're logging to.

I've just tested with ActiveMQ and EMS and they both work - ActiveMQ has a default JMSPriority of 0 and EMS defaults to 4.

Hermes does not set the priority when sending text messages from files as can be seen in the invoke() method here:


which calls Hermes.createTextMessage() which is implemented here (line 294):


btw, I've just updated the SNAPSHOT to include http://hermesjms.com/jira/browse/HJMS-12 which may help you

Bernhard Neuhauser [11/Jan/07 03:21 AM]
Verified your latest snapshot. Got the same behavior.

Digged little bit into your sources. I think that the cause of my problem is that you changed line 607 in

> sender.send((Queue) d, m);
> sender.send((Queue) d, m, m.getJMSDeliveryMode(), m.getJMSPriority(), m.getJMSExpiration());

Currently im using the default jms from jboss AS 4.0.5, which is JbossMQ.

A little StandaloneTest with jbossMQ:
> System.out.println("default priority = " + session.createTextMessage().getJMSPriority());
leads to
> default priority = -1

p.s. subversion would be neat - easy to check out sources behind a firewall.

Colin Crist [11/Jan/07 04:11 AM]
I see, so getJMSPriority() on an unsent JBossMQ message that has not had its priority explicitly set returns an invalid priority.

I've changed the code so that it will set a priority of 0 if getJMSPriority() < 0 and a TTL of 0 if getJMSExpiration() < 0 as well for good measure and pushed out a new snapshot. A quick test before and after this change with JBoss 4.0.3 shows the issues and that this fixes it.

I've been meaning to subversion for a while now, I've added an issue to JIRA for it...

Bernhard Neuhauser [11/Jan/07 05:25 AM]
:o) works well with your latest Snapshot.

thx for your effort