To respond to my own post to record a bit more information about the
actual problem here, in case someone has any ideas:

What the xwork 1-style ActionProxyFactory does is that it returns an
ActionInvocation. Our legacy code further extends the
DefaultActionInvocation in order to get to override createResult --
and this has something to do with integrating Tiles views with Spring.

In xwork2, the create-method of the factory actually returns an
ActionProxy. Now, I can certainly create my own proxies to return, but
now the ActionInvocation is hidden inside the Proxy and is created in
DefaultActionProxy's prepare() method.

So I guess what the question is -- how does one override
createResult() or equivalent in the new-style API...


2012/12/17 Eero Nevalainen <enevalai...@gmail.com>:
> Hi,
>
> I am working on a somewhat legacy Webwork + Spring + Hibernate
> application where we finally decided to bite the bullet and move to
> Struts 2.0.14 from Webwork 2.2.7.
>
> From googling it initially seemed like the migration doesn't require
> humongous effort; however there is a certain API change in xwork that
> I have not seen mentioned anywhere and that I ran into. Namely, there
> is class X extending DefaultActionProxyFactory, and with xwork 2 there
> are two issues:
>
> 1. ActionProxyFactory is now an interface, not a class. I can't call
> "setFactory(this)" in the bind() method.
>
> 2. More interestingly, it looks like in the ActionProxyFactory,
> "Invocations" and "Proxies" behave differently. We used to have
>
>     @Override
>     public ActionInvocation createActionInvocation(ActionProxy actionProxy)
>
> and
>
>     @Override
>     public ActionInvocation createActionInvocation(ActionProxy
> actionProxy, Map map)
>
> in the subclass, but now the overridable stuff is
>
>     @Override
>     public ActionProxy createActionProxy(String namespace, String
> actionName, Map extraContext)
>
> I am a bit of a loss as to how to interpret the meaning of these
> changes so I could meaningfully start fixing this. Any
> insight/pointers as to what the relevance of this to the functioning
> of the factory might be, would be greatly appreciated.
>
> On another note, how is the compatibility of the various versions of
> the spring-plugin with Spring 3.0.2 and Struts 2.0.14? Webwork worked
> fine with the Spring version, but it seems to me that Struts 2.0.x
> assumes something like a 2.5.x series Spring framework...
>
>
> --
> Eero Nevalainen (enevalai...@gmail.com)



-- 
Eero Nevalainen (enevalai...@gmail.com)

-- "Rahvas on pitkällisen sorron vuoksi kääntynyt vain sisäänpäin - se
saattaa kenties moittia nimismiestä tai pappia, mutta maaherra on
sille jo pieni jumala ja senaattori vailla vertaa." -- Snellman

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

Reply via email to