Thanks everyone... Based on your recommendations, I found some reference material on plug-ins, I think that's precisely what I want. It's the closest to what the app currently has, so it certainly makes sense... should just be a matter of changing the base class and called method signature, no big deal. Thanks all!


From: "Andrea M" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: R: App-level globals
Date: Mon, 17 May 2004 21:38:15 +0200

Yeah
Probably Struts' plugins are the most straightforward thing for you.
Plugins are components that Struts loads once at startup, and they are often
used (I use them in that way too) to load shared resources (like
datasources) in servletcontext before every other component is load.




-----Messaggio originale-----
Da: Joe Germuska [mailto:[EMAIL PROTECTED]
Inviato: luned́ 17 maggio 2004 18.47
A: Struts Users Mailing List
Oggetto: RE: App-level globals

At 5:33 PM +0100 5/17/04, Paul McCulloch wrote:
>Struts has plugins which, I think do the kind of thing you are after.
>Personally I've never used them  - I just implement a
ServletContextListener
>to do that sort of thing.

This is exactly right:  if you're using Servlet 2.2 (which doesn't
have ServletContextListener), you can use PlugIn.  If you're using
Servlet 2.3 or newer, about the only other thing that PlugIn gets you
which an SCL doesn't is that its init() method receives a reference
to the Struts ModuleConfig for which the plugin is being initialized
-- so if you need a handle on that object, using a PlugIn is probably
the most straightforward way to get one.

Joe


>Paul > >> -----Original Message----- >> From: None None [mailto:[EMAIL PROTECTED] >> Sent: Monday, May 17, 2004 5:17 PM >> To: [EMAIL PROTECTED] >> Subject: App-level globals >> >> >> Hello again everyone... I am starting conversion of a >> none-Struts app to >> Struts, and mostly it's straight-forward, but two things I >> have questions >> about... >> >> The home-grown framework this app was written with has the >> notion of an App >> Loader. Basically, this is a class that runs at startup and >> reads in some >> config information and stores it in a static config object. >> The properties >> of this object are referenced throughout the app. >> >> The other concern is that this same process spawns a couple >> of low-priority >> background threads to do some various things throughout the >> lifetime of the >> app. >> >> My question, which I have been unable to find an answer to on >> my own, is if >> Struts has a similar startup "initialization" mechanism? If >> not, do I >> simply create my own servlet to do all this work and set it to run on >> startup in web.xml? I have no problem with the later >> approach, but I'm >> wondering if Struts has a mechanism for this, like our custom >> framework >> does? >> >> Thanks all! >> >> _________________________________________________________________ >> Express yourself with the new version of MSN Messenger! >> Download today - >> it's FREE! >> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > >********************************************************************** >Axios Email Confidentiality Footer >Privileged/Confidential Information may be contained in this >message. If you are not the addressee indicated in this message (or >responsible for delivery of the message to such person), you may not >copy or deliver this message to anyone. In such case, you should >destroy this message, and notify us immediately. If you or your >employer does not consent to Internet email messages of this kind, >please advise us immediately. Opinions, conclusions and other >information expressed in this message are not given or endorsed by >my Company or employer unless otherwise indicated by an authorised >representative independent of this message. >WARNING: >While Axios Systems Ltd takes steps to prevent computer viruses from >being transmitted via electronic mail attachments we cannot >guarantee that attachments do not contain computer virus code. You >are therefore strongly advised to undertake anti virus checks prior >to accessing the attachment to this electronic mail. Axios Systems >Ltd grants no warranties regarding performance use or quality of any >attachment and undertakes no liability for loss or damage howsoever >caused. >********************************************************************** > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED]


-- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining." -- Jef Raskin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to