• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

JMS Client and server restart?

 
Author
Posts: 131
7
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi forum:
I'm looking for a best-of practice here. If I have a very simple remote (not inside the j2ee server) jms client waiting for publications to a queue or topic, the client just sits there waiting. If the j2ee server is restarted, the client still just sits there. How can the client determine that the j2ee server has been restarted so it can re-connect itself?
Thanks,
Mike
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to check whether the JMS (actually Message queue) server is up, you can periodically lookup for the connecting factory in the directory server, if the factory is not bound you get a NamingException with a specific message, If you don't get that exception + message the JMS server might be up. But I am not sure whether the JNDI objects (like connection factory, destination) are unbound when the JMS server is shutdown, if not you can do an additional check when you create the respective connection objects.
reply
    Bookmark Topic Watch Topic
  • New Topic