Hi,
I`ve had to port my application from glassfish to jboss and in the process i`m
running into some strange issues. My biggest problem is that i cant seem to get
my timerbeans working. This is my code in the session bean that start the timer
| @Stateless
| public class RulesTimerBean implements RulesTimerBeanLocal{
| @Resource
| private TimerService timerService;
| @EJB
| private EventlogFacadeLocal eventlogFacade;
| @EJB
| private ExceptionsFacadeLocal exceptionsFacade;
| @EJB
| private IncommingFacadeLocal incommingFacade;
| @EJB
| private MaillistFacadeLocal maillistFacade;
| @EJB
| private SettingsFacadeLocal settingsFacade;
| @Resource(mappedName = "java:mail/IMSS")
| Session mailSession;
|
|public void startTimer() {
| boolean doesExist = false;
| for (Timer timer : new ArrayList(timerService.getTimers())) {
| if (((String)
timer.getInfo()).equalsIgnoreCase("RulesTimerBean")) {
|
Logger.getLogger(TimerSessionBean.class.getName()).log(Level.INFO, "Found
existing timer...setting doesExist to true");
| doesExist = true;
| }
| }
|
| if (doesExist == false) {
|
Logger.getLogger(TimerSessionBean.class.getName()).log(Level.INFO, "Did not
find an existing timer...starting a new one");
| timeout =
6l;//settingsFacade.findByActive().getPollTimeForChecks();
| timerService.createTimer(timeout, timeout, "RulesTimerBean");
| }
| Logger.getLogger(TimerSessionBean.class.getName()).log(Level.INFO,
"IncommingTimer started");
| }
|
|
the line
timerService.createTimer(timeout, timeout, "RulesTimerBean");
throws an exception
2007-12-04 07:55:31,259 ERROR [STDERR] 2007/12/04 07:55:31
cib.ibot.imss.ejb3.session.timer.RulesTimerBean startTimer
INFO: Did not find an existing timer...starting a new one
2007-12-04 07:55:39,674 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState:
created
2007-12-04 07:55:39,690 WARN [com.arjuna.ats.jta.logging.loggerI18N]
[com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror]
[com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror]
TransactionImple.enlistResource - XAResource.start returned:
XAException.XAER_PROTO for < 131075, 25, 23,
1-abf2aaa:bc4:4754e6ba:f9abf2aaa:bc4:4754e6ba:fc
>
2007-12-04 07:55:39,690 ERROR [STDERR]
org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a
new tx when old is not complete! old: < 131075, 25, 23,
1-abf2aaa:bc4:4754e6ba:33abf2aaa:bc4:4754e6ba:38
>, new < 131075, 25, 23,
1-abf2aaa:bc4:4754e6ba:f9abf2aaa:bc4:4754e6ba:fc
>, flags 0
2007-12-04 07:55:40,144 ERROR [STDERR] at
org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:886)
2007-12-04 07:55:40,144 ERROR [STDERR] at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:776)
2007-12-04 07:55:40,144 ERROR [STDERR] at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:499)
2007-12-04 07:55:40,144 ERROR [STDERR] at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
2007-12-04 07:55:40,646 ERROR [STDERR] at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
2007-12-04 07:55:40,646 ERROR [STDERR] at
org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
2007-12-04 07:55:40,646 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
2007-12-04 07:55:40,646 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
2007-12-04 07:55:41,147 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
2007-12-04 07:55:41,147 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
2007-12-04 07:55:41,147 ERROR [STDERR] at
org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.insertTimer(GeneralPurposeDatabasePersistencePlugin.java:199)
2007-12-04 07:55:41,147 ERROR [STDERR] at
org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(DatabasePersistencePolicy.java:120)
2007-12-04 07:55:41,649 ERROR [STDERR] at
sun.refle