After the AH is launched, generally it can check out the current situation trying to connect
back to the Deployment Server. Depending on the response, the AH may switch to one of the
• It attempts to download and install the wanted application.
• The application has already been installed, so the AH launches it (this is modeled in
• Some management is needed, such as updating a JAR that is part of the application,
while this one is not running.
• It performs some management or configuration on itself.
• It exits. This case has not been reported on the diagrams because it has little information.
However, it is nevertheless needed. Some AH can shut off the launched application as
well. This is the case with Application Containers.
We have three new phases that replace the AH Execution one, as shown in Figure 2.3. This fig-
ure shows a more refined model as well. Also, in the following diagrams, the arrows back to
the AC Check-Out Phase haven't been reported for clearness.
We are using the word “application” as a synonym for “Java executable”; that is, a
Java program that could be executed by a JVM on a given client platform. We are not
limited to Java applications, but we include all sorts of programs—such as servlets,
applets, and Java code running on embedded systems.
Another important piece that is still missing is what goes on in the Application Execution
Phase. Whenever the AH has to launch the application, it must launch the JVM, passing it the
proper parameters (classpath, other parameters, and so on). Even before that, the AH must
ensure that the JRE has been correctly set up, required optional packages (formerly known as
extensions) have been properly installed, and native libraries have also been correctly set up.
Generally speaking, the AH could be implemented in Java itself, so probably the JRE launch
would happen before. However, this is a special case, regarding only the AH, not the applica-
tion to be launched. So, after a JRE Preparation Phase (care of the AH), the application could
be finally launched. During the application execution, some library could be needed (this
mechanism is similar to the lazy class loading performed by the JVM: Items are loaded when
needed, not before), so the AH takes care of downloading and installing them. We have a
Resource Installation Phase that is very similar to the other installation phases.