persistence@glassfish.java.net

Re: Transaction isolation control

From: James Sutherland <jamesssss_at_yahoo.com>
Date: Tue, 13 Nov 2007 08:25:04 -0800 (PST)

The transaction isolation is normally set as a default in the database, or in
the DataSource or connection pool, not at runtime. This is probably why the
JPA did not cover it as of yet.

In TopLink Essentials you can set the default transaction isolation level
using a SessionCustomizer and calling the Session's DatabaseLogin's
setTransactionIsolation(int) API.


Farrukh Najmi-2 wrote:
>
> Farrukh Najmi wrote:
>>
>> I was wondering what is the rationale for JPA to provide no
>> transaction isolation control in the API.
>> Specifically, what were the issues that prevented
>> EntityManager.getTransaction() to have a variant that
>> took a isolation level looking something like this:
>>
>> EntityTransaction
>> <http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityTransaction.html>
>> *getTransaction*(int isolationLevel);
>
> Oops. Above should read:
>
> EntityTransaction getTransaction(int isolationLevel);
>
>>
>> What plans are there for this to be improved in future?
>>
>> TIA for any insights.
>>
>
>
> --
> Regards,
> Farrukh Najmi
>
> Web: http://www.wellfleetsoftware.com
>
>
>


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.oracle.com/technology/products/ias/toplink/ Oracle TopLink , 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  https://glassfish.dev.java.net/javaee5/persistence/ TopLink
Essentials 
Wiki:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence , 
http://wiki.eclipse.org/EclipseLink EclipseLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink , 
http://www.nabble.com/java.net---glassfish-persistence-f13455.html Glassfish
Persistence 
-- 
View this message in context: http://www.nabble.com/Transaction-isolation-control-tf4794321.html#a13729176
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.