I have the exact same problem. In a Jboss instance, the QuartzService is successfully created. Even more, existing Quartz jobs are being executed as expected.
I want to be able to access the Quartz Scheduler from a console application. However the following code prints out 'null' : | | public static void main(String[] args) throws Exception { | InitialContext iniCtx = getInitialContext(); | Scheduler scheduler = (Scheduler)iniCtx.lookup("Quartz"); | | System.out.println(String.format("Scheduler : %s", scheduler)); | } | | public static InitialContext getInitialContext() throws Exception { | Hashtable<String, String> props = getInitialContextProperties(); | return new InitialContext(props); | } | | private static Hashtable<String, String> getInitialContextProperties() { | Hashtable<String, String> props = new Hashtable<String, String>(); | props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); | props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); | return props; | } | | There are no exceptions thrown, however the Scheduler object is null. Am I doing something wrong ? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025771#4025771 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025771 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user