Commits

mrdon  committed d53173e

Add a hook to allow subclasses to load extra information from xwork
configuration files, changed exception to just use location
XW-402

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1078e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 8f20e6d

Comments (0)

Files changed (2)

File src/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java

         PackageConfig check = packageContexts.get(name);
         if (check != null) {
             throw new ConfigurationException("The package name '" + name 
-                    + "' is already been used by another package: " + check,
+                    + "' is already been used by another package: " + check.getLocation(),
                     packageContext);
             // would be better to throw ConfigurationException("name already used");
         }

File src/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

                     }
                 }
             }
+            
+            loadExtraConfiguration(doc);
 
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Loaded action configuration from: " + fileName);
     }
 
     /**
+     * Allows subclasses to load extra information from the document
+     * 
+     * @param doc The configuration document
+     */
+    protected void loadExtraConfiguration(Document doc) {
+        // no op
+    }
+
+    /**
      * Looks up the Interceptor Class from the interceptor-ref name and creates an instance, which is added to the
      * provided List, or, if this is a ref to a stack, it adds the Interceptor instances from the List to this stack.
      *