This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
Joined: Jun 05, 2002
Thnx for yr answer but can u plz tell me how to create one for weblogic app server.. any links ??? thnx again.. pratap
Joined: Jul 28, 2000
Pratap Check out the bea documentation for "startup" class and here is a sample startup class.