Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Restrict quartz scheduler to single instance.

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I have configured the quartz scheduler with spring my application. It has two instances running and scheduler executing the job in two instance in the same time. Due to this my data base actions are happening twice(please do not consider the primary key). Please suggest me to restrict the scheduler to single instances. Means if one instance executing the job another instance should pick this job.

In some website I found the below code for restricting to single instance.




Unfortunately, it is telling that no table or view name found in the given data source. Do we need to create any table before using this org.quartz.impl.jdbcjobstore.JobStoreTX or any other ideas

Please suggest me to restrict the scheduler to single instance. Thanks in advance.
 
Ragupathirajan Venkatesan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I got the answer for this solution and missed to update to ranch users. If we implement the JDBCJobstore in quartz, neet do create the set of tables recommended by quartz itself, more over quarzt itself supplying the sql create statement for this purpose in quartz distribution accordting to the uderlying database.
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!