To obtain a JNDI reference to the Scheduler API, you have to look up the scheduler name in the JNDI as shown in the example below.
Scheduler scheduler; try { InitialContext ctx = new InitialContext(); scheduler = (Scheduler)ctx.lookup("scheduler"); } catch (NamingException ne) { // The Scheduler Service is either not started, // or not deployed return; } |