Re: Spring, Webwork and transactions

Ruben Inoto <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <23198528.1165170360963.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Sorry for reviving an old thread, but I have found something lately related to this problem..

When XWork is going to invoke the action (invokeAction method of the DefaultActionInvocation), a distinction is made if the action is proxied or not:

[code]
            if (action instanceof Proxy) {
                try {
                    return (String) Proxy.getInvocationHandler(action).invoke(action, method, new Object[0]);
                } catch (Throwable throwable) {
                    throwable.printStackTrace();
                    throw new Exception("Error invoking on proxy: " + throwable.getMessage());
                }
            }
[/code]

If it is a proxy, the invoke is performed in the InvocationHandler, but passing as method the one got before from the proxy itself:

[code]
                method = getAction().getClass().getMethod(methodName, new Class[0]);
[/code]

I am a bit confused here.. I think this will not work, as the invocation handler will for sure not implement the method got from the proxy.

I guess I am missing something... anybody?

Btw, if no distinction would be made at action invocation (Proxy or no Proxy), I think that Transactional annotations could be used on Action level using dynamic proxies.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=47645&messageID=104951#104951

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.