Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Isolation

 
Jim Clayson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Tomcat3.2.3+Jboss2.4.1 on SuSE Linux 7.2(kernel 2.4.13), jdk1.3.1_01 against PostgreSQL 7.0
Can someone please clarify or summarize (or point out a relevent reference) the nature of transaction isolation in EJB.(ejb spec 1.1 or 2.0)
I've heard people use the term 'transaction isolation' and I've heard people talk about a transaction isolation level being set on an SQL connection. I think it is really critical to understand what the J2EE-compliant container guarantees in terms of its transactional behaviour.
And the question/s is/are:
1. What exactly is being isolated?
2. From what is it being isolated?
3. When does the isolation begin and end?(What determines the duration of the isolation?)
I'm currently looking for answers in the ejb spec (2.0) so I'll be sure to report back when I find any.
Jim
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The isolation level is a DB stuff.
It's a transaction attribute
If it is mentioned when you use EJB, it is because the cantainer is supposed to manage transactions for you.
So it sppecifies the isolation level the EJB container will set during a transaction with a DB.
As far as I remember, there are 4 isolation levels in the spec.
1- None (the default) . No isolation
2- Read uncommited : prevent from dirty reads, ie read data that are not commited by another transaction
3- Repeatable read : prevent from unreapeatable reads, ie, if you read the same data twice, you do not obtain the same value cause another transaction has changed it
4- Serializable : prevent from phantom read, ie, the same SQL statement does not returns the same result set cause another transaction has added/deleted data
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic