2

I'm looking for a simple HA singleton implementation in Java. I just need to ensure that there is always exactly 1 instance of service running in a cluster. Is there any stable implementation not based on app server? I thought I could use transactional cache (Infinispan) but can't find implementation with node election and failover.

Edit: I am aware of using application server. I'm migrating to JBoss EAP 6 and HA singleton implementation changed significantly compared to EAP 5. Now it makes you create MSC services manually. I'm looking for something that is not dependent on application server internals.

Piotr Gwiazda
  • 12,080
  • 13
  • 60
  • 91
  • What you want is the functionality provided by an AppServer. Why so you explicitly rule that out? What is your environment? Please elaborate. – Markus W Mahlberg Jun 20 '14 at 08:37
  • If you are looking to execute some task in a pool of instances, then you can use JGroups. Sample implementation can be found at http://speakingjava.blogspot.in/2014/10/how-to-execute-singleton-task-in-cluster.html – Pragalathan M Oct 16 '14 at 16:06

0 Answers0