Hi Emmanuel, many thanks for your reply!
emmanuel wrote:
REPEATABLE_READ should be enough I think
I don't think so, because REPEATABLE_READ only prevents from modification of already read records. This is not he case here, because the record doesn't exist before being inserted, of course.
Secondly, Oracle doesn't support REPEATABLE_READ.
emmanuel wrote:
Or you can manually acquire a table lock
Yes, this works, but unfortunately I couldn't find a way to do it RDBMS independently. Session.lock() seems to support row level locks only, right? Or did I miss something here?
Uhmm, by the way, does anybody know how I can find out which RDBMS I'm running on / which dialect is in effect? I know that I can retrieve the dialect from the Configuration. But how to get to the (Hibernate-)Configuration in a managed environment?
Günter