Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 18536 invoked from network); 15 Jun 2003 16:38:52 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 15 Jun 2003 16:38:52 -0000 Received: (qmail 9487 invoked by uid 97); 15 Jun 2003 16:41:10 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 9480 invoked from network); 15 Jun 2003 16:41:10 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 15 Jun 2003 16:41:10 -0000 Received: (qmail 17057 invoked by uid 500); 15 Jun 2003 16:38:37 -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 17043 invoked from network); 15 Jun 2003 16:38:36 -0000 Received: from sid.armstrong.com (204.74.20.252) by daedalus.apache.org with SMTP; 15 Jun 2003 16:38:36 -0000 Received: from joedog.org (pcp01470022pcs.lncstr01.pa.comcast.net [68.82.237.147]) by sid.armstrong.com (8.12.8p1/8.12.8) with ESMTP id h5FGXIM0030916 for ; Sun, 15 Jun 2003 11:33:18 -0500 Message-ID: <3EECA103.10603@joedog.org> Date: Sun, 15 Jun 2003 12:38:27 -0400 From: Tim Funk Organization: Human being User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en, es-mx, de, sv MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Singleton across multiple contexts References: <3EEC8F01.5030201@terra.es> In-Reply-To: <3EEC8F01.5030201@terra.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Look in the archives and search for past Singleton discussions. http://marc.theaimsgroup.com/?l=tomcat-user&w=2&r=1&s=singleton&q=b http://marc.theaimsgroup.com/?l=tomcat-dev&w=2&r=1&s=singleton&q=b Otherwise ... - EJB (???) - Use a custom JNDI Factory (see tomcat jndi docs) -Tim Antonio Fiol Bonn�n wrote: > Hello, > > This question is probably not specific to Tomcat, but a Tomcat-specific > answer could well suit my needs. > > I have an application which I have split in several different contexts. > I have done so, to allow different kinds of access to the app, depending > on the web server the requests are coming from. > > However, I need a common unique component that "ties" all the contexts > together. > > There must be a *single* instance of this component, otherwise > inconsistencies or duplicate work might arise. OTOH, it must be > accessible from all the contexts. > > Calls to this component are very simple (calls to void methods) but > moderately frequent. > > I have thought of several possibilities: > > - Extract the component into a separate JVM, and connect to it via socket. > - Extract the component into another context, and connect to it via HTTP. > --- I like none of those. > > - Create the instance from the first context needing it, and making it > available to all of them. > --- I like this best, but I have no idea of how to do that. > > > Yours sincerely, > > > Antonio Fiol --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org