• 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

'True' Singletons in Clustered EJB Servers

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Hoping that someone out there can help as I have hit a bit of a conceptual brick-wall
I am currently designing part of an application that will generate and send a batch of emails overnight. This process will be invoked by calling methods on a Stateless Session Bean from a 'Scheduler' task.
The interesting part is that this will need to be deployed in a clustered environment with multiple servers and multiple JVMs on each server. It is therefore vital that there is only ONE scheduler task running in the cluster so that the users don't receive multiple emails (i.e. one per JVM) however it must be resilient so that if any of the servers go down then the scheduler will automatically switch to another server.
The solution must run on a generic EJB1.1 platform.
Thanks in advance for any ideas
Andy Bowes
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel u should access the scheduler object using a JNDI rather than directly calling the object.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JMS might be an interesting approach, too. Underlying queue managers usually offer "persistent queues" or "assured delivery" that solve some problems with your singleton server availability. If the singleton is down, requests stay in queue until it comes back.
Could the singleton be in its own application that is not duplicated across the cluster?
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic