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

ASF subversion and git services commented on WW-4694:
-----------------------------------------------------

Commit 33e1eeb386c98beeaeff51504a2ff156098f2c01 in struts's branch 
refs/heads/master from [~yasser.zamani]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=33e1eeb ]

WW-4744 WW-4694 Removes annotation search to commons lang 3.6


> 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.4.14#64029)

Reply via email to