Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

TRANSACTION QUESTION

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A developer is writing an Account EJB in order to provide applications access to the Account database table. The requirements are that the table rows cannot be changed when the EJB is being accessed by applications within a single transaction. Given that the transaction attribute on the bean is set to TX_REQUIRED, the BEST way to achieve this goal is to configure the Account bean with a transaction isolation level of:
a) TRANSACTION_ALLOW_READONLY.
b) TRANSACTION_SERIALIZABLE.
c) TRANSACTION_REPEATABLE_READ.
d) TRANSACTION_READ_COMMITTED.

The answer given is C.
Can anyone explain how ???
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With Transaction_Repeatable_read isolation level one can dirty read and repeatable reads can be avoided.Repeatable reads are what exactly mentioned in the problem.The existing will not be changed while someone is reading it.
So,this justifies the answer being C)
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer could also be b) TRANSACTION_SERIALIZABLE. This will give you the required functionality.
However, the question asks for the BEST answer to meet the criteria. Since TRANSACTION_SERIALIZABLE hinders concurrency more than TRANSACTION_REPEATABLE_READ, the best answer would be C.
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic