[jboss-cvs] JBossAS SVN: r106148 - in projects/profileservice/trunk/domain/src/test: resources/schemas and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 18 06:43:55 EDT 2010


Author: alex.loubyansky at jboss.com
Date: 2010-06-18 06:43:54 -0400 (Fri, 18 Jun 2010)
New Revision: 106148

Removed:
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-resources.xsd
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-remoting_3_1.xsd
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-threads_2_0.xsd
Modified:
   projects/profileservice/trunk/domain/src/test/java/org/jboss/test/profileservice/domain/parsing/test/XSDValidationUnitTestCase.java
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-host.xsd
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-servers.xsd
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-web.xsd
   projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain.xsd
Log:
merged resources schema into servers, added validation tests for domain and host schemas, other fixes

Modified: projects/profileservice/trunk/domain/src/test/java/org/jboss/test/profileservice/domain/parsing/test/XSDValidationUnitTestCase.java
===================================================================
--- projects/profileservice/trunk/domain/src/test/java/org/jboss/test/profileservice/domain/parsing/test/XSDValidationUnitTestCase.java	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/java/org/jboss/test/profileservice/domain/parsing/test/XSDValidationUnitTestCase.java	2010-06-18 10:43:54 UTC (rev 106148)
@@ -35,6 +35,16 @@
       validateSchema("jboss-domain-servers.xsd");
    }
 
+   public void testDomain() throws Exception
+   {
+      validateSchema("jboss-domain.xsd");
+   }
+
+   public void testHost() throws Exception
+   {
+      validateSchema("jboss-domain-host.xsd");
+   }
+
    private void validateSchema(String name) throws IOException
    {
       URL xsd = getSchemaUrl(name);

Modified: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-host.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-host.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-host.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -48,8 +48,8 @@
         <xs:choice minOccurs="0" maxOccurs="unbounded">
             <xs:element name="server-socket" type="net-conf-serverType"/>
         </xs:choice>
-        <xs:attribute name="group-size" type="xs:positiveInteger" default="0" use="optional"/>
-        <xs:attribute name="maximum-offset" type="xs:positiveInteger" default="100" use="optional"/>
+        <xs:attribute name="group-size" type="xs:nonNegativeInteger" default="0" use="optional"/>
+        <xs:attribute name="maximum-offset" type="xs:nonNegativeInteger" default="100" use="optional"/>
     </xs:complexType>
 
     <xs:complexType name="locationType">

Deleted: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-resources.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-resources.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-resources.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    targetNamespace="urn:jboss:domain:1.0" xmlns="urn:jboss:domain:1.0">
-
-    <!-- Include the common definitions -->
-    <xs:include schemaLocation="jboss-domain-common.xsd"/>
-
-    <!-- resources related definitions -->
-    <xs:complexType name="resourcesType">
-        <xs:choice minOccurs="0" maxOccurs="unbounded">
-            <xs:element name="external-jndi-resource" type="external-jndi-resourceType"/>
-            <xs:element name="jdbc-resource" type="external-jndi-resourceType"/>
-            <xs:element name="mail-resource" type="mail-resourceType"/>
-            <xs:element name="persistence-manager-factory-resource"
-                type="persistence-manager-factory-resourceType"/>
-            <!-- 
-            <xs:group ref="connector-resource"/>
-            <xs:group ref="resource-adapter-config"/>
-            <xs:group ref="connector-connection-pool"/>
-            -->
-        </xs:choice>
-        <xs:attribute name="name"/>
-        <xs:attribute name="jndi-name">
-            <xs:annotation>
-                <xs:documentation>The JNDI name under which to bind the resource</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-        <xs:attribute name="factory-class">
-            <xs:annotation>
-                <xs:documentation>The class name of the ObjectFactory</xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:complexType>
-
-    <xs:complexType name="external-jndi-resourceType">
-        <xs:complexContent>
-            <xs:extension base="resource-commonType">
-                <xs:attribute name="jndi-lookup-name" use="required"/>
-                <xs:attribute name="res-type" use="required"/>
-                <xs:attribute name="factory-class" use="required"/>
-                <xs:attribute name="enabled" default="true" type="boolean"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="jdbc-resourceType">
-        <xs:complexContent>
-            <xs:extension base="resource-commonType">
-                <xs:attribute name="pool-name" use="required"/>
-                <xs:attribute name="enabled" default="true" type="boolean"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:attributeGroup name="jdbc-connection-pool">
-        <xs:attribute name="name" use="required"/>
-    </xs:attributeGroup>
-
-    <xs:complexType name="mail-resourceType">
-        <xs:complexContent>
-            <xs:extension base="resource-commonType">
-                <xs:sequence minOccurs="0" maxOccurs="1">
-                    <xs:annotation>
-                        <xs:documentation>The JavaMail connection properties</xs:documentation>
-                    </xs:annotation>
-                    <xs:element name="mail.store.protocol" type="xs:string"/>
-                    <xs:element name="mail.transport.protocol" type="xs:string"/>
-                    <xs:element name="mail.user" type="xs:string"/>
-                    <xs:element name="mail.pop3.host" type="xs:string"/>
-                    <xs:element name="mail.smtp.host" type="xs:string"/>
-                    <xs:element name="mail.smtp.port" type="xs:string"/>
-                    <xs:element name="mail.from" type="xs:string"/>
-                    <xs:element name="mail.debug" type="xs:string"/>
-                </xs:sequence>
-                <xs:attribute name="user" use="required"/>
-                <xs:attribute name="password" use="required"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="persistence-manager-factory-resourceType">
-        <xs:complexContent>
-            <xs:extension base="resource-commonType">
-                <xs:attribute name="factory-class" use="required">
-                    <xs:annotation>
-                        <xs:documentation>The class name of the JPA factory</xs:documentation>
-                    </xs:annotation>
-                </xs:attribute>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="resource-commonType">
-        <xs:sequence minOccurs="0" maxOccurs="1">
-            <xs:element name="properties" type="propertiesType"/>
-        </xs:sequence>
-    </xs:complexType>
-</xs:schema>

Modified: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-servers.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-servers.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-servers.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -4,10 +4,8 @@
     targetNamespace="urn:jboss:domain:1.0"
     >
 
-    <!-- Include the common definitions
-    <xs:include schemaLocation="jboss-domain-common.xsd" /> -->
-    <!-- Include the resources definitions -->
-    <xs:include schemaLocation="jboss-domain-resources.xsd" />
+    <!-- Include the common definitions -->
+    <xs:include schemaLocation="jboss-domain-common.xsd" />
     <!-- Include the logging schema definitions for reuse -->
     <xs:include schemaLocation="jboss-domain-logging.xsd"/>
 
@@ -102,5 +100,95 @@
     </xs:sequence>
   </xs:complexType>
 
+    <!-- resources related definitions -->
+    <xs:complexType name="resourcesType">
+        <xs:choice minOccurs="0" maxOccurs="unbounded">
+            <xs:element name="external-jndi-resource" type="external-jndi-resourceType"/>
+            <xs:element name="jdbc-resource" type="external-jndi-resourceType"/>
+            <xs:element name="mail-resource" type="mail-resourceType"/>
+            <xs:element name="persistence-manager-factory-resource"
+                type="persistence-manager-factory-resourceType"/>
+            <!-- 
+            <xs:group ref="connector-resource"/>
+            <xs:group ref="resource-adapter-config"/>
+            <xs:group ref="connector-connection-pool"/>
+            -->
+        </xs:choice>
+        <xs:attribute name="name"/>
+        <xs:attribute name="jndi-name">
+            <xs:annotation>
+                <xs:documentation>The JNDI name under which to bind the resource</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="factory-class">
+            <xs:annotation>
+                <xs:documentation>The class name of the ObjectFactory</xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
 
+    <xs:complexType name="external-jndi-resourceType">
+        <xs:complexContent>
+            <xs:extension base="resource-commonType">
+                <xs:attribute name="jndi-lookup-name" use="required"/>
+                <xs:attribute name="res-type" use="required"/>
+                <xs:attribute name="factory-class" use="required"/>
+                <xs:attribute name="enabled" default="true" type="xs:boolean"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="jdbc-resourceType">
+        <xs:complexContent>
+            <xs:extension base="resource-commonType">
+                <xs:attribute name="pool-name" use="required"/>
+                <xs:attribute name="enabled" default="true" type="xs:boolean"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:attributeGroup name="jdbc-connection-pool">
+        <xs:attribute name="name" use="required"/>
+    </xs:attributeGroup>
+
+    <xs:complexType name="mail-resourceType">
+        <xs:complexContent>
+            <xs:extension base="resource-commonType">
+                <xs:sequence minOccurs="0" maxOccurs="1">
+                    <xs:annotation>
+                        <xs:documentation>The JavaMail connection properties</xs:documentation>
+                    </xs:annotation>
+                    <xs:element name="mail.store.protocol" type="xs:string"/>
+                    <xs:element name="mail.transport.protocol" type="xs:string"/>
+                    <xs:element name="mail.user" type="xs:string"/>
+                    <xs:element name="mail.pop3.host" type="xs:string"/>
+                    <xs:element name="mail.smtp.host" type="xs:string"/>
+                    <xs:element name="mail.smtp.port" type="xs:string"/>
+                    <xs:element name="mail.from" type="xs:string"/>
+                    <xs:element name="mail.debug" type="xs:string"/>
+                </xs:sequence>
+                <xs:attribute name="user" use="required"/>
+                <xs:attribute name="password" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="persistence-manager-factory-resourceType">
+        <xs:complexContent>
+            <xs:extension base="resource-commonType">
+                <xs:attribute name="factory-class" use="required">
+                    <xs:annotation>
+                        <xs:documentation>The class name of the JPA factory</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="resource-commonType">
+        <xs:sequence minOccurs="0" maxOccurs="1">
+            <xs:element name="properties" type="propertiesType"/>
+        </xs:sequence>
+    </xs:complexType>
+
 </xs:schema>

Modified: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-web.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-web.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain-web.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -2,8 +2,8 @@
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
     targetNamespace="urn:jboss:domain:1.0" xmlns="urn:jboss:domain:1.0">
  
-    <!-- Import the common definitions -->
-    <xs:import namespace="urn:jboss:domain:common:1.0" schemaLocation="jboss-domain-common.xsd"/>
+    <!-- Include the common definitions
+    <xs:include schemaLocation="jboss-domain-common.xsd"/> -->
 
    <xs:complexType name="web-containersType">
        <xs:sequence>

Modified: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-domain.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -4,10 +4,6 @@
   targetNamespace="urn:jboss:domain:1.0"
   xmlns:sec="urn:jboss:security-config:5.0">
 
-  <!-- Include the common definitions -->
-  <xs:include schemaLocation="jboss-domain-common.xsd" />
-  <!-- Include the resources definitions -->
-  <xs:include schemaLocation="jboss-domain-resources.xsd" />
   <!-- Include the server groups definitions -->
   <xs:include schemaLocation="jboss-domain-servers.xsd" />
   <!-- Include the web schema definitions for reuse -->
@@ -22,13 +18,6 @@
         <xs:element name="subsystems" type="domainSubsystemsType"/>
         <xs:element name="server-groups" type="server-groupType"/>
         <xs:element name="clusters" type="clustersType"/>
-        <xs:element name="servers">
-          <xs:complexType>
-            <xs:sequence>
-              <xs:element name="server" type="serverType" />
-            </xs:sequence>
-          </xs:complexType>
-        </xs:element>
         <xs:element name="security-policy" type="sec:PolicyConfig" />
         <xs:element name="containers">
           <xs:complexType>
@@ -71,7 +60,7 @@
     <xs:annotation>
       <xs:documentation>Subsystem is a specific technology, service or a set of or a functionality
                         which can be enabled or disabled on a domain level.
-
+                        Subsystems enabled on the domain level by default are enabled for all the server-groups in the domain.
                         If a certain subsystem (or a set of) is not relevant for a specific server-group
                         this subsystem (or a set of) can be disabled for this server-group in the server-group configuration.</xs:documentation>
     </xs:annotation>

Deleted: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-remoting_3_1.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-remoting_3_1.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-remoting_3_1.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -1,137 +0,0 @@
-<!--
-    ~ JBoss, Home of Professional Open Source
-    ~ Copyright 2009, JBoss Inc., and individual contributors as indicated
-    ~ by the @authors tag. See the copyright.txt in the distribution for a
-    ~ full listing of individual contributors.
-    ~
-    ~ This is free software; you can redistribute it and/or modify it
-    ~ under the terms of the GNU Lesser General Public License as
-    ~ published by the Free Software Foundation; either version 2.1 of
-    ~ the License, or (at your option) any later version.
-    ~
-    ~ This software is distributed in the hope that it will be useful,
-    ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-    ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-    ~ Lesser General Public License for more details.
-    ~
-    ~ You should have received a copy of the GNU Lesser General Public
-    ~ License along with this software; if not, write to the Free
-    ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-    ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns="urn:jboss:remoting:3.1"
-    xmlns:xnio="urn:jboss:xnio:2.1"
-    targetNamespace="urn:jboss:remoting:3.1"
-    elementFormDefault="qualified"
-    attributeFormDefault="unqualified"
-    version="1.0"
-    >
-    
-    <xs:import namespace="urn:jboss:xnio:2.1"/>
-    
-    <xs:complexType name="remotingType">
-        <xs:choice minOccurs="0" maxOccurs="unbounded">
-            <xs:element name="service" type="service"/>
-            <xs:element name="local-client" type="local-client"/>
-            <xs:element name="server" type="server"/>
-            <xs:element name="connection" type="connection"/>
-            <xs:element name="endpoint" type="endpoint"/>
-            <xs:element name="simple-server-authentication" type="simple-server-authentication"/>
-        </xs:choice>
-        <xs:attribute name="endpoint" type="xs:string" use="optional"/>
-    </xs:complexType>
-    
-    <xs:complexType name="server">
-        <xs:all>
-            <xs:element name="options" type="optionsType" minOccurs="0"/>
-            <xs:element name="authentication-handler" type="ref"/>
-        </xs:all>
-        <xs:attribute name="protocol" type="xs:string" default="remote" use="optional"/>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:complexType>
-    
-    <xs:complexType name="service">
-        <xs:all>
-            <xs:element name="client-listener" type="ref"/>
-            <xs:element name="request-class" type="ref"/>
-            <xs:element name="reply-class" type="ref"/>
-            <xs:element name="classloader" type="ref" minOccurs="0"/>
-            <xs:element name="options" type="optionsType" minOccurs="0"/>
-        </xs:all>
-        <xs:attribute name="type" type="xs:string" use="required"/>
-        <xs:attribute name="instance-name" type="xs:string" use="optional"/>
-    </xs:complexType>
-    
-    <xs:complexType name="connection">
-        <xs:all>
-            <xs:element name="destination" type="ref"/>
-            <xs:element name="authentication" type="client-authentication" minOccurs="0"/>
-            <xs:element name="options" type="optionsType" minOccurs="0"/>
-        </xs:all>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:complexType>
-    
-    <xs:complexType name="client-authentication">
-        <xs:choice>
-            <xs:element name="simple" type="user-entry"/>
-            <xs:element name="callback-handler" type="ref"/>
-        </xs:choice>
-    </xs:complexType>
-    
-    <xs:complexType name="user-entry">
-        <xs:attribute name="user-name" type="xs:string" use="required"/>
-        <xs:attribute name="realm-name" type="xs:string" use="required"/>
-        <xs:attribute name="password" type="xs:string" use="required"/>
-    </xs:complexType>
-    
-    <xs:complexType name="local-client">
-        <xs:all>
-            <xs:element name="request-listener" type="ref"/>
-            <xs:element name="request-class" type="ref"/>
-            <xs:element name="reply-class" type="ref"/>
-        </xs:all>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:complexType>
-    
-    <xs:complexType name="endpoint">
-        <xs:all>
-            <xs:element name="executor" type="ref"/>
-            <xs:element name="options" type="optionsType" minOccurs="0"/>
-            <xs:element name="tcp-connector" type="ref"/>
-            <xs:element name="ssl-connector" type="ref" minOccurs="0"/>
-        </xs:all>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-        <xs:attribute name="default" type="xs:boolean" use="optional" default="false"/>
-    </xs:complexType>
-    
-    <xs:complexType name="simple-server-authentication">
-        <xs:sequence minOccurs="0" maxOccurs="unbounded">
-            <xs:element name="entry" type="user-entry"/>
-        </xs:sequence>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:complexType>
-    
-    <xs:complexType name="ref">
-        <xs:attribute name="name" type="xs:string" use="required"/> 
-    </xs:complexType>
-    
-    <xs:complexType name="optionsType">
-        <xs:sequence minOccurs="0" maxOccurs="unbounded">
-            <xs:element name="option" type="optionType"/>
-        </xs:sequence>
-    </xs:complexType>
-    <xs:complexType name="optionType">
-        <xs:annotation>
-            <xs:documentation>
-                <![CDATA[An org.jboss.xnio.Option defined in a Java class.  If no class name is given, org.jboss.xnio.Options is asssumed.]]>
-            </xs:documentation>
-        </xs:annotation>
-        <xs:attribute name="class" type="xs:string" use="optional"/>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-        <xs:attribute name="value" type="xs:string" use="required"/>
-    </xs:complexType>
-
-    <xs:element name="remoting" type="remotingType"/>
-</xs:schema>

Deleted: projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-threads_2_0.xsd
===================================================================
--- projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-threads_2_0.xsd	2010-06-18 05:35:35 UTC (rev 106147)
+++ projects/profileservice/trunk/domain/src/test/resources/schemas/jboss-threads_2_0.xsd	2010-06-18 10:43:54 UTC (rev 106148)
@@ -1,449 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ JBoss, Home of Professional Open Source.
-  ~ Copyright 2009, Red Hat Middleware LLC, and individual contributors
-  ~ as indicated by the @author tags. See the copyright.txt file in the
-  ~ distribution for a full listing of individual contributors.
-  ~
-  ~ This is free software; you can redistribute it and/or modify it
-  ~ under the terms of the GNU Lesser General Public License as
-  ~ published by the Free Software Foundation; either version 2.1 of
-  ~ the License, or (at your option) any later version.
-  ~
-  ~ This software is distributed in the hope that it will be useful,
-  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  ~ Lesser General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU Lesser General Public
-  ~ License along with this software; if not, write to the Free
-  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  -->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-            xmlns:xhtml="http://www.w3.org/1999/xhtml"
-            targetNamespace="urn:jboss:threads:2.0"
-            xmlns="urn:jboss:threads:2.0"
-            elementFormDefault="qualified"
-            attributeFormDefault="unqualified"
-            version="1.0">
-
-    <!-- Root element -->
-    <xsd:element name="threads" type="threads"/>
-
-    <xsd:complexType name="threads">
-        <xsd:annotation>
-            <xsd:documentation>
-                The root threads deployment element.  Specify thread groups, thread factories, and executors within.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:choice minOccurs="0" maxOccurs="unbounded">
-            <xsd:element name="thread" type="thread"/>
-            <xsd:element name="thread-group" type="thread-group"/>
-            <xsd:element name="thread-factory" type="thread-factory"/>
-            <xsd:element name="thread-factory-executor" type="thread-factory-executor"/>
-            <xsd:element name="unbounded-queue-thread-pool-executor" type="unbounded-queue-thread-pool-executor"/>
-            <xsd:element name="bounded-queue-thread-pool-executor" type="bounded-queue-thread-pool-executor"/>
-            <xsd:element name="queueless-thread-pool-executor" type="queueless-thread-pool-executor"/>
-            <xsd:element name="scheduled-thread-pool-executor" type="scheduled-thread-pool-executor"/>
-            <xsd:element name="unbounded-ordered-executor" type="unbounded-ordered-executor"/>
-            <xsd:element name="bounded-ordered-executor" type="bounded-ordered-executor"/>
-            <xsd:element name="direct-executor" type="direct-executor"/>
-        </xsd:choice>
-    </xsd:complexType>
-
-    <xsd:complexType name="thread">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread that is automatically started up.  When shutdown is requested, the thread's interrupt() method
-                is called.
-
-                The "name" attribute is the bean name of the created thread, used for injection.
-                The optional "daemon" attribute specifies whether it is a daemon or non-daemon thread (not
-                specifying this attribute will cause the thread to inherit the daemon status from
-                its thread factory).  The optional "priority" attribute can be used to specify the priority of
-                the thread.
-
-                The "task" element specifies the Runnable task for the new thread.
-                The "thread-factory" element specifies the bean name of a specific thread factory to be used to
-                create this thread. The optional "exception-handler" element may be used to specify an
-                uncaught exception handler for the thread.  The optional "task-filter" element may be used to
-                specify a filter for the task handed to this thread.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="task" type="ref"/>
-            <xsd:element name="thread-factory" type="ref"/>
-            <xsd:element name="exception-handler" type="ref" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-        <xsd:attribute name="daemon" type="xsd:boolean" use="optional"/>
-        <xsd:attribute name="priority" type="priority" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="thread-group">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread group that can be referenced by a bean name.  The "name" attribute is the
-                bean name of the created thread group, used for injection.  The "group-name" attribute is
-                the JDK name of the thread group; if not specified, the bean name is used.
-                The optional "daemon" attribute specifies whether
-                threads should default to being daemon threads or non-daemon threads (not
-                specifying this attribute will cause the thread group to inherit the daemon status from
-                its parent).  The optional "max-priority" attribute can be used to limit the priority of
-                threads within the group.  The optional "parent-thread-group" element specifies the parent thread
-                group (by bean name).
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="parent-thread-group" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-        <xsd:attribute name="group-name" type="xsd:string" use="optional"/>
-        <xsd:attribute name="daemon" type="xsd:boolean" use="optional"/>
-        <xsd:attribute name="max-priority" type="priority" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="thread-factory">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread factory (implementing java.util.concurrent.ThreadFactory).  The "name" attribute is
-                the bean name of the created thread factory.  The optional "daemon" attribute
-                specifies whether threads created by this factory should be forced to be daemon threads, or forced to be
-                non-daemon threads (not specifying this attribute will cause the thread to inherit the daemon
-                status from its group).  The optional "priority" attribute may be used to specify the thread
-                priority of created threads.
-
-                The optional "thread-group" element specifies the bean name of a specific thread group to be used for
-                threads created by this factory. The optional "exception-handler" element may be used to specify an
-                uncaught exception handler for the thread factory.  The optional "task-filter" element may be used to
-                specify a filter for the task handed to each created thread.
-            </xsd:documentation>
-        </xsd:annotation>
-
-        <xsd:all>
-            <xsd:element name="thread-group" type="ref" minOccurs="0"/>
-            <xsd:element name="exception-handler" type="ref" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-        <xsd:attribute name="daemon" type="xsd:boolean" use="optional"/>
-        <xsd:attribute name="thread-name-pattern" type="xsd:string" use="optional"/>
-        <xsd:attribute name="priority" type="priority" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="thread-factory-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                An executor which simply executes each task in a new thread.
-
-                The "name" attribute is the bean name of the created executor.
-                The "blocking" attribute specifies whether the submitter thread will block if the maximum number of threads
-                are already active.
-
-                The optional "thread-factory" element specifies the bean name of a specific thread factory to
-                use to create worker threads.  The optional "task-filter" element may be used to
-                specify a filter for each executed task.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="thread-factory" type="ref" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-            <xsd:element name="max-threads" type="scaled-count" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required"/>
-        <xsd:attribute name="blocking" use="optional" type="xsd:boolean"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="unbounded-queue-thread-pool-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread pool executor with an unbounded queue.  Such a thread pool has a core size and a queue with no
-                upper bound.  When a task is submitted, if the number of running threads is less than the core size,
-                a new thread is created.  Otherwise, the task is placed in queue.  If too many tasks are allowed to be
-                submitted to this type of executor, an out of memory condition may occur.
-
-                The "name" attribute is the bean name of the created executor.
-
-                The nested "max-threads" element must be used to specify the thread pool size.  The nested
-                "keepalive-time" element may used to specify the amount of time that pool threads should
-                be kept running when idle; if not specified, threads will run until the executor is shut down.
-                The optional "task-filter" element may be used to specify a filter for each executed task. The
-                "thread-factory" element specifies the bean name of a specific thread factory to use to create worker
-                threads.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="max-threads" type="scaled-count"/>
-            <xsd:element name="keepalive-time" type="time" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-            <xsd:element name="thread-factory" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="bounded-queue-thread-pool-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread pool executor with a bounded queue.  Such a thread pool has a core and maximum size and a
-                specified queue length.  When a task is submitted, if the number of running threads is less than the
-                core size, a new thread is created.  Otherwise, if there is room in the queue, the task is enqueued.
-                Otherwise, if the number of running threads is less than the maximum size, a new thread is created.
-                Otherwise, if blocking is enabled, the caller blocks until room becomes available in the queue.
-                Otherwise, the task is handed off to the designated handoff executor, if one is specified.  Otherwise,
-                the task is rejected.
-
-                The "name" attribute is the bean name of the created executor.  The "allow-core-timeout" attribute
-                specifies whether core threads may time out; if false, only threads above the core size will time out.
-                The "blocking" attribute specifies whether the submitter thread will block if no space is available in
-                this executor.
-
-                The optional "core-threads" element may be used to specify the core thread pool size which is smaller
-                than the maximum pool size.  The required "max-threads" element specifies the maximum thread pool size.
-                The required "queue-length" element specifies the queue length.  The nested "keepalive-time" element may
-                used to specify the amount of time that threads beyond the core pool size should be kept running when idle.
-                The optional "task-filter" element may be used to specify a filter for each executed task.  The optional
-                "thread-factory" element specifies the bean name of a specific thread factory to use to create worker
-                threads.  The optional "handoff-executor" element specifies an executor to delegate tasks to in the
-                event that a task cannot be accepted.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="core-threads" type="scaled-count" minOccurs="0"/>
-            <xsd:element name="queue-length" type="scaled-count"/>
-            <xsd:element name="max-threads" type="scaled-count"/>
-            <xsd:element name="keepalive-time" type="time" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-            <xsd:element name="thread-factory" type="ref" minOccurs="0"/>
-            <xsd:element name="handoff-executor" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-        <xsd:attribute name="allow-core-timeout" use="optional" type="xsd:boolean"/>
-        <xsd:attribute name="blocking" use="optional" type="xsd:boolean"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="queueless-thread-pool-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                A thread pool executor with no queue.  When a task is submitted, if the number of running threads is
-                less than the maximum size, a new thread is created.  Otherwise, if blocking is enabled, the caller
-                blocks until another thread completes its task and accepts the new one.  Otherwise, the task is handed
-                off to the designated handoff executor, if one is specified.  Otherwise, the task is rejected.
-
-                The "name" attribute is the bean name of the created executor.  The "blocking" attribute specifies
-                whether the submitter thread will block if no space is available in this executor.
-
-                The "max-threads" element specifies the number of threads to use for this executor before
-                tasks cannot be accepted anymore.  The optional "keepalive-time" is used to specify the amount of time
-                that threads should be kept running when idle; by default threads run indefinitely.  The optional
-                "task-filter" element may be used to specify a filter for each executed task.  The optional
-                "thread-factory" element specifies the bean name of a specific thread factory to use to create worker
-                threads.  The optional "handoff-executor" element specifies an executor to delegate tasks to in the
-                event that a task cannot be accepted.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="max-threads" type="scaled-count"/>
-            <xsd:element name="keepalive-time" type="time" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-            <xsd:element name="thread-factory" type="ref" minOccurs="0"/>
-            <xsd:element name="handoff-executor" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-        <xsd:attribute name="blocking" use="optional" type="xsd:boolean"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="scheduled-thread-pool-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                A scheduled thread pool executor.  The "name" attribute is the bean name of the created executor.  The
-                "thread-factory" attribute specifies the bean name of the thread factory to use to create worker
-                threads.  The nested "max-threads" element may be used to specify the thread pool size.  The nested
-                "keepalive-time" element is used to specify the amount of time that threads should be kept running when idle.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="max-threads" type="scaled-count"/>
-            <xsd:element name="keepalive-time" type="time" minOccurs="0"/>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-            <xsd:element name="thread-factory" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="unbounded-ordered-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                An executor which runs tasks in order using the given delegate executor.
-
-                The "name" attribute specifies the bean name of the created executor.
-
-                The "parent-executor" element specifies the delegate executor which runs the actual tasks.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="parent-executor" type="ref"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="bounded-ordered-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                An executor which runs tasks in order using the given delegate executor, with a bounded queue size.
-
-                The "name" attribute specifies the bean name of the created executor.  The "blocking" attribute specifies whether
-                the submitting task should block rather than hand off or reject the task if the queue is full.
-
-                The "parent-executor" element specifies the delegate executor which runs the actual tasks.  The
-                "queue-length" element specifies the size of the queue to use.  The "handoff-executor" element specifies
-                the executor to send a task to if the queue is full when the task is submitted.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="parent-executor" type="ref"/>
-            <xsd:element name="queue-length" type="scaled-count"/>
-            <xsd:element name="handoff-executor" type="ref" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" use="required" type="xsd:string"/>
-        <xsd:attribute name="blocking" use="optional" type="xsd:boolean"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="direct-executor">
-        <xsd:annotation>
-            <xsd:documentation>
-                An executor which runs the submitted task in the calling thread, with an optional filter.
-
-                The "task-filter" element specifies any filter which should be applied to tasks on submission.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:all>
-            <xsd:element name="task-filter" type="task-filter" minOccurs="0"/>
-        </xsd:all>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-    </xsd:complexType>
-
-    <!-- Support types-->
-
-    <xsd:complexType name="task-filter">
-        <xsd:annotation>
-            <xsd:documentation>
-                A filter specification for tasks.  The filter elements are applied in order.  The "direct-executor-name"
-                attribute optionally specifies a reference to a specific org.jboss.threads.DirectExecutor to delegate
-                the final task to.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:choice minOccurs="0" maxOccurs="unbounded">
-            <xsd:element name="thread-name" type="string-value"/>
-            <xsd:element name="thread-name-notation" type="string-value"/>
-            <xsd:element name="log-exceptions" type="logger-ref"/>
-            <xsd:element name="clear-tls"/>
-            <xsd:element name="clear-context-classloader"/>
-            <xsd:element name="initializer" type="ref"/>
-            <xsd:element name="cleaner" type="ref"/>
-        </xsd:choice>
-        <xsd:attribute name="direct-executor-name" type="xsd:string" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:simpleType name="priority">
-        <xsd:annotation>
-            <xsd:documentation>
-                A priority which can range from 1 to 10 (inclusive).  See <xhtml:a href="http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#setPriority(int)">Thread.setPriority(int)</xhtml:a> for more information.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:restriction base="xsd:integer">
-            <xsd:minInclusive value="1"/>
-            <xsd:maxInclusive value="10"/>
-        </xsd:restriction>
-    </xsd:simpleType>
-
-    <xsd:complexType name="ref">
-        <xsd:annotation>
-            <xsd:documentation>
-                A reference to another bean.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="string-value">
-        <xsd:attribute name="value" type="xsd:string" use="required"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="logger-ref">
-        <xsd:annotation>
-            <xsd:documentation>
-                A reference to a logger category and level.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:attribute name="category" type="xsd:string" use="required"/>
-        <xsd:attribute name="level" type="xsd:string" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="interrupt-handler">
-        <xsd:attribute name="name" type="xsd:string" use="required"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="scaled-count">
-        <xsd:annotation>
-            <xsd:documentation>
-                A scaled size designation.  The "count" attribute specifies a flat quantity.  The
-                "per-cpu" attribute specifies a quantity per CPU.  The numbers are added and rounded off
-                to an integer value.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:attribute name="count" type="xsd:float" use="optional"/>
-        <xsd:attribute name="per-cpu" type="xsd:float" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="time">
-        <xsd:annotation>
-            <xsd:documentation>
-                An amount of time.  Comprised of a time value and a unit value.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:attribute name="time" type="xsd:integer" use="required"/>
-        <xsd:attribute name="unit" type="time-unit-name" use="required"/>
-    </xsd:complexType>
-
-    <xsd:simpleType name="time-unit-name">
-        <xsd:annotation>
-            <xsd:documentation>
-                The name of a unit of time.
-            </xsd:documentation>
-        </xsd:annotation>
-        <xsd:restriction base="xsd:string">
-
-            <xsd:enumeration value="s"/>
-            <xsd:enumeration value="sec"/>
-            <xsd:enumeration value="seconds"/>
-
-            <xsd:enumeration value="m"/>
-            <xsd:enumeration value="min"/>
-            <xsd:enumeration value="minutes"/>
-
-            <xsd:enumeration value="ms"/>
-            <xsd:enumeration value="milliseconds"/>
-
-            <xsd:enumeration value="ns"/>
-            <xsd:enumeration value="nanoseconds"/>
-
-            <xsd:enumeration value="h"/>
-            <xsd:enumeration value="hours"/>
-
-            <xsd:enumeration value="d"/>
-            <xsd:enumeration value="days"/>
-
-            <xsd:enumeration value="w"/>
-            <xsd:enumeration value="weeks"/>
-
-            <xsd:enumeration value="mon"/>
-            <xsd:enumeration value="months"/>
-
-        </xsd:restriction>
-    </xsd:simpleType>
-
-</xsd:schema>



More information about the jboss-cvs-commits mailing list