Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server can't post to a TemporaryQueue created by the client

 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yet another JMS question from me :-)
Server WebLogic 7.0
Client JDK 1.4
OS: Win2000 on both machines
I followed the example from O'Reilly's JMS book (first edition). Pages 60-69 give an example as follows. The Wholesaler class does a JNDI lookup for a topic. It also creates a TempoaryTopic (buyOrdersTopic) intended for replies from the Retailer class. When a JMS message is sent from the Wholesaler class to the Retailer class, the JMSReplyTo field is set to the buyOrdersTopic TemporaryTopic.
The Retailer class, upon receiving a message extracts this TemporaryTopic. It then creats a publisher for that topic (note: it does so using a local session object), and publishes its reply to that topic, to send a message back to the Wholesaler class.
I've tried to do the same thing, but using Queue's instead of Topics. It looks correct. My client creates a topic, which is sent to the server which then stores the topic under the userID in a table. I print out the name of the topic on the client, right before I sent it to the server, as well as on the server, right before I reply to the client. The queue names are the same. I can also find the queue listed as active, under WebLogic admin console, however no messages are set to it. I also know that no exceptions are thrown during the sending, and the catch blocks do nothing, and the line after the send prints to the screen.
Any ideas? My code is below. Any help is, as always, greatly appreciated.
--Mark
Client Registration

Server Reply (stateless session bean)

[ December 30, 2002: Message edited by: Mark Herschberg ]
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some further testing reveals something interesting.
I modified both the client and the server to send a text message to the queue as soon as that had a reference to it. No luck. According to WebLogic, the temporary queue has still received no messages. However, at the end of the client method I listed above, I added a QueueBrowser to peek into the queue.

To my surprise, it printed out:

Where "hi" is sent by the server and "client" is sent by the client. So the messages are going to the queue. It's just that WebLogic isn't aware of it, and my client isn't picked it up. (I have confirmed that there is a registered listener to the queue, by calling getMessageListener().getClass().toString()
I'm still not sure why it's only partially worked, as noted above, and not fully working as expected.
--Mark
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll bet the problem is that the TemporaryQueue is using a pull model instead of a push model. I'm posting a question about how to set the push/pull model for TemporaryQueue's under WebLogic, here.
--Mark
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh son of a *&%#! The problem was that I forgot to call start() on the QueueConnection. Boy is WebLogic unhelpful!
--Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic