--- Joe Germuska <[EMAIL PROTECTED]> wrote:
> At 7:40 -0700 9/8/03, David Graham wrote:
> >Plugins are really only helpful to people using a Servlet 2.2
> container.
> >If you're using Servlet 2.3 you should use a ServletContextListener.
> 
> I don't know (but I doubt) that there is a determinate order to how 
> containers process "contextInitialized"  

>From the Servlet 2.3 spec:
SRV.10.3.2 Deployment Declarations
Listener classes are declared in the web application deployment descriptor
using the
listener element. They are listed by class name in the order in which they
are to be
invoked.

> On the other hand, Struts 
> processes plugins in order.  I know one developer who leverages this 
> predictability to initialize a series of "specialist" classes, and 
> then finally a facade type class which proxies for the others.  I 
> don't know the details, but this is one other possible use case.
> 
> Also, PlugIns are "module aware" -- the initialize method gets a 
> ModuleConfig object.  That might matter to some implementations.

That's really the only reason I can think of to use PlugIns instead of the
standard listeners.

David

> 
> I suspect in many cases where I use PlugIns, I could be using 
> ServletContextListeners instead, but I haven't broken the habit yet. 
> But the gist is the same -- some component you write needs to know 
> when the application context has been initialized.
> 
> Joe
> -- 
> --
> Joe Germuska            
> [EMAIL PROTECTED]  
> http://blog.germuska.com    
> "If nature worked that way, the universe would crash all the time." 
>       --Jaron Lanier
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

Reply via email to