This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Batch Job Repository with sybase database.  RSS feed

 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • 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



 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!