I have to call the onMessage Method of my
messageListener when the message arrives at the queue.
The messageListener and the Server are on the
different machines.
So I guess the messageListener should be passed by
Referance .If it has to be passed by refearnce we
should use RMI. But From the source code it doesn't
appear so.
So is there any other way to do this.
Can anybody told me how this is acheived.
Regards,
Anjali
My server is running on machine1.
We have a class Test which implements
MessageListener on another machine2.
/****************/
import java.io.*;
import javax.jms.*;
public class Test implements MessageListener
,Serializable
{
Test()
{
System.out.println("in test()");
}
public void onMessage(javax.jms.Message message)
{
System.out.println("in onMessage of brijesh
machine()");
}
}
/********************************/
and a receiver programme which is also running on
machine2 . The test is set for this listener.
/*********/
Test test = new Test();
receiver.setMessageListener(test);
/**************/
I want to know how the JMS server hand over the
message object to the perticular messageListener (
test)
The server must be having either the test with it or
a referance of the test on machine2.
So how the messge listener(test) object is passed to
the server , by referance or by value?
The System.out.println statement in the onMessage() of
test t gets printed on the machine2.
I guess if it is passed by value then print statement
should be get printed on machine1 and if it is passed
by referance then it should be get printed on machine2
.But from the source code I
could not get any clue so as to How it is being passed
by referance?
So could anybody tell me how exactly the
setListener() works.
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development