aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes events on startup of webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "events on startup of webapp" Watch "events on startup of webapp" New topic
Author

events on startup of webapp

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
On startup of webapp
##load the servlet class
##instantiate the class
##call init
##call contextInitialized(if listeners are existing
)
when there is a request
##call service
if session is created using HttSession ses = request.getSession(true) and listeners are implemented
##call sessionCreated

on shutdown
destroy
sessionDestroyed
contextDestroyed
Please add if I am missing something
tony lee
Ranch Hand

Joined: Jan 21, 2002
Posts: 52
Hi,
It's my version:
On startup of webapp
##load the servlet class
##instantiate the class
##call init
##call contextInitialized - if ServletContextListeners is declared in DD.
when there is a request
##call service -> (doGet, doPost)
##HttSession ses = request.getSession() - use the existing session or create one if necessary.
##call sessionCreated() - if the class implement HttpSessionListener.
##call sessionDidActivate() - if the class implement HttpSessionActivationListener.
##call other listener methods if any session listener interfaces are implemented.
on shutdown
##destroy
##sessionDestroyed, sessionWillPassivate? ..
##contextDestroyed
Sorry, I just add on the author's message.


SCJP2, SCWCD
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
on shutdown if i have attribute listeners
then it would be
session attributeRemoved
sessionDestroyed
similarly for ServletContext attributes too
am I correct...
I am really not sure SessionDidActivate and SssionWillPassivate ..I mean the order they will be called. I feel wcd gurus should help us with this
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: events on startup of webapp
 
Similar Threads
Doubt on Session Attribute and Web Deployment
Please answer me this question.
Order of Listener Notification
Multiple ServletContextListner event handling order
ServletContextListener and load-on-startup