I haven't tried it but the 3.2.x jbosscmp-jdbc DTD supports this. Have a look at that file.
in the defaults section of jbosscmp-jdbc and
in the entity section and deploying the stuff,
the Oracle 9.2 jdbc driver came back with an 'unsupported feature' error.
After looking in the jBoss source code the offending statement was :
ps = con.prepareStatement(insertEntitySQL,
Conclusion, the default Oracle 9 drivers don't support the jdbc type 3 feature that jBoss is using.
I suppose this is linked with the fact that Oracle doesn't know auto-increment columns but makes use of sequences for this.
So, I think we'll need to live with that extra roundtrip to the db for getting the pk-value.
It is a way to configure a autogenerated key for an entity bean for Oracle.
First, you have to create a sequence in DB to generate your PK.
In jbosscmp-jdbc.xml, you have to add the following elements to your entity definition:
<entity-command name="oracle-sequence" class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand">
Its interesting for me to know weather i could use 2 sequinces for one table. I.e. i need one row to have primary key between 1 and 1000000 and the second row - between 1000001 - inf.