djencks     2005/09/28 18:14:28

  Modified:    modules/pkgen-builder/src/schema xmlconfig.xml
  Added:       modules/pkgen-builder/src/schema openejb-pkgen-2.0.xsd
  Removed:     modules/pkgen-builder/src/schema openejb-pkgen.xsd
  Log:

  GERONIMO-1027, GERONIMO-957.  Version our schemas, and provide specific jetty 
and tomcat schemas.  Schema processing cleanup.  A couple other minor fixes
  
  Revision  Changes    Path
  1.2       +1 -1      openejb/modules/pkgen-builder/src/schema/xmlconfig.xml
  
  Index: xmlconfig.xml
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/pkgen-builder/src/schema/xmlconfig.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xmlconfig.xml     7 Jul 2005 21:37:09 -0000       1.1
  +++ xmlconfig.xml     28 Sep 2005 22:14:28 -0000      1.2
  @@ -1,6 +1,6 @@
   <xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config";>
   
  -    <xb:namespace uri="http://www.openejb.org/xml/ns/pkgen";>
  +    <xb:namespace uri="http://www.openejb.org/xml/ns/pkgen-2.0";>
           <xb:package>org.openejb.xbeans.pkgen</xb:package>
           <xb:prefix>Ejb</xb:prefix>
       </xb:namespace>
  
  
  
  1.1                  
openejb/modules/pkgen-builder/src/schema/openejb-pkgen-2.0.xsd
  
  Index: openejb-pkgen-2.0.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!-- ================================================================
  Redistribution and use of this software and associated documentation
  ("Software"), with or without modification, are permitted provided
  that the following conditions are met:
  
  1. Redistributions of source code must retain copyright
  statements and notices.  Redistributions must also contain a
  copy of this document.
  
  2. Redistributions in binary form must reproduce this list of
  conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
  3. The name "OpenEJB" must not be used to endorse or promote
  products derived from this Software without prior written
  permission of The OpenEJB Group.  For written permission,
  please contact [EMAIL PROTECTED]
  
  4. Products derived from this Software may not be called "OpenEJB"
  nor may "OpenEJB" appear in their names without prior written
  permission of The OpenEJB Group. OpenEJB is a registered
  trademark of The OpenEJB Group.
  
  5. Due credit should be given to the OpenEJB Project
  (http://openejb.org/).
  
  THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
  ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
  NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
  THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  OF THE POSSIBILITY OF SUCH DAMAGE.
  
  ====================================================================
  
  This software consists of voluntary contributions made by many
  individuals on behalf of the OpenEJB Project.  For more information
  please see <http://openejb.org/>.
  
  ================================================================ -->
  
  <xsd:schema
      xmlns:xsd="http://www.w3.org/2001/XMLSchema";
      xmlns:j2ee="http://java.sun.com/xml/ns/j2ee";
      xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0";
      targetNamespace="http://www.openejb.org/xml/ns/pkgen-2.0";
      elementFormDefault="qualified"
      attributeFormDefault="unqualified"
      version="1.0">
  
      <xsd:element name="key-generator" type="pkgen:key-generatorType"/>
  
      <xsd:complexType name="key-generatorType">
          <xsd:annotation>
              <xsd:documentation>
                Primary Key generation element.
  
                If this is present, a key generator GBean will be created
                and configured to generate IDs for the surrounding object.
              </xsd:documentation>
          </xsd:annotation>
  
          <xsd:choice>
  <!-- Add this in as soon as TranQL has support.
       I assume it needs some kind of token PK generator that just tells
       it which column(s) in the table will be populated automatically
       by a database feature (such as MySQL AUTO_INCREMENT columns or a
       pre-insert trigger or whatever)
              <xsd:element name="database-generated" 
type="pkgen:database-generatedType" /> -->
              <xsd:element name="sequence-table" 
type="pkgen:sequence-tableType" />
              <xsd:element name="auto-increment-table" 
type="pkgen:auto-increment-tableType" />
              <xsd:element name="sql-generator" type="pkgen:sql-generatorType" 
/>
              <xsd:element name="custom-generator" 
type="pkgen:custom-generatorType" />
          </xsd:choice>
  
      </xsd:complexType>
  
      <xsd:complexType name="database-generatedType" >
          <xsd:annotation>
              <xsd:documentation>
                  Indicates that the database automatically populates a primary 
key
                  ID in the listed column(s).  Typically this is used for 
columns
                  with an AUTO_INCREMENT flag or the equivalent.  This only 
makes
                  sense if this key generator is used for an EJB or something 
else
                  with a corresponding database table (not if it's meant to 
generate
                  unique web session IDs or something like that -- see
                  auto-increment-tableType for that case).
              </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:element name="identity-column" type="xsd:string"
                  maxOccurs="unbounded"/>
          </xsd:sequence>
      </xsd:complexType>
  
      <xsd:complexType name="sequence-tableType" >
          <xsd:annotation>
              <xsd:documentation>
                  Indicates that a separate table holds a list of table name/ID
                  pairs and the server should fetch the next ID from that table.
              </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:element name="table-name" type="xsd:string"/>
              <xsd:element name="sequence-name" type="xsd:string"/>
              <xsd:element name="batch-size" type="xsd:int"/>
          </xsd:sequence>
      </xsd:complexType>
  
      <xsd:complexType name="sql-generatorType" >
          <xsd:annotation>
              <xsd:documentation>
                  Indicates that an arbitrary SQL statement should be used to
                  generate the next ID.
              </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:element name="sql" type="xsd:string"/>
              <xsd:element name="return-type" type="xsd:string"/>
          </xsd:sequence>
      </xsd:complexType>
  
      <xsd:complexType name="auto-increment-tableType" >
          <xsd:annotation>
              <xsd:documentation>
                  Handles the case where an arbitrary SQL statement is executed,
                  and the JDBC driver returns a new automatically generated ID.
                  This should not be used when the destination table itself
                  generates the ID (see database-generatedType), but it could be
                  used for a web session ID or something where there is no
                  naturally matching database table (but you could create one
                  with an AUTO_INCREMENT key, specify an insert statement here,
                  and then capture the newly returned ID and use it as your
                  web session ID).
              </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:element name="sql" type="xsd:string"/>
              <xsd:element name="return-type" type="xsd:string"/>
          </xsd:sequence>
      </xsd:complexType>
  
      <xsd:complexType name="custom-generatorType" >
          <xsd:annotation>
              <xsd:documentation>
                  Handles a user-provided generator.  You deploy any old 
generator
                  as a GBean, and then point to that GBean here.  The generator
                  should implement org.tranql.pkgenerator.PrimaryKeyGenerator.
              </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:element name="generator-name" type="xsd:string"/>
              <xsd:element name="primary-key-class" type="xsd:string"/>
          </xsd:sequence>
      </xsd:complexType>
  </xsd:schema>
  
  
  

Reply via email to