ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classLoader);
PortalContainer portalContainer = PortalContainer.getInstance();
if (portalContainer != null) {
ResourceBundleService resourceBundleService = (ResourceBundleService) portalContainer
.getComponentInstance(ResourceBundleService.class);
if (resourceBundleService != null) {
String[] portalBundles = resourceBundleService.getSharedResourceBundleNames();
if (baseName != null) {
String[] bundles = new String[portalBundles.length + 1];
System.arraycopy(portalBundles, 0, bundles, 0, portalBundles.length);
bundles[portalBundles.length] = baseName;
portalBundles = bundles;
}
return resourceBundleService.getResourceBundle(portalBundles, locale);
}
}
//
if (baseName != null) {