[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: JDBC transaction isolation?

You may be able to set this as a default in your database, or as a JDBC or DataSource option.

In EclipseLink you can set it using the setTransactionIsolation() method on DatabaseLogin. You can set this using a SessionCustomizer, although ideally there would be a persistence.xml property for this, so please log a bug for that.

i.e.
session.getLogin().setTransactionIsolation(DatabaseLogin.TRANSACTION_REPEATABLE_READ);

You may also wish to investigate optimistic or pessimistic locking.

See also,
http://en.wikibooks.org/wiki/Java_Persistence/Locking

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html