. Memory usage improvement:

- Web-client now caches ResourceBundle objects and shares them between all users.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2412 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-02-16 14:21:17 +00:00
parent 9b23300bb7
commit 776d837c16
2 changed files with 52 additions and 18 deletions

View File

@@ -33,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.alfresco.config.ConfigService;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.importer.ImporterBootstrap;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.web.app.servlet.AuthenticationHelper;
@@ -483,14 +482,7 @@ public class Application
{
locale = Locale.getDefault();
}
bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, locale);
if (bundle == null)
{
throw new AlfrescoRuntimeException("Unable to load Alfresco messages bundle: " + MESSAGE_BUNDLE);
}
// apply our wrapper to catch MissingResourceException
bundle = new ResourceBundleWrapper(bundle);
bundle = ResourceBundleWrapper.findSharedResourceBundle(MESSAGE_BUNDLE, locale);
session.setAttribute(MESSAGE_BUNDLE, bundle);
}
@@ -520,14 +512,7 @@ public class Application
{
locale = Locale.getDefault();
}
bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, locale);
if (bundle == null)
{
throw new AlfrescoRuntimeException("Unable to load Alfresco messages bundle: " + MESSAGE_BUNDLE);
}
// apply our wrapper to catch MissingResourceException
bundle = new ResourceBundleWrapper(bundle);
bundle = ResourceBundleWrapper.findSharedResourceBundle(MESSAGE_BUNDLE, locale);
session.put(MESSAGE_BUNDLE, bundle);
}