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

ASF GitHub Bot commented on WW-4694:
------------------------------------

Github user yasserzamani commented on the issue:

    https://github.com/apache/struts/pull/117
  
    Thank you. I got it and will fix it by update my eclipse Preferences.
    
    And what about the new codes and comments? some of them are copied from 
`Spring` framework which itself has `Apache License 2.0` license like Struts2. 
Do you recommend to rewrite them to something different with same functionality 
or no, those do not cause any legal issues?
    
    And finally, these changes are needed to fix [WW-4472]. Could you please 
add this issue id to the title to automatically linking and resolving that 
issue too?
    
    Thanks in advance!


> 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