Entering content frame

Process documentation Application Class Loading Locate the document in its SAP Library structure

Purpose

This process describes how the J2EE Engine treats an application during application deployment and starting processes.

Process Flow

Application Deployment on J2EE Engine

...

       1.      A temporary EARClassLoader extracts the application EAR file, or application archive components you want to deploy, to a temporary directory. The temporary EARClassLoader registers references to all the components necessary for deployment. EARClassLoader is a standard resource class loader, which is registered in the J2EE Engine Class Loading System at deployment. It provides containers with the same functions that the real class loader of the application has when the application is started.

       2.      Each container obtains and uses this class loader to load application classes.

       3.      The system allocates different application components to the appropriate containers based on the information provided by the application deployment descriptors (application.xml, application-j2ee-engine.xml), and the file name and file extension of the components archive files.

       4.      The application is locked in the cluster when it performs any of the actions – deploy, update, remove, start and stop.

       5.      The system creates a database configuration for storing container-specific persistent information about the application.

       6.      At this step, the system performs the actual application deployment. It is a transactional process and can be committed or rolled back.

       7.      If the application is deployed successfully on the containers (the transaction is committed), the database configuration is stored to the database. If the transaction is rolled back, temporary information about the application is discarded and the application deployment fails.

       8.      A notification message that the application is deployed is sent to all other server components in the cluster to notify local containers of the availability of this application.

Starting a Deployed Application

...

       1.      Each container downloads its application files from the database to the local file system.

       2.      An ApplicationClassLoader is created to load the application classes. This is a standard resource class loader, which is registered in the J2EE Engine’s Class Loading System at the application start, and it remains there until the application is stopped. It registers references to all the components that the application needs by providing references to their class loaders.

       3.      The application is actually started. It is a transactional process too.

       4.      The application is successfully started only if the transaction has been committed. If the transaction is rolled back, the application is returned to stopped state.

Note

During application starting, all referenced applications, services, interfaces or libraries are checked. If the application has some hard references to components that are not started, the Deploy Service sets the application to the ImplicitStop state. This means that the application will be started automatically as soon as all referenced components are available.

 

 

Leaving content frame