3 Replies Latest reply: Mar 18, 2013 9:52 AM by Don Kleppinger RSS

    Get an AlreadyLockedException while update record in two diff. tab/Browser

    Sanjeev
      Hi,

      I'm using the Jdeveloper 11.1.2.0.0

      In Model Layer, I have created EmployeeVO based upon the HR Schema and another TransientVO to show the EmployeeDetails Information.

      In View Layer, I have Created two Bounded TF, first one is EmployeeTF another one EmployeedetailTF. The both is having the Transaction as Always Begin New Transaction and its not sharing the Data Control Scope its also Isolated for both the TaskFlow and EmployeeTF I have drop as Region on text.jspx page.

      Problem Description:

      Step 1: on button click of EmployeeTF page, I 'm calling the EmployeedetailTF and passing the TransferVO (Instance of EmployeeVO) as parameter for EmployeedetailTF.

      Step 2: I'll create a New Row in EmployeedetailTF page, View (TransientVO) and populate the data From the TransferVO into Current Row of TransientVO.

      Step 3: while closing the EmployeedetailTF
      a) I'm setting the (TransientVO) value into TransferVO (Instance of EmployeeVO)
      b) using the taskFlow ReturnActivity Control with assign the operation as RollBack or Commit

      Step 4: When it will come to Calling TaskFlow ie. EmployeeTF page, I'm setting the data in to the EmployeeVO from TransferVO (Instance of EmployeeVO).

      Step 5: if I'm opening the deployed url in one instance of Browser than its working perfectally. But another instace with same Row is modified, it creates a error of JBO-26030.

      Problem:
      if I open the same deployed url in another tab of same Browser or in different Browser and try to make some changes and trying to update the EmployeeVO from TransferVO (Instance of EmployeeVO). I getting the Below Error.

      oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.

      I'm using the Locking Mechanism as optimistic not able to understand what wrong please help me on the same.


      Thanks in Advance
      Sanjeev