I am working with Java EE EJB timers and Wildfly 8.2.1 server with oracle database.When run a scheduler in my application at cluster environment not working fine,even though selected Transaction Isolation: TRANSACTION_SERIALIZABLE in Wildfly.I am deploying in two nodes it accessing from two node but I need one node only.
In EJB:
@Singleton
public class TimerSessionBean implements TimerSessionBeanRemote {
@Timeout
@Schedule(
hour="11",minute="0",second="00,30"
)
public void createTimer(){
System.out.println("timeoutHandler : "+new Date());
DAO.getInboxDaoImpl().updateStatus();
}
In DaoImpl:
@Override
public Boolean updateStatus(String chngCustStus){
int resVal = 0;
String sql = "INSERT INTO bonus SELECT ename, job, sal, comm FROM emp
WHERE comm > sal * 0.25";
}
}
where In Wildfly server: selected as
Transaction Isolation: TRANSACTION_SERIALIZABLE