BEA Logo BEA WebLogic Enterprise Release 5.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Enterprise Doc Home   |   J2EE Topics   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Java Server Startup

 

A JavaServer 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 run time. The JAR file can be built either from buildjavaserver tool or ejbc tool.

The BEA WebLogic Enterprise 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 JavaServer is shut down. The name of the startup/shutdown classes, and the startup arguments can be specified as the application arguments (ARGS) after the jarfile name in the MODULES section of the UBBCONFIG file; or in the startup.properties file (same as WLS) that is packaged into the JAR file.

For more information on the ARGS options in the MODULES section of the UBBCONFIG file, see the Administration Guide in the BEA WebLogic Enterprise online documentation. 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.

 


Startup/Shutdown Classes

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.

 


JAR Tool / XML

You can use the BEA WebLogic Enterprise 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 chapter in Creating Java Server Applications in the BEA 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, System Processes, and MIB Reference in the BEA WebLogic Enterprise online documentation.

 


UBBCONFIG

In the MODULES section of the UBBCONFIG file, set FILE="jarfilename" to specify the JAR file that was generated from buildjavaserver and ARGS="args" for optional application-specific arguments. You can include multiple instances of FILE 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. For more information on the UBBCONFIG file MODULES section, refer to the Administration Guide.