On Tuesday 17 February 2009 19:19:08 Dale Newfield wrote:
>
> > The interceptor depends on the SpringObjectFactory, so it is necessary to
> > have the Spring plugin installed.
>
> Is it appropriate for struts to be distributed with an interceptor that
> doesn't work without the plugin?  Doesn't that argue that the
> interceptor should be packaged *with* the plugin?
>

The nature of the interceptor is that it is not invoked unless it is 
contextually relevant. Why it hasn't been moved into the Spring plugin? Most 
likely this interceptor is older than the plugin itself. From a quick look at 
the Spring plugin source, this interceptor is defined in its struts-plugin.xml 
so even though it is a part of XWork2 rather than the plugin, it is likely to 
stay there because it'll probably take some effort to move (moving and 
refactoring unit tests, etc.). 

I jumped into the thread late and didn't see your original problems. I tend to 
peruse for things I can help on, so I'm not sure if I have an answer for your 
original problem :(

Although, there are a few considerations for interceptors and their 
dependencies (as opposed to actions), especially when dealing with databases. 
Mainly, an interceptor is a singleton, so, if you are grabbing a resource via 
spring, and that resource depends on a database resource, could a pool or 
something be re-claiming it after excessive idle time? 

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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

Reply via email to