This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Startup class for Application server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Startup class for Application server" Watch "Startup class for Application server" New topic
Author

Startup class for Application server

Mila
Ranch Hand

Joined: Feb 14, 2002
Posts: 31
Hello,
What is the best way to implement a startup class
to Application servers'?
I mean something like Weblogic's T3StartupDef.
Br
MikLa
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
This is vendor-specific. However, to be as portable as possible it is best to place your logic in a class separate from your startup class. Then your vendor-specific startup class can act as a facade. Thus when you need to support multiple vendors it should be a simple process to write another facade for each specific application server.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

How about ServletContextListener ?


Groovy
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Pradeep Bhat:
How about ServletContextListener ?

That would be making the assumption that the application is using Servlets. Many J2EE Applications have the need for startup events and are not using Servlets. In these cases you are at the mercy of the Application Servers feature set.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Startup class for Application server
 
Similar Threads
Loading a class at startup of WebSphere w/o using servlet
Servlet does not start when WL 11g is restarted
Application Startup Class
where can i initialize the global parameter?
What is the purpose of the ContextLoaderListener