[wildfly-dev] Deploying JSR 352 job as a module

James Perkins jperkins at redhat.com
Thu Aug 18 12:32:41 EDT 2016


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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>



-- 
James R. Perkins
JBoss by Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160818/9b9cf02e/attachment.html 


More information about the wildfly-dev mailing list