I am working on a JMS client server app where client first send some data to server through a common queue for all clients and server gives respond to it in a temporary queue created by client itself. I googled it but could not find how can I implement it in JMS 2 as the traditional approach of creating temporary queue is by using session but in JMS 2 I am using JMSContext through which I am creating producer and consumer. My question is how and where
Asked
Active
Viewed 344 times
1 Answers
0
In the JMS 2.0 JMSContext API the createTemporaryQueue and createTemporaryTopic server the same role as the traditional versions did in the JMS 1.1 Session style. The JMSContext is really just wrapping the ideas of Connection and Session into one object.
You also have all the same methods create creating messages and setting JMSReplyTo on them, in the consumer you need to consume a Message instance and then use the getJMSReplyTo to get at the reply queue

Tim Bish
- 17,475
- 4
- 32
- 42
-
Hey thanks for the reply. I actually did all of that you just said and it worked, but when I am creating producer in receiving class to send response to sender it is showing that client does not have permission to create producer. Why am I getting this error. I also have changed the permissions in accesscontrol file still getting that. – Yatin Gaikwad Jun 15 '17 at 20:59
-
You get the error when you don't have permission to create a producer, configure the broker and provide the right credentials so that you have permission to create the producer....then you can create the producer. – Tim Bish Jun 16 '17 at 02:50
-
I am using OpenMQ externally and not in glassfish. Where can I configure this broker. – Yatin Gaikwad Jun 16 '17 at 10:56
-
That's a topic for OpenMQ team or a new question here. – Tim Bish Jun 16 '17 at 12:56