Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic