Hi,
this is my SLSB:
Stateless
public class TestBean implements ITest {
Logger log = Logger.getLogger(this.getClass());
@Resource
private TimerService timerService;
@Override
public void callMe() {
String array[] = { "Pinco", "Pallo", "Pallino" };
for (int i = 0; i < array.length; i++) {
timerService.createTimer(new Date(),(1 + i) * 60 * 1000, array[i] + " "+i);
}
}
@Timeout
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
@Interceptors(TimerInterceptor.class)
private void testMe(Timer t) {
log.info("I am in timeout method");
if (t != null) {
System.out.println((String) t.getInfo());
}
}
The TimerInterceptor class looks like this:
public class TimerInterceptor {
Logger log = Logger.getLogger(this.getClass());
@AroundTimeout
public Object checkTimer(InvocationContext invContext) throws Exception {
log.info("I am in interceptor");
Timer t = (Timer) invContext.getTimer();
String timerName = (String) t.getInfo();
log.info("INTERCEPTOR: " + timerName);
return invContext.proceed();
}
I'd expect to find a log insertion, but there isn't. Breakpoint is also ignored. Am I missing something?
Thanks