I am calling scheduler from a Java Console application. JBoss is running on
localhost.
I am trying to use Quartz Scheduler that has been deployed as a Service under
JBoss using the supplied MBean service.xml. In the JBoss logs, I can clearly
see that Quartz service is created and an instance of scheduler was also
created.
Log: QuartzService(Quartz) created.
As Quartz is the default JNDI name, I am using below code and my scheduler is
always null. Any help is really appreciated.
Code:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
InitialContext ctx = new InitialContext(env);
Scheduler sched = (Scheduler) ctx.lookup("Quartz");
at this point my sched is always null. i am unable to figure out whats wrong.
The way i am using JNDI?? please advise...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3910489#3910489
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3910489
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user