This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring Batch Job Repository with sybase database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Batch Job Repository with sybase database." Watch "Spring Batch Job Repository with sybase database." New topic
Author

Spring Batch Job Repository with sybase database.

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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




Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 606

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.


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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.
 
subject: Spring Batch Job Repository with sybase database.