Start-up and Shut down classes in Weblogic

Hi All,

Weblogic provides a very convenient way to perform some activation of application component during application startup for example initializing the DB factories, logger, service agents etc and also some deactivation of the application component while shutdown of the application, All using startup and shutdown classes.

To configure Startup and Shutdown classes is very easy in Weblogic.Just follow the below steps.

Step 1: Write a Ant Script to generate JAR file of the classes(shutdown+startup) e.g strtshutclass.jar

Step 2: Copy the generated JAR into [DOMAIN_HOME] /lib folder. So that when server starts, it will dynamically add that in the server path

OR

Step 2: In the Server startup scripts e.g startWebLogic.cmd or startWebLogic.sh, find the classpath variable and add the reference of your jar
e.g set SAVE_CLASSPATH=%CLASSPATH%;C:\MyApp\builds\lib\strtshutclass.jar;

Step 3: Start the server


Thanks,
R Vashi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s