Using the EJB Timer service I get a warning exception about timer not being registered with transaction (I also tried to add code to start a transaction inside the timeout method, but this gives the same result). Trying to start a User transaction before, by calling sessionContext.getUserTransaction().begin(), throws an java.lang.IllegalStateException: it is illegal to inject UserTransaction into a CMT bean).
Any ideas?
00:02:38,459 WARN [TimerImpl] Timer was not registered with Tx, reseting state: [id=1target=[target=jboss.j2ee:service=EJB3,name= com.saguru.searchengine.impl.SearchEngineEJBImpl],remaining=-754,periode=2000,in_timeout]
@javax.ejb.Timeout public void ejbTimeout(javax.ejb.Timer timer) { System.out.println( this.getClass().getName() + "@" + new java.util.Date() + ": Processing..." ); } public void businessMethod() { getSessionContext().getTimerService().createTimer( 100L, 2000L, null ); }
I have created a JIRA bug on this:
http://jira.jboss.com/jira/browse/EJBTHREE-97