I'm trying to create an ejb timer and successful to do so but however unable to deploy it successfully. I'm using ejb timer first time so I might not be doing it right. so kindly if someone guides me in the right direction. Thank you
followed the tutorial from http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_16
import javax.ejb.Schedule;
import javax.ejb.Stateless;
import javax.ejb.Timer;
@Stateless
public class ScheduleRoutine {
/**
* Default constructor.
*/
public ScheduleRoutine() {
// TODO Auto-generated constructor stub
}
@Schedule(second="*/1", minute="*",hour="*", persistent=false)
public void scheduledTimeout(final Timer t) {
System.out.println("@Schedule called at: " + new java.util.Date());
}
}
This is the code I'm using I think there's no problem with it. I'm using JBoss AS 7.1.1 with eclipse and all I'm doing is 'run on server' it runs but it's unable to display the output as it is supposed to.
EDIT :(Solution)
It didn't work when i tried to run it from eclipse but then i tried exporting the jar manually then it was deployed successfully.