WebMacro has something which does this, called the ResourceBroker.
It's not coupled to the rest of the servlet framework, so you
could rip it out and use it Look at the WMServlet class for an
example how to do it.
WebMacro Servlet Framework
http://www.webmacro.org
Another way to go would be to use an application server with
support for enterprise javabeans. Eventually WebMacro will use
something like that; but the current free EJB implementations
are not far enough along yet (or maybe I just don't know
about it).
Justin
Quoting Bruce Bantos ([EMAIL PROTECTED]):
> I have a number of java beans that I use to store and manipulate data from
> JSP's and servlets. These are essentially container objects that do little
> more than get and set private properties. I would like to mantain a pool of
> these beans to avoid the overhead of creating and destroying them with each
> session (or even page). Can anyone point me toward any information on object
> pooling, particularly in the context of servlets? I have looked everywhere
> and found nothing. Some ideas I have considered include:
>
> * Making a "master" servlet that contains a hashtable of bean objects,
> and includes code for managing these beans and handing them out, reseting
> them, etc., and subclassing every servlet used from this master servlet.
>
> * Writing a some sort of threaded server that would deal with brokering
> these beans.
>
> Any ideas?
>
> Bruce
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html