Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 20505 invoked from network); 14 Feb 2005 19:21:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Feb 2005 19:21:05 -0000 Received: (qmail 23247 invoked by uid 500); 14 Feb 2005 19:20:54 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 23052 invoked by uid 500); 14 Feb 2005 19:20:53 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 23039 invoked by uid 99); 14 Feb 2005 19:20:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of chachany@gmail.com designates 64.233.170.206 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.206) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 14 Feb 2005 11:20:53 -0800 Received: by rproxy.gmail.com with SMTP id b11so680746rne for ; Mon, 14 Feb 2005 11:20:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=t0AMVNun9fBgDI8rrpXklx0fUskOD01ePR9ZNHdiQ3PoxBXy2U1cqiBqyH+BSV+Y7zalKPmDdph3fgCAHcFl4h3KkmdCzmpy4jv88P6I7FZDefLJ9uv0p5TM49MTJU/2kQxCqSBfA/n/aIhaP7gOmYRMDxRc+secbZTm9rcVR0M= Received: by 10.38.22.68 with SMTP id 68mr294906rnv; Mon, 14 Feb 2005 11:20:50 -0800 (PST) Received: by 10.38.24.53 with HTTP; Mon, 14 Feb 2005 11:20:50 -0800 (PST) Message-ID: <8aef647c05021411203ee1a1a8@mail.gmail.com> Date: Mon, 14 Feb 2005 14:20:50 -0500 From: David Johnson Reply-To: ChaChaNY@GMail.com To: Struts Users Mailing List , craigmcc@apache.org Subject: Re: Caching Appliction Level Data? In-Reply-To: <8aef647c05021411161afea1d0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <02b401c512bf$6fe55080$28ad93d1@irm.local> <20050214190325.5142.qmail@web53804.mail.yahoo.com> <8aef647c05021411161afea1d0@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Another question.... Currently, I'm modifying an alplication that HAS a struts plug-in for creating Application wide stuff... the thing I want to create will depend on that "stuff" already being there, so would it be safe to assume that it will exist if I simply implement a vanilla ContextListener and try to load up stuff in the ContextInitialized? My fear is that in the ContectInitialized, I need things like my DB info, and some other stuff that gets attended to in the struts plug in... and what if it's not there? Would it be safer to create ANOTHER struts plug in below the existing one that does the loading up of my application wide data (country codes etc) Discuss P.S., I'm reading furiously in the "professional java server programming" book as I write this ha ha ha 14 Feb 2005 14:16:17 -0500, David Johnson wrote: > I see your points. We arent sure yet what version of Weblogic we'll be > deploying to, but I'm developing in Tomcat. Sounds like an open > question to me. > > Where would you point me to learn how to do this the ContextListener way? > > > On Mon, 14 Feb 2005 11:10:19 -0800, Craig McClanahan wrote: > > On Mon, 14 Feb 2005 11:03:24 -0800 (PST), Martin Wegner > > wrote: > > > > > > A PlugIn works nicely as well. I am not sure which is the recommended > > > Struts practice. > > > > If you're on a Servlet 2.3 or later container (which is when > > ServletContextListener was introduced), you should use it instead of > > plugins: > > > > * There are also other listeners that you should > > explore which are available in this version -- did > > you know, for example, that you can be notified > > whenever anyone else in your app adds, removes, > > or replaces an application or session scope attribute? > > (In Servlet 2.4 you can do this for request scope too.) > > > > * The way a Struts plugin is implemented is to have > > the init() and destroy() methods called from the > > corresponding methods on ActionServlet. Technically, > > an app server is allowed to destroy servlet instances > > any time it wants to, so you're not guaranteed that destroy() > > *really* means the application is shutting down. > > > > * Context listeners work in non-Struts apps too; > > one less concept to learn. > > > > Craig > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > > For additional commands, e-mail: user-help@struts.apache.org > > > > > > -- > -Dave > ChaChaNY@Gmail.com > -- -Dave ChaChaNY@Gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org