struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schneider <schne...@gmail.com>
Subject Re: startup action in struts2
Date Tue, 04 Dec 2007 04:32:07 GMT

In struts 2, the plugin architecture works differently.  Off the top of my
head, I can't think of similar functionality in s2.  An alternative option
would be to write a standard J2EE ContextListener and use that.  This is how
Spring gets loaded in newer versions of J2EE.
Tom


Christopher Cheng-5 wrote:
> 
> In struts1, I have a few plugin to preconfigure some services such as 
> QuartzPlugIn during startup
> 
> public void init(ActionServlet actionServlet,
>                      ModuleConfig moduleConfig) {
> 
>         try {
>             SchedulerFactory sf = new StdSchedulerFactory();
>             Scheduler sched = sf.getScheduler();
>             sched.start();
>         }
>         catch (Exception e) {
>             e.printStackTrace(System.out);
>         }
>     }
> 
> In strtus2, do I have to write a new plugin in a seperate jar? Is there a 
> simpler way? 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/startup-action-in-struts2-tf4941013.html#a14144512
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message