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@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.


On Thu, Aug 18, 2016 at 12:59 AM, Gunnar Morling <gunnar@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(ArchiveXmlLoader.java:129)
    at org.jberet.creation.ArchiveXmlLoader.loadJobXml(ArchiveXmlLoader.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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev



--
James R. Perkins
JBoss by Red Hat