• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS Question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are client and server located in the same VM? Otherwise they won't be able to share static instances...

Greetz
Puba
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic