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

  • Spring batch persistence hbm

    Hi All,

    I am trying to see if i spring batch provides hbm files to create the tables needed to persist batch job infomation so that i can directly configure my session property to read them and create tables for me. I am using hsql db.
    Jbpm provides hbm files and hence creating tables is as simple as specifying the hbm path in session factory. Please let me know if i can do the same with spring batch.
    If hbms are not provided, then what is the best approach to create those tables at server start up. We are still in development mode and hence are creating all tables at server start up and need a way to get spring batch tables in.


  • #2
    you could use SimpleJdbcTestUtils(Spring Javadoc 3.0, but exists in 2.5 too) executeSqlScript with the provided schema-hsqldb.sql in Spring Batch Core at Server Startup


    • #3
      Is there any place i can find a sample implementation. I couldnt find a reference anywhere. I would appreciate if you can point me to some sample.



      • #4
        i have no sample at my hands,usually one would just connect to the running database and execute the sql statements

        i guess you run hsqldb in-memory mode ? maybe you should switch to servermode

        anyways, i do not know how you start/deploy your spring batch application, but it should be no problem to open a jdbc connection to hsqldb and execute the create table statements before spring application starts (maybe with a custom servlet ?)


        • #5
          Thanks for the response.
          I am able to run the scripts at server start up. I just plugged in a DataInitializer to do the job.

          I was trying this to get quartz persistance up and running. But i am getting the exception as unable to serialized SimpleJobLauncher. Any idea??