I have a scenario where in I want to set the JMSPriority something other than the default value 0-9.
Can I do the same by any how?
If yes, how can I proceed on this?
Any quick reply would really be helpful
Thanks in Advance,
Cbani
Printable View
I have a scenario where in I want to set the JMSPriority something other than the default value 0-9.
Can I do the same by any how?
If yes, how can I proceed on this?
Any quick reply would really be helpful
Thanks in Advance,
Cbani
any quick reply guys?
is this not the right forum for jms?
You set the priority on the MessageProducer.send method
i.e
Note that the JMS provider is not mandated to do anything with those priorities.Code:producer.send(message, DeliveryMode.PERSISTENT, priority, 0);
this is the way i am setting the priority and sending the message.
[CODE]newMessage.setJMSPriority(pLevel);
jmsQueueSender.sendMessage(newMessage);[/QUOTE]
and here i am not able to set the "pLevel" to anything other than 0-9.
Hope, i am able to make my question clear.
That is the wrong approach. The correct approach is what I have shown you above. That setter should not be used by you (it's used by the container). It's just ignored if you set it yourself.
You can only set the levels to between 0-9. Why do you need other levels?
As I said before too, remember this property may be ignored so don't bank your life savings on it.