Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JDBC transaction isolation?
JDBC transaction isolation? [message #386606] Mon, 06 April 2009 20:26 Go to next message
andiqo  is currently offline andiqo Friend
Messages: 32
Registered: July 2009
Member
Hello again,

How could I set the JDBC transaction isolation to "repeatable-read" in
EclipseLink? I am using EclipseLink/JPA in a simple environment (not
managed).

Thanks again!

andiqo
Re: JDBC transaction isolation? [message #387021 is a reply to message #386606] Tue, 07 April 2009 13:14 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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.TRA NSACTION_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


James : Wiki : Book : Blog : Twitter
Previous Topic:How to configure buildSelectQueryForIdentity()
Next Topic:escaping table names
Goto Forum:
  


Current Time: Thu Apr 25 07:22:30 GMT 2024

Powered by FUDForum. Page generated in 0.03371 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top