[jboss-jira] [JBoss JIRA] (WFLY-3971) Jar Services in META-INF/services are not loaded from static modules

Lucas K (JIRA) issues at jboss.org
Mon Aug 31 08:21:05 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-3971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103573#comment-13103573 ] 

Lucas K commented on WFLY-3971:
-------------------------------

Got the same problem with atmospheres [AnnotationScanningServletContainerInitializer|http://atmosphere.github.io/atmosphere/apidocs/org/atmosphere/cpr/AnnotationScanningServletContainerInitializer.html]. It's not called, if atmosphere is a static module.

But i got a workaround for the moment:
I added export="true" to the atmosphere-module and added a new JAR to the WEB-INF/lib folder. The JAR only contains the META-INF folder of atmosphere.jar. Inside it there is the services folder with the "javax.servlet.ServletContainerInitializer" file.

The atmosphere-module gets loaded and exported. So if the new JAR is deployed the ServletContainerInitializer is read and the AnnotationScanningServletContainerInitializer of atmosphere gets called.

I hope it helps someone who has the same problem and is also waiting for the bugfix.

> Jar Services in META-INF/services are not loaded from static modules
> --------------------------------------------------------------------
>
>                 Key: WFLY-3971
>                 URL: https://issues.jboss.org/browse/WFLY-3971
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: Web (Undertow)
>    Affects Versions: 8.1.0.Final, 9.0.0.Final, 10.0.0.Alpha6
>            Reporter: Tomas Repel
>            Assignee: Stuart Douglas
>
> If the web application (war) uses jar file from static module, the content of META-INF/services has no effect. If the jar is located inside WEB-INF/lib, services are loaded successfully.
> Neither adding `Dependencies: my.module.name.com services` into MANIFEST.MF nor adding `services="import"` to jboss-deployment-structure.xml works.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list