[jbosscache-commits] JBoss Cache SVN: r4683 - core/trunk/src/main/java/org/jboss/cache/factories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Oct 25 01:57:46 EDT 2007


Author: bstansberry at jboss.com
Date: 2007-10-25 01:57:46 -0400 (Thu, 25 Oct 2007)
New Revision: 4683

Modified:
   core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
Log:
[JBCACHE-1156] Expose a method to parse a Configuration from the containing Element

Modified: core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java	2007-10-24 21:58:48 UTC (rev 4682)
+++ core/trunk/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java	2007-10-25 05:57:46 UTC (rev 4683)
@@ -90,7 +90,12 @@
       Element root = XmlHelper.getDocumentRoot(stream);
       Element mbeanElement = getMBeanElement(root);
 
-      ParsedAttributes attributes = extractAttributes(mbeanElement);
+      return parseConfiguration(mbeanElement);
+   }
+   
+   public Configuration parseConfiguration(Element configurationRoot)
+   {
+      ParsedAttributes attributes = extractAttributes(configurationRoot);
 
       // Deal with legacy attributes we no longer support
       handleRemovedAttributes(attributes);
@@ -103,7 +108,7 @@
       // Special handling for XML elements -- we hard code the parsing
       setXmlValues(c, attributes.xmlAttribs);
 
-      return c;
+      return c;      
    }
 
    /**




More information about the jbosscache-commits mailing list