Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

load-on-startup doubt ...

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When i use the <load-on-startup> tag in the DD, the Servlet is loaded at deploy time, this is ok with me. But, does the <load-on-startup> call the init method on that Servlet ?

Please clear my doubts ...

Thanks in advance ...
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like to try something like a servlet with code such as


public void init(){
ServletContext ctx = getServletContext();
ctx.log("initializing");
}

Then restart your container without requesting the servlet and see what is in the the log.

Marcus
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,

Loading also initializes. It will take you to the point where in when your first request comes in, it starts with the service method.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic