Announcement Announcement Module
Collapse
No announcement yet.
Spring batch persistence hbm Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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.

    Thanks,
    Sushma

  • #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

    Comment


    • #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.

      Thanks,
      Sushma

      Comment


      • #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 ?)

        Comment


        • #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??

          Comment

          Working...
          X