This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does EJB2.0 supports transaction isolation levels?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are transaction isolation levels? does EJB2.0 supports them?

Yamini.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, no, you don't set isolation levels within EJB 2.0. They are set on the resource itself now, although in EJB 1.0 you WERE able to specify isolation levels in the Deployment Descriptor.

Isolation levels define how protected an operation is from what other operations are doing, and determines how long locks are held, etc. So it is always a tradeoff between performance vs. integrity. If you have NO locks, obviously you have maximum concurrency, but everyone might step on everyone else's transactions and you might corrupt the data, so it really depends on the kinds of operations being done to the database (read vs. write, etc.)

The four isolation levels are often labeled as:

READ UNCOMMITTED (also called "dirty read")

READ COMMITTED

REPEATABLE READ

SERIALIZABLE (has nothing to do with Java "Serializable", but means "one at a time")

But again, you don't need this for the exam!

cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic