Friday, March 03, 2006

spawn JVM via RMI

Creating an Activatable Remote Object: "The RMI daemon, rmid, provides a Java virtual machine* (JVM) from which other JVM instances may be spawned."

This technique can be used to implement fail-over scenarios. Using the rmid to spawn a JVM you have to keep in mind that, if you are using just ONE rmid, this would be single point of failure (SPOF)!

Another possibility to start a NEW JVM is to use the classes provided in the ANT framework. If you have a look to the source code of the Ant Task and trace back to the point where a new JVM is startet you will find the class Execute, with which it is possible to start a completly new JVM (FORK).

No comments: