I'm just starting to get my feet wet with NHibernate and one of the topics that popup here at the bar (you are thinking about NH when you have a couple of cold ones, aren't you? [B] ) was if we could use something like sql server's timestamp column to handle concurrency with NH and Oracle.
SQL Server's Timestamp column is not datetime as you might think, but an 8 byte binary that is changed any time that the row is updated.
Back at the office, I started researching and it figures out that Oracle (v9 or greater) provides its own flavor of this feature: welcome to ORA_ROWSCN.
Same concept, row gets updated, ORA_ROWSCN gets updated. Just make sure your tables are created with ROWDEPENDENCIES to guarantee a unique value per row, otherwise, it is possible more than one row will have the same ORA_ROWSCN.
The idea is to leave the handling of this row version column to the DBMS instead of coding around via a trigger, sequences, custom column or having nhibernate resposible for increasing the value once it is done with it. As a bonus, external processes will be able to interact with the data and NH will be aware of any changes.
This is a lot of prose for such little code, below are the configuration entries that your hbm files should have in order to use the version feature with NH.
<version name="_version" type="Int64" generated="always" column="ORA_ROWSCN" access="field" unsaved-value="null"/><o:p></o:p>
NH 2.1 (above syntax seems to also work with NH 2.1, this is just a variation)
<version name="_version" type="Int64" generated="always" access="field" unsaved-value="null"><o:p></o:p>
<column name="ORA_ROWSCN" sql-type="Int64" /><o:p></o:p>
I hope this saves someone, a couple hours of googling.