|
|
A Java server is represented by one or multiple JAR archives containing all the application class files needed for the server to execute. Multiple JARs can be specified at boot time in UBBCONFIG
or added at runtime. The JAR file can be built either from buildjavaserver
tool or ejbc
tool.
The WebLogic Enterprise (WLE) Server implementation class has initialize
and release
methods for handling the startup and shutdown classes. As the initialize
method of the Server implementation class is invoked with the application arguments passed in immediately after the JAR file is loaded at JavaServer startup, so any server initialization and startup functions can be performed there. The release method will be called when java server is shut down. The name of the startup/shutdown classes, and the startup arguments can be specified as the application arguments after the jarfile name in MODULE attribute [WLE ADMINFS] in SERVERS section of UBBCONFIG file; or in the startup.properties
file (same as WLS) that is packaged into the JAR file.
For an example of how RMI startup and shutdown classes (specified in a properties file) are processed in initialize
and release
methods of the Server implementation class, see Using a Startup Properties File.
For each Jar file, there is only one Server implementation class that has initialize
and release
methods. When the JavaServer boots, it will load all the JAR files specified in UBBCONFIG, and invokes the initialize
method of the Server implementation class with the application arguments for each JAR. At JavaServer shutdown it will invoke the release
method.
The startup/shutdown information can be specified in the M3 server descriptor XML file that will be serialized by the buildjavaserver
command. Also, the startup/shutdown information can be specified as EJB XML deployment descriptor extensions and will be packaged into the deployable JAR by the ejbc
tool.
If there is only one startup class, the class can be implemented as the Server implementation class, and its initialize
method will be called when the JAR is deployed.
If there are multiple startup classes, these can still utilize the Server implementation class with the startup class names and arguments passed as the arguments to initialize
method.
Alternatively, the startup/shutdown classes names and arguments can be specified in a separate file startup.properties
(same format as WLS), and be processed in the initialize
method of the Server implementation class. An example of this is provided in Using a Startup Properties File.
You can use the WLE buildjavaserver
command to generate the JAR file from an XML file. For a description of the Server class and XML file syntax, see Steps for Creating a Java Server Application in Creating Java Server Applications in the WebLogic Enterprise online documentation.
Alternatively, you can use the ejbc
tool to package the EJB deployment descriptor extensions XML file into the deployable JAR. For more information about using the ejbc tool, see the ejbc
command in the Commands Reference in the WebLogic Enterprise online documentation.
In the SERVERS section of the UBBCONFIG
, set MODULE="
jarfilename arg1 arg2 arg3"
to specify the JAR file that was generated from buildjavaserver
and optional application-specific arguments. You can include multiple instances of MODULE for multiple JARs. The jarfilename
can be a fully qualified path to the location of the JAR file; or it can be relative to the directory specified by the environment variable APPDIR. Note that you can specify the JAR file and arguments in CLOPT, but you must not specify JAR files in both CLOPT and MODULE. We recommend that you use MODULE instead of CLOPT.
Startup/Shutdown Classes
Jar Tool / XML
UBBCONFIG
|
Copyright © 1999 BEA Systems, Inc. All rights reserved.
|