> From: Tony Anecito [mailto:adanec...@yahoo.com] > Subject: Re: Jersey Client Call to Tomcat creates new servlet while for Metro > Soap call it does not do that...
> 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. Which is a clear indication that your original premise was false. Tomcat will never create more than one instance of a servlet (per webapp), unless you're using the SingleThreadModel (a really bad idea, these days); the spec does not permit it. > Question is does Tomcat call the constructor whenever it realocates > the servlet? What do you mean by "realocates" [sic]? > does finalized get called for a servlet when tomcat is done with it? Only when the webapp is undeployed. You're not really still using a finalize() method, are you? > Maybe I should state the question does > "com.sun.jersey.spi.container.servlet.ServletContainer" call the > resource class constructor when it is reused? That's not Tomcat code, so why would you expect anyone on this list to know the answer? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org