Dear Maverick experts, 

I am trying to apply Maverick to a "framework-less" web
application, and my question is a very basic one.

I am trying to avoid creating new objects at every request.
Is it possible to use a servlet as a (Trhowaway2) 
Controller? Or other reusable accross requests conroller.

Situation: I have a servlet that checks if there is a 
Client object in the user's session. If yes, the Client
object is reused, otherwise a new Client instance is 
created. The Client object looks like this:

public class Client{

   private ClientModel model;
   private ClientModelHandler modelHandler;

   private CardViewHandler cardViewHandler;
   private FormViewHandler formViewHandler;
   private FormPrintHandler formPrintHandler;

   // methods go here...
}

ClientModel has 38 fields and its creation and rendering
are costly operations. Plus we have at least 70 concurrent
users (accessing the same view at the same time) at low
periods and 350+ at high, so creating new objects for each
request and passing old ones to gc doesn't look good from
performace point of view.

In "old" application, I use an object pool to get instances
of Client objects for new users; and re-use Client objects
found in user's session for logged-in users.

Can you advise me on how to replicate an object pool with
Maverick and how to reuse the same object found in session?

Thank you very much!

Valeri 



_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
[INVALID FOOTER]

Reply via email to