Jan, James,
Thanks for your help, that looks promising. Mincong, the GSoC student, will
give your proposals a try tonight.
--Gunnar
2016-08-18 18:32 GMT+02:00 James Perkins <jperkins(a)redhat.com>:
You might need to implement an SPI [1] that would expose the job
XML.
WildFly will look for SPI's and use those to validate and get the job XML
data.
[1]:
https://github.com/jberet/jsr352/blob/master/
jberet-core/src/main/java/org/jberet/spi/JobXmlResolver.java
[2]:
https://github.com/wildfly/wildfly/blob/master/
batch/extension-jberet/src/main/java/org/wildfly/extension/batch/jberet/
deployment/WildFlyJobXmlResolver.java#L154-L160
On Thu, Aug 18, 2016 at 12:59 AM, Gunnar Morling <gunnar(a)hibernate.org>
wrote:
> Hi,
>
> Is there any example which shows how to deploy a JSR 352 batch job via a
> module added to WildFly rather than through a deployed application? This
> batch job should then be usable from applications which declare a
> dependency to that module.
>
> Trying this, I'm getting an error saying that the batch job's XML
> descriptor cannot be found [1]. I.e. the module with the batch job is
> visible to the deployed application (as the MassIndexer class can be
> accessed), but then JBeret cannot "see" the job XML descriptor within that
> module.
>
> Is there anything I can configure in the module.xml of the batch job's
> module for exposing its contents to JBeret?
>
> The use case is Hibernate Search where a GSoC student is working on a JSR
> 352 batch job for re-indexing entities. This job eventually should be part
> of Hibernate Search's modules, allowing users to run it if Hibernate Search
> is enabled for their application.
>
> Thanks for any pointers,
>
> --Gunnar
>
> [1] Exception: javax.batch.operations.JobStartException: JBERET000601:
> Failed to get job xml file for job mass-index.xml
> at org.jberet.creation.ArchiveXmlLoader.getJobXml(ArchiveXmlLoa
> der.java:129)
> at org.jberet.creation.ArchiveXmlLoader.loadJobXml(ArchiveXmlLo
> ader.java:91)
> at org.jberet.operations.JobOperatorImpl.start(JobOperatorImpl.
> java:102)
> at org.hibernate.search.jsr352.MassIndexer.start(MassIndexer.java:90)
> at org.hibernate.search.jsr352.PerformanceIT.testNewMassIndexer
> (PerformanceIT.java:167)
> ...
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
--
James R. Perkins
JBoss by Red Hat