Yep more memory and more time for the garbage collector - but in fact its probably insignificant - your already creating an actionform (if its request scoped) , a request object, and all sorts of other things as by products of processing the request. This is just one more object.
JVMs now are much better at instantiation and garbage collection than they were back when struts (and the servlet api) were originally designed. Certainly to a point where if struts were being written from scratch now, caching the actions and making them thread-safe would be a decision of dubious merit. Im not sure however to what extent the number of superclasses and methods affects the cost of instantiation and memory use of an object. Id be interested to hear comments by those who do. -----Original Message----- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 July 2003 20:39 To: Struts Users Mailing List Subject: Re: Question on making Action classes thread-safe Ajay Patil wrote: > Hello, > > I found out that it is possible to make the Action class thread-safe > by over-riding RequestProcessor (processActionCreate method) so that > it creates a new Action instance for each request. > > I would like to know the implications and possible problems ? > If anyone has tried this, please share your experiences. Is this similar to the "thread-safety" of SingleThreadedServlet? It sounds like it. I would imagine that with a separate instance for each request, more memory would be consumed? Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

