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.