Commit 6fa4a84d authored by ajadhav's avatar ajadhav

statment and resultset to be identified and closed


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@180795 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c3f157bb
......@@ -109,6 +109,12 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
{
key_flag = rs.getString(1);
}
//Add by Ajay on 21/02/18:START
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//End
key_flag = key_flag == null ? "" : key_flag.trim();
if(key_flag.equalsIgnoreCase("M") && (childNodeValue == null || childNodeValue.trim().length() == 0))
{
......@@ -1619,6 +1625,12 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
descrAprlev = checkNullAndTrim(rs.getString("descr"));
}
//Add by Ajay on 21/02/18:START
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//End
System.out.println("descrAprlev:::: " + descrAprlev);
valueXmlString.append("<aprlev_descr><![CDATA[" + descrAprlev + "]]></aprlev_descr>");
}
......@@ -1642,6 +1654,12 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
descrItemSer = checkNullAndTrim(rs.getString("descr"));
}
//Add by Ajay on 21/02/18:START
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//End
System.out.println("::: descritemSer" + descrItemSer);
valueXmlString.append("<itemser_descr><![CDATA[" + descrItemSer + "]]></itemser_descr>");
}
......@@ -1742,6 +1760,12 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
descrLocCode = checkNullAndTrim(rs.getString("descr"));
}
//Add by Ajay on 21/02/18:START
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//End
System.out.println("descrLocCode:: " + descrLocCode);
valueXmlString.append("<location_descr><![CDATA[" + descrLocCode + "]]></location_descr>");
......@@ -1808,7 +1832,6 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
descrSiteCodeOwn = checkNullAndTrim(rs.getString("descr"));
}
System.out.println("descrSiteCodeOwn:: " + descrSiteCodeOwn);
valueXmlString.append("<site_descr><![CDATA[" + descrSiteCodeOwn + "]]></site_descr>");
......@@ -1967,6 +1990,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
msgType = rs.getString("MSG_TYPE");
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
......@@ -1999,6 +2023,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemType);
rs = pstmt.executeQuery();
while (rs.next()) {
phyAttrOne = checkNullAndTrim(rs.getString("PHY_ATTRIB_1"));
phyAttrTwo = checkNullAndTrim(rs.getString("PHY_ATTRIB_2"));
......@@ -2026,7 +2051,12 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
phyAttrTwentyFour = checkNullAndTrim(rs.getString("PHY_ATTRIB_24"));
}
//Add by Ajay on 21/02/18:START
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//End
if ((phyAttrOne != null) && phyAttrOne.trim().length() > 0) {
valueXmlString.append("<phy_attrib__lab1><![CDATA[" + phyAttrOne + ":" + "]]></phy_attrib__lab1>");
valueXmlString.append("<phy_attrib_1 protect = \"0\"><![CDATA[" + phyAttrOne + "]]></phy_attrib_1>");
......@@ -2196,7 +2226,9 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
valueXmlString.append("<phy_attrib__lab24><![CDATA[Phy Attrib24 :]]></phy_attrib__lab24>");
valueXmlString.append("<phy_attrib_24 protect = \"1\"><![CDATA[" + phyAttrTwentyFour + "]]></phy_attrib_24>");
}
} catch (Exception e) {
}
catch (Exception e) {
System.out.println("::" + this.getClass().getSimpleName() + "::::" + e.getMessage());
e.printStackTrace();
} finally {
......@@ -2204,6 +2236,7 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (conn != null)
conn.close();
conn = null;
} catch (Exception e1) {
e1.printStackTrace();
}
......@@ -2227,6 +2260,10 @@ public class ItemIC extends ValidatorEJB implements ItemICLocal, ItemICRemote {
if (rs.next()) {
descrAttr = checkNullAndTrim(rs.getString("descr"));
}
//Add by Ajay on 21/02/18:START
rs.close();
pstmt.close();
//End
System.out.println("descrAttr::: " + descrAttr);
} catch (Exception e) {
System.out.println(":::" + this.getClass().getSimpleName() + ":::"
......
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