Alex,
        I am referring to ur database generated key method.

<!-- database generated keys -->
         <unknown-pk>
            <unknown-pk-class>java.lang.Integer</unknown-pk-class>
            <column-name>genid</column-name>
            <jdbc-type>INTEGER</jdbc-type>
            <sql-type>INTEGER</sql-type>
         </unknown-pk>
         <entity-command name="pk-sql">
            <!-- this sql is dummy, some sequence tables should used here -->
            <attribute name="pk-sql">SELECT MAX(genid)+1 FROM myjdbc_table</attribute>
         </entity-command>

Here eventhough the select statement 'SELECT MAX(genid)+1 FROM myjdbc_table' runs in a 
transaction, it never places any lock.
So many transactions running concurrently might get the same Max_ID as a result, which 
might result in the same primary keys.
Is it like that, i have not tried it.
                Rahul


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to