Re: How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Carlos Luis Zúñiga Sibaja
Ohh, I see what you are saying. Then using the Event handling native to spring is a better solution ( http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#context-functionality-events). I'll give it a try. Thanks all, Carlos Luis Zúñiga Sibaja __ [EMAIL

Re: How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Laurie Harper
Why? Spring provides facilities for using managed beans as context listeners. Instead of trying to make your listener aware of Spring by hand, just use Springs facilities to register/manage your listener. L. Carlos Luis Zúñiga Sibaja wrote: This sounds a bit like what I need, my only issue wo

Re: How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Carlos Luis Zúñiga Sibaja
This sounds a bit like what I need, my only issue would that here I can't access the Spring context that is associated to the Struts Engine. I would have to instantiate it by myself, right? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... On Thu, Sep 4,

Re: How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Gabriel Belingueres
Use a ServletContextListener [1]. [1] http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html 2008/9/4, Carlos Luis Zúñiga Sibaja <[EMAIL PROTECTED]>: > Hi All, > > I'm starting a Struts 2 project and there are some tasks (check for the DB > version, correctness of the sc

How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Carlos Luis Zúñiga Sibaja
Hi All, I'm starting a Struts 2 project and there are some tasks (check for the DB version, correctness of the schema, etc.) I'd like to perform when the webapp inits. I'd like to execute these tasks right when the Struts engine starts, because I'd like to get advantage from the Spring IoC context