Commit 06d3150c authored by steurwadkar's avatar steurwadkar

Changed by Santosh on 21-06-2016 for table lock issue in Dock Transfer


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101975 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 539d2f6c
......@@ -150,14 +150,23 @@ public class DockTranConf extends ValidatorEJB implements DockTranConfLocal,Dock
rs.close(); rs = null;
pstmt.close(); pstmt = null;*/
sql = " SELECT PICK_TYPE FROM DOCK_TRAN WHERE TRAN_ID = ? ";
//Commented and Changed by Santosh for table lock issue on 20-06-16
//sql = " SELECT PICK_TYPE FROM DOCK_TRAN WHERE TRAN_ID = ? ";
sql = " SELECT PICK_TYPE FROM DOCK_TRAN WHERE TRAN_ID = ? FOR UPDATE NOWAIT";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, docktranID);
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("Came inside if block with FOR UPDATE NOWAIT");
pickType = rs.getString("PICK_TYPE");
}
//Added by Santosh for table lock issue on 20-06-16 [Start]
else
{
retString = itmDBAccess.getErrorString("","VTLCKERR","");
}
//Added by Santosh for table lock issue on 20-06-16 [End]
rs.close(); rs = null;
pstmt.close(); pstmt = null;
System.out.println("pickType:::::::::"+pickType);
......
......@@ -175,6 +175,27 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//Added by Santosh for table lock issue on 21-06-16 [Start]
sql = "SELECT TRF_STATUS FROM PICK_ISS_HDR WHERE TRAN_ID= ? FOR UPDATE NOWAIT"; //PICK_ISS_HDR
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
System.out.println("Came inside if block with FOR UPDATE NOWAIT");
}
else
{
errString = itmDBAccess.getErrorString("","VTLCKERR","");
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//Added by Santosh for table lock issue on 21-06-16 [End]
docktranID = generateTranId( "w_dock_tran_upd",siteCode,conn );
System.out.println("generatetranID:"+docktranID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment