I have two DataSource to be executed in EJB bean class.
the following is the my EJB class code:
The AbcTimerLocal is as follows:
In some servelt i am calling the setTimerInterval() method, in this the timer is creating, so that every 5000 millisec the Time Out ( handleCallback(..)) will call. In the callback or time out method i am calling two different DAO's which are call two different DataSources and will execute some SQL statements.
while executing the second DAO method, i am getting the following WARN message in JBoss server.log
WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] Multiple last resources have been added to the current transaction. This is transactionally unsafe and should not be relied upon. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@d38525
My question is , Why I am getting this WARM message and under waht situation will get this message?
I ahve seen that link already and i have done some changes in time out method:
i have created one method inside my EJB class as follows:
calling this method in the time out method
according to that thread which you posted, the method which annotated with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) will execute its own transactional context.
But i dont know what wrong with above code, still I am getting WARN messages.
I have tried to call both DAO methods like above but no use...........