• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How EJB handles DB Locking ?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How EJB Handles Database Locking ? like for example Optimistic locking.

Please explain me.

Thanks
Subu
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Subramanian,

Data concurrency is a complex subject and usually it is achieved through specific database technologies and transaction isolation levels. However there are other vendor specific strategies. WebLogic for example has four concurrency strategies:
  • Exclusive
  • Database
  • Read-only
  • Optimistic


  • The default is the database concurrency strategy, which will delegate the responsibility of data locking to the underlying database system.
    The optimistic strategy enforces concurrency using the classic client/server approach of ensuring that the data have not been changed by other clients during the transaction. This of course works only with CMP and for each update the container will issue a query like this:

    Regards.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic