I've been asked to port an existing Java app that runs as a windows service to run on Websphere. It is implemented using JavaService.exe and a stop_method
The type signature of the parent service class is:
public abstract class ParentService {
public static void main(String args[]);
public void requestStop();
}
Note that the main
method in the example above is the equivalent of the init
method in a servlet (although it is static) - it is used for the same purpose.
What is the equivalent parent class for a continuously running object in the J2EE standard (or even in the Websphere custom standards?)
Assuming the big idea is mapping an
init
and ashutdown
method to a Java interfaces in the Enterprise standards...It turns out there are four alternatives (and three vendor specific ones):