I am new to EJB3 world. I want to create scheduler for file processing in EJB. I tried the following code..
package com.fks.nclp.ejb.scheduler;
import javax.ejb.Schedule;
import javax.ejb.Schedules;
import javax.ejb.Stateless;
@Stateless
public class AutoTimerBean {
@Schedules(
{
@Schedule(second="3",persistent=false)
}
)
public void executeOnEveryTwoSecond(){
System.out.println("THIS IS TESTING OF EJB SCHEDULER");
}
}
And deployed EAR application on GlassFish3.1. As per my requirement the scheduler should be fired at every three seconds.
But its not happening. Any suggestion ??? Thanks, Gunjan.