Forums Register Login

JMS Question

+Pie Number of slices to send: Send
Hello All,

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?

Thanks

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 ]
+Pie Number of slices to send: Send
Are client and server located in the same VM? Otherwise they won't be able to share static instances...

Greetz
Puba
I love a woman who dresses in stainless steel ... and carries tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 489 times.
Similar Threads
java.io.notserializable Exception HELP
[JMS] communication between producer-consumer, different vendors
JMS
the question of the lockmanager
JMS Message Destination Reference Exception
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:05:29.