Initialization
When an Application Arbortext PE Context receives a request, it first determines that the request specifies f=java, then examines the class parameter to see if this is the first time the class has been invoked since the Sous-processus Arbortext PE started. If so, the Application Arbortext PE Context loads the Java class into the Sous-processus Arbortext PE's embedded Java Virtual Machine. In order for this to happen, the Application Arbortext PE class must be present in a custom\classes directory either as a .class file or as a member of a .jar file. After loading the application, the Application Arbortext PE Context calls its init method and passes a parameter specifying an instance of com.arbortext.e3.E3ApplicationConfig, allowing the Arbortext Publishing Engine application to access configuration information from e3config.xml. The configuration parameters include the global parameters plus any other parameters defined for the Sous-processus Arbortext PE pool, both defined in e3config.xml.
If initialization succeeds and the init method returns normally, then the Application Arbortext PE Context passes the request to the Java application's doGet or doPost method.
If any error is detected, the init should throw an exception. In that case, the Application Arbortext PE Context will return an error to the Arbortext PE Request Manager.
If a Java Application Arbortext PE initializes successfully, the Application Arbortext PEContext will retain a reference to the application object. If the Arbortext PE Request Manager sends another request for the same application, the Application Arbortext PE Context will again invoke the doGet or doPost method. The Application Arbortext PE Context will not create another instance of the application object, nor will it call the application’s init method again.
If a Java application fails to initialize (meaning its init method throws an exception), the Application Arbortext PE Context will discard the application object. It will not call the object's destroy method. If the Arbortext PE Request Manager sends another request for the same application, the Application Arbortext PE Context will allocate another new object and call its init method. Depending on the condition which caused the first call to throw an exception, this attempt could succeed or throw another exception.
Est-ce que cela a été utile ?