|
From: Jeremy B. <jb...@us...> - 2003-05-06 17:32:13
|
User: jboynes
Date: 03/05/06 10:32:12
Modified: src/etc/conf/default Tag: Branch_3_2
standardjbosscmp-jdbc.xml
Log:
Refactoring of CMP2 ejbCreate implementation
Simplified structure of per-database plugin modules to use common code
Eliminated bugs related to audit and optimistic locking with generated keys
Added tests for key generation methods supported by hsqldb
Revision Changes Path
No revision
No revision
1.39.2.15 +30 -12 jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml
Index: standardjbosscmp-jdbc.xml
===================================================================
RCS file: /cvsroot/jboss/jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml,v
retrieving revision 1.39.2.14
retrieving revision 1.39.2.15
diff -u -r1.39.2.14 -r1.39.2.15
--- standardjbosscmp-jdbc.xml 3 May 2003 11:03:40 -0000 1.39.2.14
+++ standardjbosscmp-jdbc.xml 6 May 2003 17:32:11 -0000 1.39.2.15
@@ -7,7 +7,7 @@
<!-- -->
<!-- ===================================================================== -->
-<!-- $Id: standardjbosscmp-jdbc.xml,v 1.39.2.14 2003/05/03 11:03:40 slaboure Exp $ -->
+<!-- $Id: standardjbosscmp-jdbc.xml,v 1.39.2.15 2003/05/06 17:32:11 jboynes Exp $ -->
<jbosscmp-jdbc>
@@ -1090,6 +1090,7 @@
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template/>
+ <auto-increment-template>?1 IDENTITY</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
@@ -1495,6 +1496,7 @@
<row-locking-template>SELECT ?1 FROM ?2 with (rowlock) WHERE ?3</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
+ <auto-increment-template>?1 IDENTITY</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
@@ -1621,6 +1623,7 @@
<row-locking-template>SELECT ?1 FROM ?2 with (rowlock) WHERE ?3</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
+ <auto-increment-template>?1 IDENTITY</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
@@ -2113,43 +2116,58 @@
<!-- variation on default that skips select before insert -->
<entity-command name="no-select-before-insert"
- class="org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand">
+ class="org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand">
<attribute name="SQLExceptionProcessor">jboss.jdbc:service=SQLExceptionProcessor</attribute>
</entity-command>
<!-- fetches next key value with the specified sql statement -->
<entity-command name="pk-sql"
- class="org.jboss.ejb.plugins.cmp.jdbc.JDBCPkSqlCreateCommand">
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPkSqlCreateCommand">
+ <!-- change to define SQL used to obtain key prior to insert -->
<attribute name="pk-sql">SELECT CURRENT_TIMESTAMP</attribute>
</entity-command>
<!-- this command requires auto-increment element for unknown-pk -->
<entity-command name="mysql-get-generated-keys"
- class="org.jboss.ejb.plugins.cmp.jdbc.mysql.JDBCMySQLCreateCommand"/>
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand"/>
<!-- retrieves generated key of the record inserted into hsql db -->
<entity-command name="hsqldb-fetch-key"
- class="org.jboss.ejb.plugins.cmp.jdbc.hsqldb.JDBCHsqldbCreateCommand"/>
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCHsqldbCreateCommand">
+ <!-- uncomment to change SQL statement used to obtain identity
+ <attribute name="pk-sql">CALL IDENTITY()</attribute>
+ -->
+ </entity-command>
<!-- retrieves generated key of the record inserted into sybase db -->
<entity-command name="sybase-fetch-key"
- class="org.jboss.ejb.plugins.cmp.jdbc.sybase.JDBCSybaseCreateCommand"/>
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSybaseCreateCommand"/>
+
+ <!-- retrieves generated key of the record inserted into SQLServer db -->
+ <entity-command name="mssql-fetch-key"
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand">
+ <!-- uncomment for versions prior to SQL Server 2000
+ <attribute name="pk-sql">SELECT @@IDENTITY</attribute>
+ -->
+ </entity-command>
<!-- retrieves serial value of the record inserted into informix db -->
<entity-command name="informix-serial"
- class="org.jboss.ejb.plugins.cmp.jdbc.informix.JDBCInformixCreateCommand"/>
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand">
+ <!-- uncomment to use with SERIAL8 column
+ <attribute name="method">getSerial8</attribute>
+ -->
+ </entity-command>
<!-- uses key generator to fetch the next key value -->
<entity-command name="key-generator"
- class="org.jboss.ejb.plugins.cmp.jdbc.JDBCKeyGeneratorCreateCommand">
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCKeyGeneratorCreateCommand">
<attribute name="key-generator-factory">UUIDKeyGeneratorFactory</attribute>
</entity-command>
-<!-- JDK1.4
+ <!-- uses JDBC 3.0 getGeneratedKeys() method -->
<entity-command name="get-generated-keys"
- class="org.jboss.ejb.plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand"/>
--->
+ class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBC30GeneratedKeysCreateCommand"/>
</entity-commands>
-
</jbosscmp-jdbc>
|