Announcement Announcement Module
No announcement yet.
Spring Batch JDBC Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch JDBC

    We are using Spring Batch and have the job repository set to use the InterSystems Cache database. Since Intersystems Cache is not a SPring supported database, we are setting the "databaseType" to be "DERBY" as that most closely approximates the JDBC capabilities of the Intersystems JDBC driver. Almost everything works great, except the MaxValueIncrementer. There is a SQL statement for accessing the IDENTITY_VAL_LOCAL() stored procedure. Everywhere else in the Spring batch repository the "tablePrefix" of the jobRepository is used, except in the DerbyMaxValueIncrementer. Since the table prefix is not used in this class we are getting an error indicating IDENTITY_VAL_LOCAL() cannot be found. Our database admins will not allow us to put this stored proc in the default schema. Has anyone else had this problem and if so have they worked around it? We have currently copied this class into our own source repository and hard coded the package name. Everythings works fine. The obvious problem is that we do not want to have a copy of the Spring class in our application.



  • #2
    The DerbyMaxValueIncrementer is actually a Spring JDBC class and not a batch one so it wouldn't support the prefix option. However, the constructor for the DerbyMaxValueIncrementer does allow you to specify the incremeneter/sequence/etc that it should use. You can read more about that here: