Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 1666 invoked from network); 16 Jun 2000 16:55:38 -0000 Received: from lukla.sun.com (192.18.98.31) by locus.apache.org with SMTP; 16 Jun 2000 16:55:38 -0000 Received: from centralmail2.Central.Sun.COM ([129.147.62.11]) by lukla.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id KAA03010 for ; Fri, 16 Jun 2000 10:55:34 -0600 (MDT) Received: from swanaba.central (swanaba.Central.Sun.COM [129.147.30.5]) by centralmail2.Central.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id KAA14858 for ; Fri, 16 Jun 2000 10:55:29 -0600 (MDT) Received: from eng.sun.com (salespilot.Central.Sun.COM [129.147.30.18]) by swanaba.central (8.8.8+Sun/8.8.8) with ESMTP id KAA22448 for ; Fri, 16 Jun 2000 10:34:39 -0600 (MDT) Message-ID: <394A5BFF.7DEBED97@eng.sun.com> Date: Fri, 16 Jun 2000 09:55:27 -0700 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.72 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: Global caching hack? References: <80F5674514B4D311BAFC0040F6A45EEE032822@ntserver> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Nacho wrote: > Why you aren't using a singleton? do you know singletons? > > Saludos , > Ignacio J. Ortega > Singletons can be problematic in web applications, because what actually happens depends on the way class loaders are implemented in your servlet container. The portable approach to sharing things throughout a web application is to use context attributes (from the servlet perspective), which are the same as application-scope beans (from the JSP perspective). Craig McClanahan > > > -----Mensaje original----- > > De: Robin Giese [mailto:rtg@digitalkiwi.com] > > Enviado el: viernes 16 de junio de 2000 11:14 > > Para: tomcat-dev@jakarta.apache.org > > Asunto: Global caching hack? > > > > > > Hi, > > > > I was wondering how I'd be able to hack my own global cache > > (or rather, > > bunch o' variables) into Tomcat that would be available to > > all servlets and > > JSP pages. I'm trying to share an Oracle connection pool (and a couple > > similar, global, very large, non-session dependent objects) to all my > > servlets and JSPs, and I don't want to build a different > > cache for each > > servlet and JSP page, because it would be an incredible waste > > of memory. > > Where would be the right place for this kind of hack? Or is there an > > existing facility I could hack up to make it not a complete > > hack? (However, > > the objects aren't serializable.) > > > > Thanks, > > > > --robin > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org