Results 1 to 6 of 6

Thread: Jms

  1. #1
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default Jms

    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
    Last edited by Cbani; 03-22-2010 at 12:16 PM.

  2. #2
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    any quick reply guys?

  3. #3
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    is this not the right forum for jms?

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    You set the priority on the MessageProducer.send method
    i.e
    Java Code:
    producer.send(message, DeliveryMode.PERSISTENT, priority, 0);
    Note that the JMS provider is not mandated to do anything with those priorities.

  5. #5
    Cbani is offline Member
    Join Date
    Jan 2010
    Posts
    90
    Rep Power
    0

    Default

    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.

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •