Ok, found my own answer. You just pass "null" as the Desintation:
replyProducer = session.createProducer(null); Duh! Oh well, can't be smart all the time:-) mjparme wrote: > > This may be more of a general JMS question rather than Active MQ, but > hopefully people will help me out anyway. I read this doc: > > http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html > > Seems easy enough except how do I create a MessageProducer that is not > associated with a Destination? The JavaDoc for MessageProducer evens > mentions you can use a producer without a destination to implement > request/response: > > "A client also has the option of creating a message producer without > supplying a destination. In this case, a destination must be provided with > every send operation. A typical use for this kind of message producer is > to send replies to requests using the request's JMSReplyTo destination." > > However, I don't see any method that lets me create a MessageProducer > without associating it with a Destination. The only Session method I see > is createProducer() and it takes a Destination parameter. So how do I > create a message Producer that isn't associated with a Destination so I > can set the Destination on every send? > > -- View this message in context: http://www.nabble.com/Request-Response-with-JMS-tf3602957s2354.html#a10065648 Sent from the ActiveMQ - User mailing list archive at Nabble.com.