Announcement Announcement Module
Collapse
No announcement yet.
JobRepository, Table Prefix, and DB2 with Football Sample Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JobRepository, Table Prefix, and DB2 with Football Sample

    We are evaluating Spring Batch and attempting to establish DB2 as the jobrepository. I am a newbie to Spring and even XML for that matter so please forgive in advance for stupid questions or comments. I would think that DB2 would be common at many shops but I did notice that there was a comment by Dr. Syer in a thread about many other threads about this subject being "in anger using DB2".

    1) I am trying to use the job-repository entry on page 24 of the user manual and I can't seem to get it to work. Our tables are using a schema of DT. so I am trying something like below. I may have an ending tag out of place or something stupid.

    <job id="footballJob" job-repository id="jobRepository"
    dataSource="dataSource"
    transactionManager="transactionManager"
    isolation-level-for-create="SERIALIZABLE"
    table-prefix="DT.BATCH_"/>
    >

    I am getting :
    Attribute name "job-repository" associated with an element type "job" must be followed by the ' = ' character.

    When I try other variations, I get something like "Attribute name "job-repository" associated with an element type "job" must be followed by the ' = ' character."

    Since the first 4 properties are the default, how would I make this entry just to make the table prefix effective for my schema?

    2) I noticed in another thread, it mentions something like shown below and I don't know where I might try this for the FootBall Job sample. Can someone advise me on where this might go in the samples stuff?:
    <bean id="jobRepository" class="org.springframework.batch.execution.reposit ory.JobRepositoryFactoryBean"
    p:databaseType="db2" p:dataSource-ref="dataSource" />

    3) Any other pitfalls I might encounter trying to get the samples to work with DB2 job repository tables. I have already looked at lots of stuff regarding the incrementer and if anybody can simplify any change I might need to make, that might be helpful.

    Thanks very much in advance.

    BJB
    Last edited by bjb; Sep 17th, 2009, 03:28 PM.

  • #2
    It looks to me like your first entry isn't valid XML. I'm not sure if it was a copy-paste error or not, but job-repository should be a separate entry, something like:

    <job-repository id="jobRepository"
    dataSource="dataSource"
    transactionManager="transactionManager"
    isolation-level-for-create="SERIALIZABLE"
    table-prefix="DT.BATCH_"/>

    The job can then reference that job repository.

    Comment

    Working...
    X