• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Spring Batch Job Repository with sybase database.

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

I am using the spring batch 2.1.9. The jobRepository is setup using the sybase database. Everything is running fine. But while creation of job-ids the job ids are not in sequential manner. Every day the sequence is prefixes with different number and generating the job ids from one. I want the behaviour to start the sequenece number from 1 and continues by incrementing by 1 for every new job.

Is any setting at xml configuration level or database level needs to change ?

The job repository is defined as


and the sequence table definition from jar is



Thanks



 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Every day the sequence is prefixes with different number and generating the job ids from one.


Could you provide an example of the job-id's being generated. Where are you seeing these different id's? In the Job_Instance_Table?

I want the behaviour to start the sequenece number from 1 and continues by incrementing by 1 for every new job.


This is supposed to be the default behavior. It should work that way out of the box

Is any setting at xml configuration level or database level needs to change ?


Your config looks fine.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Found the problem. The sybase database is running in development environment and shut down everyday. There is identity gap due to this.

Thanks
 
Evil is afoot. But this tiny ad is just an ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic