I am new to JMS and I am in this situation to fix something with JBoss and JMS messaging. I am using JBoss 3.2.5 and windows XP, Java 1.5 beta. There is one client and a server, which have their own main class to start. Both of them implemented a messageListener interface which has an onMessage() method.
The problem is that TopicMessageListener.instance returns a static instance and I thought this instance is available to both client and server. No matter who (client/server) is started first, the second will use the same instace.
However when I start the client, there is an instace of TopicMessageListener, and when I start the server, another copy of TopicMessageListener is created.
Anybody can help on this? How can both the client and server share this static instace of TopicMessageListener?
P.S client and server, they are not EJB or MDB. They are just normal java classes.
[ December 14, 2004: Message edited by: Karen Chen ]
[ December 14, 2004: Message edited by: Karen Chen ] [ December 14, 2004: Message edited by: Karen Chen ]