I think POJO's are a better option than 
Servlets for what you are discussing
( POJO = Plain Old Java Object ).  You will find
many multi threading benefits of having a separate
action object for each incoming request.

I like the idea of the pooling concept mentioned
by someone else, but that hints of an over 
engineered solution - I would only do pooling if
you saw a need for it in your performance testing.
With the new versions of hotspot, pooling in 
situations like this really do not add net value.
If using an older version of the JDK, I'd go with
pooling only if you saw the volume of action 
objects was a problem.
------------------------------
Now available : JCertify 6.0!
http://www.enterprisedeveloper.com/jcertify
The very latest in the new Sun Java 1.4 Platform
programmer exam
--- Vivek <[EMAIL PROTECTED]> wrote:
> Can anyone suggest me are there any major drawbacks
> if we use class object extending some base servlet
> as action handler rather than using common classes.
> See this way i am saving myself from the overhead of
> instantiating classes in my controller everytime a
> request is made and garbage collection by the JVM
> ,and if suppose around thousands of hits at a time
> could lead to memory overflow error.On the other
> hand a servlet intialised once could be faster and
> efficient /easier way i suppose.
> 
> Ur comments would be acknowleged.....
> Thanks
> 
> 
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm
> 


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to