Ericsson has submitted JSR-319: Availability Management for Java to the Java Community Process (JCP). According to the JSR,
The purpose of the Availability Management for Java is to enable availability frameworks to supervise and to control Java runtime units in a standardized way. The API has the following goals:
- - It shall not specify the availability management framework itself but it shall only specify the means by which the framework can supervise and control the Java units within a JVM. The means by which the framework instantiates JVMs and communicates with the JVMs are outside the scope of the specification. The specification will define the local interactions within one JVM only.
- - It shall allow different service providers to provide support for specific availability frameworks, standardized or proprietary. It is required that a service provider for the standardized AMF (Availability Management Framework) of SA Forum shall be feasible.
- - It shall be designed with Java EE as the main target, although parts of the specification will also be useful on Java SE. The specification has to consider the constraints set by the component models of Java EE.
- - It shall specify a basic set of features that can be considered as useful for Java EE and possible to support by most availability management frameworks. This implies that only a subset of the features of AMF will be supported.
- - It shall support Java EE applications that are not at all, to some extent or completely aware of the control of the availability management framework. It is anticipated that the main part of the specification is implemented in the Java EE server and that existing Java EE applications can take advantage of the availability support without any changes.
- - It shall not handle all aspects of clustered Java systems. Especially it shall not specify any state replication solution, although it may specify that the API can give hints to such replication solutions in the form of reasons for the activation or the deactivation of a unit.
The specification is anticipated to contain the following features:
- - The Java runtime system is considered to consist of different availability units that can be supervised and controlled by the service provider. The provider can create, activate, deactivate and destroy an availability unit. An availbility unit may be mapped to a Java EE application.
- - A root availability unit maps on all services that are not modelled as regular availability units. It represents the server instance. A failure of the root availability unit is considered to cause a failure of all the other availability units also.
- - An availability unit may support health checks and it can report failures to the service provider.
- - An availability unit may subscribe for state changes of peer units in other JVMs.
- - An availability aware Java EE application shall get a callback reference via JNDI or injection and it shall get application lifecycle method invocations or notifications containing a reason argument.
If it's not too overly complex (though what are the chances of that? This is JEE after all) I could use this. Currently I'm just writing bash scripts to check if the VM is still running. Comments are due by October 29.