The @CommitAfter annotation is not the problem. It visible as we access it
from PlastiClass, as shown here:

 for (final PlasticMethod method :
> plasticClass.getMethodsWithAnnotation(CommitAfter.class))
>        {
>            method.addAdvice(advice);
>        }
>    }
> }


Tthe problem is @PersistenceContex annotation which is accessed from
MethodInvocation in an advice. See here:

>    private EntityTransaction getTransaction(final MethodInvocation
> invocation)
>    {
>        final PersistenceContext annotation =
> invocation.getAnnotation(PersistenceContext.class);


Note that there is a significant difference between these two use cases. The
@CommitAfter annotation is accessed at class transformation time. The
@ PersistenceContext annotation at runtime. Might be the reason for
different behaviour?

-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Reply via email to