The standard JMS api provide a way for you to send message with priority to a Queue. Read upon JMS tutorial, and have a look at the http://download.oracle.com/docs/cd/E17477_01/javaee/5/api/javax/jms/MessageProducer.html#setPriority(int)
Thanks for the your response.I want to give the priority to the queue not from producer level.I want the priority to the queue from MDB level(consumer level).
Not sure what you want. You need to read upon what JMS priority means and be used.
Priorioty on a msg in a queue is set when a producer sends it. The priority affects which msg gets delivered to the consumer(s) of the Queue first.
So if you are consumer(MDB), you are receive a msg with the priority already set, at that point it's a read only attribute.
Again checkout a JMS tutorial on the correct usage.
Thanks fo the information.