Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 18053 invoked from network); 18 Jun 2002 21:58:24 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 18 Jun 2002 21:58:24 -0000 Received: (qmail 21068 invoked by uid 97); 18 Jun 2002 21:58:15 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 21030 invoked by uid 97); 18 Jun 2002 21:58:14 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 21018 invoked by uid 98); 18 Jun 2002 21:58:14 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Tue, 18 Jun 2002 14:58:00 -0700 (PDT) From: "Craig R. McClanahan" To: Tomcat Users List Subject: Re: one context per server In-Reply-To: <000f01c21712$75829ee0$0200000a@GABRIEL> Message-ID: <20020618145524.X2586-100000@icarus.apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 19 Jun 2002, Gabriel Mihalache wrote: > Date: Wed, 19 Jun 2002 00:52:30 +0300 > From: Gabriel Mihalache > Reply-To: Tomcat Users List > To: Tomcat Users List > Subject: one context per server > > is there a way to share a single JNDI context for all webapps? Not with the standard implementation -- the JNDI context that Tomcat provides is populated with the resources for that webapp, which can potentially all be different. With Tomcat 4.1.x, you can pretty easily share JNDI-accessed resources by putting them in the element of server.xml, and creating a element for each webapp -- so, for example, you could declare a data source once and use it in multiple apps. > can this context be accesible thru getServletContext() ?! Nothing stops you from storing the JNDI initial context you get back as a servlet context attribute, but it seems redundant to me -- the thing is already accessible from anywhere in your code. Craig -- To unsubscribe, e-mail: For additional commands, e-mail: