Can TemporaryTopic be passed in RMI method invocation?
1 posts in topic
Flat View  Flat View

Posted By:   Richard_Shea
Posted On:   Thursday, July 18, 2002 03:43 PM

What I'd like to do is for a client to create a TemporaryTopic that it will create a listener for and pass it as an argument in a call made to the server. The purpose is for the server to be able to feed back information about the progress of the operation back to the client.

My feeling is that this may be a problem since it is only a requirement that the JMS provider implement their Topic classes such that they can be found via JNDI and there is no requirement (from what I can tell) that the class implementing the TemporaryTopic interface implement java.io.Serializable or java.rmi.Remote .

Re: Can TemporaryTopic be passed in RMI method invocation?

Posted By:   Gautam_Marwaha  
Posted On:   Thursday, July 18, 2002 09:51 PM

For the functionality you require, it may not be necessary to pass anything to the server.

The server can listen to a known queue, say Q. A client can create a TemporaryQueue (say q), create a message to be sent to the queue Q (on which server is the consumer), set the message.setJMSReplyTo(q) before sending out the message over Q. The server will receive this message from Q, will call message.getJMSReplyTo() to obtain the destination (which will be q) over which it will now start conversation with the client. Also, if reqd, the server can send message over the temp queue q by setting the correlationID with the value of the JMSMessageID of the client't message which will allow the client to know what message the server is replying to.

About | Sitemap | Contact