]
David Lloyd resolved WFLY-5318.
-------------------------------
Resolution: Rejected
This is a usage problem. If you want to include META-INF resources, you must declare that
fact in a jboss-deployment-structure.xml descriptor for the consuming deployment JAR.
Resource files under META-INF not found by ClassLoader.getResources
-------------------------------------------------------------------
Key: WFLY-5318
URL:
https://issues.jboss.org/browse/WFLY-5318
Project: WildFly
Issue Type: Bug
Components: Class Loading
Affects Versions: 9.0.1.Final
Reporter: Arto Huusko
Assignee: David Lloyd
ClassLoader.getResources("META-INF/example.properties") returns only such
resources that are available in JAR files that are deployed as EJB modules in the EAR.
That is, if a POJO JAR that has META-INF/example.properties is on the class path of an
EJB session, and the session does (any of the following)
-
Thread.currentThread().getContextClassLoader().getResources("META-INF/example.properties");
- getClass().getClassLoader().getResources("META-INF/example.properties");
-
MySessionBean.class.getClassLoader().getResources("META-INF/example.properties");
then the resource from the POJO jar is not returned. Resource files with the requested
name from all deployed EJB modules, however, are returned.