Author: mircea.markus
Date: 2008-08-04 11:57:29 -0400 (Mon, 04 Aug 2008)
New Revision: 6500
Modified:
core/trunk/src/main/resources/jbosscache-config-3.0.xsd
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationSchemaTest.java
Log:
schema now supports the 'listeners' configuration elements
Modified: core/trunk/src/main/resources/jbosscache-config-3.0.xsd
===================================================================
--- core/trunk/src/main/resources/jbosscache-config-3.0.xsd 2008-08-04 15:56:43 UTC (rev
6499)
+++ core/trunk/src/main/resources/jbosscache-config-3.0.xsd 2008-08-04 15:57:29 UTC (rev
6500)
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <!-- todo mmarkus - maxOccurs can be added for some elements, revisit that -->
+
<xs:element name="jbosscache">
<xs:complexType>
<xs:all>
- <xs:element name="locking" type="lockingType"
minOccurs="0"/>
- <xs:element name="transaction" type="transactionType"
minOccurs="0"/>
- <xs:element name="startup" type="startupType"
minOccurs="0"/>
- <xs:element name="stateRetrieval"
type="stateRetrievalType" minOccurs="0"/>
- <xs:element name="shutdown" type="shutdownType"
minOccurs="0"/>
- <xs:element name="serialization"
type="serializationType" minOccurs="0"/>
- <xs:element name="replication" type="replicationType"
minOccurs="0"/>
- <xs:element name="invalidation"
type="invalidationType" minOccurs="0"/>
- <xs:element name="jmxStatistics"
type="jmxStatisticsType" minOccurs="0"/>
- <xs:element name="transport" type="transportType"
minOccurs="0"/>
- <xs:element name="eviction" type="evictionType"
minOccurs="0"/>
- <xs:element name="loaders" type="loadersType"
minOccurs="0"/>
+ <xs:element name="locking" type="lockingType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="transaction" type="transactionType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="startup" type="startupType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="stateRetrieval"
type="stateRetrievalType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="shutdown" type="shutdownType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="serialization"
type="serializationType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="replication" type="replicationType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="invalidation"
type="invalidationType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="jmxStatistics"
type="jmxStatisticsType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="listeners" type="listenersType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="transport" type="transportType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="eviction" type="evictionType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="loaders" type="loadersType"
minOccurs="0" maxOccurs="1"/>
<xs:element name="customInterceptors"
type="customInterceptorsType" minOccurs="0"/>
</xs:all>
</xs:complexType>
@@ -95,17 +96,17 @@
<xs:element name="sync" type="syncType"
minOccurs="0" maxOccurs="1"/>
<xs:element name="async" type="asyncType"
minOccurs="0" maxOccurs="1"/>
</xs:choice>
- <xs:element name="buddy" minOccurs="0">
+ <xs:element name="buddy" minOccurs="0"
maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="0">
- <xs:element name="dataGravitation">
+ <xs:element name="dataGravitation"
maxOccurs="1">
<xs:complexType>
<xs:attribute name="auto"
type="booleanType"/>
<xs:attribute name="removeOnFind"
type="booleanType"/>
<xs:attribute name="searchBackupTrees"
type="booleanType"/>
</xs:complexType>
</xs:element>
- <xs:element name="locator">
+ <xs:element name="locator" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element name="properties"
type="xs:string" maxOccurs="1"/>
@@ -133,6 +134,10 @@
<xs:attribute name="enabled" type="booleanType"/>
</xs:complexType>
+ <xs:complexType name="listenersType">
+ <xs:attribute name="asyncPoolSize"
type="positiveInteger"/>
+ </xs:complexType>
+
<xs:complexType name="transportType">
<xs:sequence>
<xs:element name="jgroupsConfig" type="xs:anyType"
minOccurs="0" maxOccurs="1"/>
@@ -154,7 +159,7 @@
<xs:complexType name="evictionType">
<xs:sequence>
- <xs:element name="default" type="evictionRegionType"
minOccurs="0"/>
+ <xs:element name="default" type="evictionRegionType"
minOccurs="0" maxOccurs="1"/>
<xs:element name="region" minOccurs="0"
maxOccurs="unbounded" type="evictionRegionType"/>
</xs:sequence>
<xs:attribute name="wakeUpInterval" type="positiveInteger"
use="required"/>
@@ -173,7 +178,7 @@
<xs:complexType name="loadersType">
<xs:sequence>
- <xs:element name="preload" maxOccurs="1">
+ <xs:element name="preload" minOccurs="0"
maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="node"
maxOccurs="unbounded">
@@ -188,10 +193,10 @@
<xs:complexType>
<xs:all>
<xs:element name="properties"/>
- <xs:element name="singletonStore"
minOccurs="0">
+ <xs:element name="singletonStore" minOccurs="0"
maxOccurs="1">
<xs:complexType>
<xs:all>
- <xs:element name="properties"
type="xs:string"/>
+ <xs:element name="properties"
type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:all>
<xs:attribute name="enabled"
type="booleanType"/>
<xs:attribute name="class"
type="xs:string"/>
Modified:
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationSchemaTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationSchemaTest.java 2008-08-04
15:56:43 UTC (rev 6499)
+++
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationSchemaTest.java 2008-08-04
15:57:29 UTC (rev 6500)
@@ -46,6 +46,7 @@
{
System.out.println("file = " + file);
parser.parseFile(BASE_DIR_FOR_CONFIG + File.separator + file);
+ System.out.println("Processed file = " + file);
for (Exception e : handler.exceptionList) e.printStackTrace();
assert handler.noErrors() : "error during parsing (file " + file +
")";
}