[
https://issues.jboss.org/browse/AS7-5212?page=com.atlassian.jira.plugin.s...
]
James Livingston commented on AS7-5212:
---------------------------------------
ModuleXmlParser.parseSystemDependency() currently uses
PathFilters.getDefaultImportFilter() which means that it will never pick up
META-INF/services. Changing this to PathFilters.getDefaultImportFilterWithServices() makes
it work if we can scan the JRE jars that the files are located in, but strictly speaking
the JRE's classloader could have special handling for getResource that finds them.
Changing the method call (or adding a 'services="import"' option
equivalent to module dependencies that alters it) works on the several JRE's I've
tested (sun JDK 1.6.0_31, OpenJDK 1.7.0_3, some version of IBM j9 1.6), but there is a
chance it may not work no others.
JRE-provided services are not available to deployments
------------------------------------------------------
Key: AS7-5212
URL:
https://issues.jboss.org/browse/AS7-5212
Project: Application Server 7
Issue Type: Bug
Components: Class Loading
Affects Versions: 7.1.2.Final (EAP)
Reporter: James Livingston
Assignee: David Lloyd
Fix For: 7.1.3.Final (EAP)
JBoss Modules does not currently support exporting META-INF/services from a system
dependency as it does for module dependencies. As a result, any services provided by the
JRE cannot be seen from other modules.
This results in deployments not being able to use javax.print.PrintServiceLookup and
other API, since they will not find any implementations.
The modules/sun/jdk/main/service-loader-resources/ exists purely to work around this
problem. It is not the best solution since the contents are JRE-specific.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira