On Apr 8, 2005 11:50 AM, Jay Burgess <[EMAIL PROTECTED]> wrote:
> We too use a PlugIn, and I'm now wondering based on Craig's explanation 
> whether
> there are any advantages/disadvantages of one technique over the other?

Struts PlugIns are initialized and destroyed by the ActionServlet.init
and ActionServlet.destroy methods, so they are (of course) subject to
the same potential problems.

If you're on a Servlet 2.3 or later container, I would recommend
migrating your plugins to use ServletContextListener instead.  It's
really easy -- just tweak the method signature of the two relevant
methods.  You have access to the ServletContext for the application
(it's in the event parameter), so it's easy to do things like set up
application scope caches for your domain tables.

Craig

> 
> Jay
> Vertical Technology Group
> http://www.vtgroup.com/
> 
> 
> -----Original Message-----
> From: Joe Germuska [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 08, 2005 2:35 PM
> To: Struts Users Mailing List
> Subject: Re: Meta Information in Action Form
> 
> Matt's general approach is the one we use also, except instead of
> ServletListeners and the database, we use the DigestingPlugIn, which
> produces objects based on XML and can put them in the application
> context.  There's an example in the mailreader app which you should
> be able to just about cut-and-paste, with the exception of changing
> the XML which represents your menu items.
> 
> Joe
> 
> At 12:12 PM -0600 4/8/05, Matt Raible wrote:
> >As far as drop-downs, I typically populate all (or most) of mine
> >from a database at application startup using a ServletListener.  I
> >stuff these into the application scope as Lists of LabelValue beans.
> >Then I code up a ReloadAction that can call my Listener to reload
> >them all.  I've found this useful so I don't have to restart the app
> >if data changes.
> >If I have edit screens for the drop-downs, I'll replace the List in
> >application scope after saving.
> 
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
> 
> ---------------------------------------------------------------------
> 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]
> 
>

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

Reply via email to