mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-4067 Skips package reloading to avoid double initialisation of actions, interceptors, and so on
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1483648 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+9
@@ -507,6 +507,15 @@ public class XmlConfigurationProvider implements ConfigurationProvider {
|
||||
* Create a PackageConfig from an XML element representing it.
|
||||
*/
|
||||
protected PackageConfig addPackage(Element packageElement) throws ConfigurationException {
|
||||
String packageName = packageElement.getAttribute("name");
|
||||
PackageConfig packageConfig = configuration.getPackageConfig(packageName);
|
||||
if (packageConfig != null) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Package [#0] already loaded, skipping re-loading it and using existing PackageConfig [#1]", packageName, packageConfig);
|
||||
}
|
||||
return packageConfig;
|
||||
}
|
||||
|
||||
PackageConfig.Builder newPackage = buildPackageContext(packageElement);
|
||||
|
||||
if (newPackage.isNeedsRefresh()) {
|
||||
|
||||
Reference in New Issue
Block a user