Details
Description
The method PropertyFileUtils.getResourceBundle(String bundleName, Locale locale) doesn't work correctly in an EAR.
I have the DS core JARs in the EAR /lib and I'm trying to use the JsfMessage feature in one of my WARs. Because getResourceBundle() calls ResourceBundle.getBundle(String bundleName, Locale locale), Java attempts to load the resource bundle using the classloader that was used to load PropertyFileUtils, which is the EAR's classloader. The property files are in the WAR, so Java can't find them.
Changing
return ResourceBundle.getBundle(bundleName, locale);
to
return ResourceBundle.getBundle(bundleName, locale, Thread.currentThread().getContextClassLoader());
fixes the problem.
Attachments
Issue Links
- is blocked by
-
DELTASPIKE-335 re-visit support of EARs
- Closed