This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Startup class for Application server  RSS feed

 
Mila
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about ServletContextListener ?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!