• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

configuring Quartz scheduler in tomcat 6 using JNDI

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm working on project that involves porting legacy app. from old version of JBoss and java to tomcat 6.x and jdk 1.6.
Quartz 1.6 is configured as JNDI resource using mbean in old app.
For new app. Quartz version remains the same.

What I 've done till now:
1. Created myWebApp_quartz.properties file and placed under /webapps/myWebApp/WEB-INF/classes

2. Added following entry in web.xml

I get an exception saying, javax.naming.NameNotFoundException: Name myWebAppQuartz is not bound in this Context
It means that quartz instance isn't registered with JNDI.
I want to know how to configure Quartz scheduler in tomcat 6 using JNDI.
Thank you.
 
Shantanu Puranik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just figured out with help of tomcat help resource
Scroll down the page to section Adding Custom Resource Factories

1. Implement interface javax.naming.spi.ObjectFactory

2. create quartz.properties file as shown in the above post (consider specifying additional properties as required by your app.)

3. In web.xml add resource ref
4. create context.xml in the project structure at location /webapps/META-INF.
When deployed tomcat will automatically create <myWebApp>.xml in dir. \tomcat\conf\Catalina\localhost and the contents of context.xml will be copied into it.
Finally, perform lookup as
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic