I ran some more tests where I added a finalize method and a check in my 
constructor to see if it was called previosly.
So far it looks as if the contructor is called only once and the finalize is 
not 
called.

Question is does Tomcat call the constructor whenever it realocates the 
servlet? 
Also, does finalized get called for a servlet when tomcat is done with it?

Maybe I should state the question does 
"com.sun.jersey.spi.container.servlet.ServletContainer" call the resource class 
constructor when it is reused?

Regards,
-Tony



----- Original Message ----
From: Tony Anecito <adanec...@yahoo.com>
To: Tomcat Users Group <users@tomcat.apache.org>
Sent: Sun, January 16, 2011 8:19:03 PM
Subject: Jersey Client Call to Tomcat creates new servlet while for Metro Soap 
call it does not do that...

Hi All,

I noticed with Jersey 1.5 that whenever I execute a Jersey client side request 
it creates a new servlet rather than reuse the existing servlet. I know this 
because in my constructor for my servlet I send out a message and it is going 
to 

the Tomcat command console.
In my Web.xml I have a tag for at startup create 3 servlets.
This does not happen with my Metro based Servlets. Tomcat resuses those 
servlets.

Any ideas what might cause this? If I ran a load test Tomcat using Jersey might 
not scale very well.

Thanks,
-Tony




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to