@Resource 
private SessionContext ctx;
@Resource(mappedName="java:/DefaultDS")
private DataSource defaultDs;

public void createTimer() throws CustomException {
   try {
       Connection conn = defaultDs.getConnection();
       Statement stmt = conn.createStatement();
       stmt.execute("delete from TIMERS");
       TimerService timerService = ctx.getTimerService();
       timerService.createTimer(20000, 300000, "I'm a chinese, english is not 
good.");
   } catch (Throwable ex) {
       LogHome.getLog().error("", ex);
       throw new CustomException(ex);
   } 
}


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973154#3973154

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973154
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to