This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Start-up and shutdown class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Start-up and shutdown class" Watch "Start-up and shutdown class" New topic
Author

Start-up and shutdown class

Pratap Routray
Greenhorn

Joined: Jun 05, 2002
Posts: 3
wht are they meant for? and how to create those classes...
I am working in weblogic app server 6.1 Sp 2
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1836
Let us say that you want to cache some data from property file before starting the server/application.
How would you do it??
One of the ways is through a ServletContext listener which is at the Web Container level.
The other way is through startup classes provided which are interfaces defined by the application servers to be implemented by developers.
There can be other reasons too why you want to write code in startup classes. For example I can code in a startup class to create a Connection Pool and a DataSource so that I do not need a "configured" Config.xml file.
The Startup class will create all the configuration required using MBeans provided by weblogic.
Pratap Routray
Greenhorn

Joined: Jun 05, 2002
Posts: 3
Thnx for yr answer but can u plz tell me how to create one for weblogic app server..
any links ???
thnx again..
pratap
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1836
Pratap
Check out the bea documentation for "startup" class and here is a sample startup class.
 
jQuery in Action, 2nd edition
 
subject: Start-up and shutdown class
 
Similar Threads
andrew has wii
can non-static inner class access any member
WA #1.....word association
Doubt about diagram class (realization)
Math class immutable