• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment steps - clarrification please

 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a query regarding deployment time actions:

->Filter instantiation is done and calls init() method at deployment time itself.
->Servlet instantiation is done and calls init() method at deployment time if it has <load-on-startup> element in DD, else it is done at the time of client request.

are the above statements correct ?

Regards,
Ravi
[ May 29, 2008: Message edited by: Garla Ravi ]
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet spec's is the answer, they are explined well.
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
those were the steps from Servelt Spec, but not exactly the same.

I changed them according to my understanding and asking you guys, whether my understanding is correct or not ?
 
Vijay Bharghav bheemineni
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,

Your statements are correct except I am skeptical about "else it is done at the time of client request" . As far as I remember the specs says that vendor can instantiate servlet's during start of the servlet container or at the time of client request if <load-on-startup> is not mentioned.

Can any body clarify this?

Thanks.
Vijay Bheemineni.
 
kamal kannan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi as my understanding

first the <load-on-startup> work when the application loading time
the init method call at the time creating instance .

start the server
|
load the application (war file deployment)load on start up called.
|
server get reguest from client
|
container create instance at the time init method will call
|
service method invoke doGet() or doPost()method
|
process complition
|
destroy method call.
|
instance destroyed.

 
Jagadish Tarigopula
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi-

In general Servlet instan wud be created when 1st client request is made. This is the where complete life cycle methods are executed and first client will face bit lantency in getting response. From the seconc client onwards server will start clerating threads for each clicnet request and there wont be any dealy in sending response back to client.
If you want to avoid latency at the time of 1st cleint request , then you can go for DD xml tag <load-on-startup> which create instance at the time of deploment time. Any positive value for thig tag will create instance at the time of deployment But not sure whenther container will create 2 instance if we give value as 2 ???

Can some one correct me if I am wrong..Thanks!!
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic