-
1. Re: Using different job repositories?
cfang Jul 17, 2018 9:04 AM (in response to crettig)In admin console, you can create JDBC job repositories, and assign one of them as the default batch job repository (say, jdbc1) for the entire application server. It means all deployed batch applications will by default use this job repository (jdbc1).
You can also configure a custom job repository for each application via jboss-all.xml to override the default server-wide job repository. Please see the batch subsystem schema in your application server for more details.
-
2. Re: Using different job repositories?
crettig Jul 18, 2018 3:35 AM (in response to cfang)Hello,
Does this jboss-all.xml also apply to .WAR deployments or do I have to provide an .EAR for it to work?
If I understand right then I would place this jboss-all.xml into every of my .WAR files under WEB-INF/jboss-all.xml and each pointing to a different data, e.g.
Tenant-A.war
<
jboss
umlns
=
"urn:jboss:1.0"
>
<
batch
xmlns
=
"urn:jboss:batch-jberet:1.0"
>
<
job-repository
>
<
named
name
=
"batch-ds-A"
/>
</
job-repository
>
<
thread-pool
name
=
"deployment-thread-pool"
/>
</
batch
>
</
jboss
>
Tenant-B.war
<
jboss
umlns
=
"urn:jboss:1.0"
>
<
batch
xmlns
=
"urn:jboss:batch-jberet:1.0"
>
<
job-repository
>
<
named
name
=
"batch-ds-B"
/>
</
job-repository
>
<
thread-pool
name
=
"deployment-thread-pool"
/>
</
batch
>
</
jboss
>
...
(Provided that I have configured the dfifferent data sources before in the admin console).
Right?
chris
-
3. Re: Using different job repositories?
cfang Jul 18, 2018 10:53 AM (in response to crettig)yes, you can include jboss-all.xml in each WAR file to customize its configuration.
You don't have to include <thread-pool> element, unless you want to customize thread-pool too.
The job-repository named element refers to the name of the job repository that you've already defined in WildFly server configuration through either CLI or Management Console.
-
4. Re: Using different job repositories?
crettig Jul 19, 2018 5:28 AM (in response to cfang)Hello,
I tried it out now and it works perfectly . many thanks for the help here
One last question on this: in the database table JOB_INSTANCE there is one column APPLICATIONNAME and here I see the name
of my war file (which is uniqa-ecm-batch-processing-1.0.0-SNAPSHOT).
Is it possible to start a job and provide the applicationname myself so that not the name of the deployable (WAR file) is used here?
regards, chris
-
5. Re: Using different job repositories?
cfang Jul 19, 2018 8:03 AM (in response to crettig)No, currently applicationname is not configurable.