> On Feb 6, 2019, at 1:06 PM, exabrial12 <[email protected]> wrote:
>
> OH, I understand what you are saying. It's not that the @Interceptors is not
> supported, it's the interceptor must use @AroundTimeout not @AroundInvoke
That's right. As I understand the confusion, and you likely won't be the only
confused -- just the first in a while to mention it -- here's how that came to
be a requirement.
EJB 3.0 - AroundInvoke is added for business methods
AroundTimeout -> intercepts @Timeout methods called by the Timer API
AroundConstruct -> intercepts @PostConstruct calls by the container
EJB 3.1 - "Calendar" timers are added to the Timer API
Programmatic use of ScheduleExpression results in calls to the bean's
@Timeout method
Annotation use of @Schedule results in calls to that exact method
Both are considered Timer API uses, so @AroundTimeout covers both
cases
The ScheduleExpression->@AroundTimeout->@Timeout connection is intuitive for
people.
The @Schedule->@AroundTimeout connection throws people off, but is correct.
As I say, an "intercept-schedule-methods" example could be very useful to help
others out. If you feel like sharing the knowledge :)
-David