Commit 1cc307dd authored by prane's avatar prane

cusrsor and statement closed and nulled for multitenancy

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195737 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c969b2f8
...@@ -492,12 +492,17 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -492,12 +492,17 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
+" (select bom_code from workorder where work_order = '"+workOrder+"' ) " +" (select bom_code from workorder where work_order = '"+workOrder+"' ) "
+" and item_code ='"+itemCode+"' " +" and item_code ='"+itemCode+"' "
+" and item_ref ='"+itemCodeRef+"'"; +" and item_ref ='"+itemCodeRef+"'";
pstmt = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
rs = pstmt.executeQuery(); //rs = pstmt.executeQuery();
rs1 = pstmt1.executeQuery(); //[changed rs to rs1 and pstmt to pstmt1 by Pavan R ]
if (rs.next()) if (rs.next())
{ {
useInvstatus = rs.getString(1); useInvstatus = rs1.getString(1);
} }
rs1.close();//[closed and nulled rs1 and pstmt1 by Pavan R ]
rs1 = null;
pstmt1.close();
pstmt1 = null;
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -833,6 +838,36 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -833,6 +838,36 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if(rsDet != null)
{
rsDet.close();
rsDet = null;
}
if(pstmtDet != null)
{
pstmtDet.close();
pstmtDet = null;
}
if(rsSL != null)
{
rsSL.close();
rsSL = null;
}
if(pstmtSL != null)
{
pstmtSL.close();
pstmtSL = null;
}
System.out.println("756---errString from InvAcct["+errString+"]localConnection["+localConnection+"]"); System.out.println("756---errString from InvAcct["+errString+"]localConnection["+localConnection+"]");
//if( conn != null && ! conn.isClosed() ) // Gulzar - 25/11/11 //if( conn != null && ! conn.isClosed() ) // Gulzar - 25/11/11
if( conn != null && !conn.isClosed() && localConnection ) //Gulzar - 25/11/11 if( conn != null && !conn.isClosed() && localConnection ) //Gulzar - 25/11/11
...@@ -1086,6 +1121,8 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -1086,6 +1121,8 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
pstmt.setString(1,tranID); pstmt.setString(1,tranID);
pstmt.setInt(2,lineNo); pstmt.setInt(2,lineNo);
count = pstmt.executeUpdate(); count = pstmt.executeUpdate();
pstmt.close();//[closed and nulled pstmt by Pavan R ]
pstmt = null;
} }
else else
{ {
......
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