Hi my jdev version : 11.1.1.7
I have a scenario where i fetch some records from database and iterate over the rowset. While iterating over the rowset the data/row is processed based on some logic and 2-3 columns are updated for each row like response,stan number etc..The update is happening based on a primary key which is always unique.While running this scenario i am getting oracle.jbo.AlreadyLockedException: JBO-26092: Failed to lock the record in table WORKITEM with key oracle.jbo.Key[127354 ], another user holds the lock.
I have checked there is no update happening on same row from any other action.
Strange thing ... on googling for above error i see responses for JBO-26030 .
I have referred to Binaries: Yet another reason for "JBO-25014: Another user has changed the row with primary key oracle.jbo.Key" but i am not sure if this is the real culprit.
Can anybody help in atleast debugging in right way .
Below is the sample code of update :
ViewObjectImpl woTrans = getWorkItemTransVO2();
ViewCriteria vc =
woTrans.getViewCriteria("WorkItemTransVOCriteria");
woTrans.applyViewCriteria(null);
woTrans.applyViewCriteria(vc);
VariableValueManager em = woTrans.ensureVariableManager();
em.setVariableValue("workItemId", workitemId);
em.setVariableValue("bindTransId", Integer.parseInt(transId));
woTrans.executeQuery();
RowSet rowSet = woTrans.getRowSet();
for (Row r = rowSet.first(); rowSet.getCurrentRowIndex() > -1;
r = rowSet.next()) {
//My logic to update columns
jmsStatus = r.getAttribute("ProcessStatus").toString();
}