[ 
https://issues.apache.org/jira/browse/WW-4694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15863498#comment-15863498
 ] 

Hudson commented on WW-4694:
----------------------------

SUCCESS: Integrated in Jenkins build Struts-JDK7-master #592 (See 
[https://builds.apache.org/job/Struts-JDK7-master/592/])
[WW-4694] annotation processing improved in order to navigate around 
(yasser.zamani: rev c84b7967e9eb2f6307466b1644977423831d2ef1)
* (edit) core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
* (add) 
core/src/test/java/com/opensymphony/xwork2/util/annotation/DummyInterface.java
* (add) 
core/src/test/java/com/opensymphony/xwork2/util/annotation/MyAnnotationI.java
* (edit) 
core/src/test/java/com/opensymphony/xwork2/util/annotation/DummyClassExt.java
* (edit) 
core/src/test/java/com/opensymphony/xwork2/util/AnnotationUtilsTest.java
* (edit) 
core/src/test/java/com/opensymphony/xwork2/util/annotation/DummyClass.java


> AnnotationWorkflowInterceptor doesn't work with spring proxied action
> ---------------------------------------------------------------------
>
>                 Key: WW-4694
>                 URL: https://issues.apache.org/jira/browse/WW-4694
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>            Reporter: zhouyanming
>             Fix For: 2.5.next
>
>
> {code:java}
>     public String intercept(ActionInvocation invocation) throws Exception {
>         final Object action = invocation.getAction();
>         invocation.addPreResultListener(this);
>         List<Method> methods = new 
> ArrayList<>(AnnotationUtils.getAnnotatedMethods(action.getClass(), 
> Before.class));
> {code}
> if action is annotated with @Transactional , 
> AnnotationUtils.getAnnotatedMethods() will always return empty collection.
> here is my quick fix 
> {code:java}
>       public static Collection<Method> getAnnotatedMethods(Class clazz, 
> Class<? extends Annotation>... annotation){
>               if( SpringProxy.class.isAssignableFrom(clazz) )
>                       clazz = clazz.getSuperclass();
> {code}
> but it will add spring dependence, I hope there is an elegant way.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to