webwork/src/main/webwork/view/velocity WebWorkUtil.java,1.10,1.11

[email protected] Fri, 04 Jun 2004 00:57:28 -0700
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/velocity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5907/src/main/webwork/view/velocity

Modified Files:
	WebWorkUtil.java 
Log Message:
Allow basic 'AOP' style injection in webwork for method calls made via
reflection.

The basic usage will be to allow profiling to the code, although other
usages I'm sure are possible.

Fixes WW-550.

Added a new class 'InjectionUtils', and a new webwork property
'webwork.injection.class', which you can implement yourself.

Changed all usages of Method.invoke() to call InjectionUtils.invoke()
instead.



Index: WebWorkUtil.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/velocity/WebWorkUtil.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- WebWorkUtil.java	23 Apr 2004 01:31:33 -0000	1.10
+++ WebWorkUtil.java	4 Jun 2004 07:57:25 -0000	1.11
@@ -10,6 +10,7 @@
 import webwork.action.factory.ActionFactory;
 import webwork.util.ClassLoaderUtils;
 import webwork.util.ConcurrentReaderHashMap;
+import webwork.util.InjectionUtils;
 
 import javax.servlet.*;
 import javax.servlet.http.HttpServletResponse;
@@ -159,7 +160,7 @@
             return writer;
          } else
          {
-            return method.invoke(response, args);
+            return InjectionUtils.invoke(method, response, args);
          }
       }
 



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504