-
Mar 30th, 2009, 04:36 PM
#1
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
-
Mar 31st, 2009, 05:49 AM
#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
-
Mar 31st, 2009, 09:00 AM
#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
-
Mar 31st, 2009, 09:24 AM
#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 ?)
-
Mar 31st, 2009, 12:06 PM
#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??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules