Irazza
Irazza

Reputation: 281

JobRepository on JBatch

I need to configure a job-repository in jbatch, beacause I need to set a custom datasource. I'm not able to understand how code its xml and where I have to put it in my project.

<job-repository id="jobRepository"
    data-source="dataSource"
    transaction-manager="transactionManager"    
    table-prefix="JCG_BATCH_"
    max-varchar-length="1000"/>

I think that the code I need should be looking similar to this one ( but this is Spring Batch that i cannot use )

Upvotes: 0

Views: 215

Answers (1)

Michael Meneghini
Michael Meneghini

Reputation: 76

To set a custom datasource you should create a batch-config.properties at the path META-INF/services.

And there you can set your new datasource:

JNDI_NAME= your datasource

Upvotes: 1

Related Questions