You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jonathan S Fisher (JIRA)" <ji...@apache.org> on 2019/02/06 21:25:00 UTC
[jira] [Commented] (TOMEE-2466) @Interceptors are not called when a
timer fires from an @Scheduled method
[ https://issues.apache.org/jira/browse/TOMEE-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16762156#comment-16762156 ]
Jonathan S Fisher commented on TOMEE-2466:
------------------------------------------
So it turns out, @Interceptors is supported, but the method in the interceptor must be annotated with @AroundTimeout, not @AroundInvoke. A subtle but important difference
> @Interceptors are not called when a timer fires from an @Scheduled method
> -------------------------------------------------------------------------
>
> Key: TOMEE-2466
> URL: https://issues.apache.org/jira/browse/TOMEE-2466
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 7.0.5
> Reporter: Jonathan S Fisher
> Priority: Critical
>
> If you have a
> scheduled @Timer, and the bean has @Interceptors around it, those
> interceptors are not called when the timer fires. If I'm reading the spec correctly, I'm surprised we're passing the TCK.
> According to: https://docs.oracle.com/javaee/6/tutorial/doc/gkedm.html using
> @Interceptors is allowed:
> > Multiple timeout interceptors may be defined for a given target class by
> > specifying the interceptor classes containing @AroundTimeout interceptor
> > methods in an @Interceptors annotation at the class level.
> I wrote a project here to demonstrate:
> https://github.com/exabrial/tomee-timer-interceptors
> Examine the source code, then run mvn clean package tomee:run to reproduce
> the issue.
> Thanks,
> -Jonathan
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)