Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010

    Unanswered: Remove "FOR UPDATE" with Trigger?

    Hi all,

    im working on a larger J2EE App based on WebSphere and an Oracle DB. Unfortuanately WebSphere thinks, wrongly, that one of my Select Statements should lock a Table, which leads to many deadlocks. Because its quite complicated to change that on the app side(CMP Entities, lots of generated code), i would like to quickly fix this with a "before update" trigger.

    Is that possible?


  2. #2
    Join Date
    Dec 2003
    I can't think of a way around it.

    The application, if it's using a FOR UPDATE clause, should really have a WHERE clause which points to the minimum number of records necessary, that it's actually planning to update.

    This would probably cause havoc, but if your application ran things in more of a transactional nature (committing/rolling back) after each major step, then that would release the lock.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts