Standalone Container Schema

<!--

  Copyright © 2008 Bluestem Software LLC
  
  All Rights Reserved. Bluestem Software LLC licenses this file
  to you under the Ext EOA Specification License Agreement [1]. You
  may not use this file except in compliance with the License. You
  may obtain a copy of the License at:
  
  [1] http://alakai.org/licensing/specification-eoa-ext-license.html
  
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
  
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://bluestemsoftware.org/specification/eoa/ext/container/standalone/1.0/" xmlns:tns="http://bluestemsoftware.org/specification/eoa/ext/container/standalone/1.0/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" elementFormDefault="qualified">
  <xs:element name="container">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="transactionSupport" minOccurs="0">
          <xs:annotation>
            <xs:appinfo>The presence of this element indicates transaction support is enabled on container.</xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="defaultTransactionTimeoutSeconds" minOccurs="0" type="xs:positiveInteger">
                <xs:annotation>
                  <xs:documentation>The amount of time in seconds that a transaction will remain in effect before timing out and being rolled back by the container. If unspecified, defaults to 5 minutes.</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="enable" type="xs:boolean" fixed="true" />
          </xs:complexType>
        </xs:element>
        <xs:element name="connectors" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="connector" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="properties">
                      <xs:annotation>
                        <xs:documentation>Defines connector specific properties used to configure a connector.</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType mixed="true">
                              <xs:attribute name="name" use="required" type="xs:NCName" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="connectionSupport">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="transactionSupport">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="useTransactionCaching" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Relevant only within context of XA transactions. If unspecified, defaults to true.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="useThreadCaching" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Relevant only within context of XA transactions. If unspecified, defaults to true.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="type" type="tns:tTransactionSupportType" use="required">
                                <xs:annotation>
                                  <xs:documentation>An enumerated type which indicates whether or not connections created by connector will support transactions and if so, which type, local or XA.</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="poolingSupport">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="minPoolSize" type="xs:positiveInteger" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Minimum size of the connection pool. If element is undefined and pooling support is enabled, defaults to 1.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="maxPoolSize" type="xs:positiveInteger" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Maximum size of the connection pool. If element is undefined and pooling support is enabled, defaults to 10.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="blockingTimeoutMilliseconds" type="xs:int" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>The amount of time in milliseconds to wait for a connection to become available before throwing an exception. If element is undefined and pooling support is enabled, defaults to 1 minute.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="idleTimeoutMilliseconds" type="xs:int" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Indicates the maximum time in milliseconds a connection may sit idle before being closed and removed from pool. If element is undefined and pooling support is enabled, defaults to 15 minutes.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="matchOne" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Indicates that only one connection needs to be checked when matching the connection request. If the connection does not match, it throws an error to the effect of "please adjust your configuration and try again." If element is undefined and pooling support is enabled, defaults to false.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="matchAll" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:appinfo>Indicates that all the connections need to be checked when matching the connection request. If element is undefined and pooling support is enabled, defaults to false.</xs:appinfo>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="selectOneAssumeMatch" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:appinfo>Indicates that no connection settings need to checked and matched and assumes that all connections within the pool are the same and may be returned to caller. If element is undefined and pooling support is enabled, defaults to true.</xs:appinfo>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="partitionByConnectionRequest" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:documentation>Indicates that connection pool is to be partitioned by connection request information. If pooling type is NONE or SINGLE, this value is ignored. If value is PARTITIONED and this element is undefined, defaults to false.</xs:documentation>
                                  </xs:annotation>
                                </xs:element>
                                <xs:element name="partitionBySubject" type="xs:boolean" minOccurs="0">
                                  <xs:annotation>
                                    <xs:appinfo>Indicates that connection pool is to be partitioned by subject field. If pooling type is NONE or SINGLE, this value is ignored. If value is PARTITIONED and this element is undefined, defaults to false.</xs:appinfo>
                                  </xs:annotation>
                                </xs:element>
                              </xs:sequence>
                              <xs:attribute name="type" type="tns:tPoolingSupportType" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="type" use="required" type="xs:anyURI" />
                  <xs:attribute name="impl" use="required" type="xs:anyURI" />
                  <xs:attribute name="name" use="required" type="xs:NCName" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
          <xs:unique name="connector.name">
            <xs:selector xpath="tns:connector" />
            <xs:field xpath="@name" />
          </xs:unique>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="tTransactionSupportType">
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="NONE">
        <xs:annotation>
          <xs:documentation>Used to indicate that connector will NOT support transactions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="LOCAL">
        <xs:annotation>
          <xs:documentation>Used to indicate that connector will support local transactions only.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="XA">
        <xs:annotation>
          <xs:documentation>Used to indicate that connector will support global transactions.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="tPoolingSupportType">
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="NONE">
        <xs:annotation>
          <xs:appinfo>Used to indicate that connector will NOT be pooled, i.e. each requests results in a new connection.</xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SINGLE">
        <xs:annotation>
          <xs:appinfo>Used to indicate that a single pool will be maintained for connections created by connector.</xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PARTITIONED">
        <xs:annotation>
          <xs:appinfo>Used to indicate that a 'partitioned' pool strategy should be used for connections created by connector i.e. by subject and/or connection request info.</xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>