Commit dfa3eb09 authored by jshaikh's avatar jshaikh

changes related to dirty connection in ContactComm and oppurtinitystagesummary dashboard

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199114 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 18cfddbd
...@@ -130,7 +130,20 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC ...@@ -130,7 +130,20 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC
xmlString.append("<td class= 'cardHtmlTableBodyAlignLft' style='border-top: 1px solid transparent;'>"+emailAddr+"</td></tr>"); xmlString.append("<td class= 'cardHtmlTableBodyAlignLft' style='border-top: 1px solid transparent;'>"+emailAddr+"</td></tr>");
xmlString.append("<tr><td class= 'cardHtmlTableBodyAlignLft' style='border-top: 1px solid transparent;'><img src='../webitm/images/Standard/tele-1-1.ico' style='width:10px;height:10px;'>"+mobileNo+"</td></tr>"); xmlString.append("<tr><td class= 'cardHtmlTableBodyAlignLft' style='border-top: 1px solid transparent;'><img src='../webitm/images/Standard/tele-1-1.ico' style='width:10px;height:10px;'>"+mobileNo+"</td></tr>");
} }
//Added by Jaffar on 03-04-19 [Start]
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
//[End]
if(count == 0) if(count == 0)
{ {
xmlString = new StringBuffer("<table id='htmlTable' cellpadding='2'"+ xmlString = new StringBuffer("<table id='htmlTable' cellpadding='2'"+
...@@ -142,16 +155,7 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC ...@@ -142,16 +155,7 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC
rowData =new JSONObject(); rowData =new JSONObject();
rowData.put("xmlString", xmlString.toString()); rowData.put("xmlString", xmlString.toString());
rowDataBasicJsn.put(0,rowData); rowDataBasicJsn.put(0,rowData);
if(pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -162,12 +166,25 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC ...@@ -162,12 +166,25 @@ public class ContactCommDashboard implements ContactCommDashboardLocal, ContactC
{ {
try try
{ {
//Added by Jaffar on 03-04-19 [Start]
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
//[End]
if (conn != null) if (conn != null)
{ {
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} }
catch (Exception d) catch (Exception d)
{ {
......
...@@ -142,12 +142,14 @@ OpportunityStageSummaryRemote { ...@@ -142,12 +142,14 @@ OpportunityStageSummaryRemote {
count++; count++;
} }
if (rs != null) { if (rs != null)
{
rs.close(); rs.close();
rs = null; rs = null;
} }
if (pstmtDS != null) { if (pstmtDS != null)
{
pstmtDS.close(); pstmtDS.close();
pstmtDS = null; pstmtDS = null;
} }
...@@ -156,13 +158,26 @@ OpportunityStageSummaryRemote { ...@@ -156,13 +158,26 @@ OpportunityStageSummaryRemote {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception in Opportunity Stage Summary :::: " + e.getMessage()); System.out.println("Exception in Opportunity Stage Summary :::: " + e.getMessage());
} finally { } finally {
try { try
{
if (conn != null) { //Added by Jaffar on 03-04-19
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
//End
if (conn != null)
{
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} catch (Exception d) { } catch (Exception d) {
d.printStackTrace(); d.printStackTrace();
try { try {
...@@ -293,12 +308,14 @@ OpportunityStageSummaryRemote { ...@@ -293,12 +308,14 @@ OpportunityStageSummaryRemote {
} }
if (rs != null) { if (rs != null)
{
rs.close(); rs.close();
rs = null; rs = null;
} }
if (pstmtDS != null) { if (pstmtDS != null)
{
pstmtDS.close(); pstmtDS.close();
pstmtDS = null; pstmtDS = null;
} }
...@@ -325,13 +342,26 @@ OpportunityStageSummaryRemote { ...@@ -325,13 +342,26 @@ OpportunityStageSummaryRemote {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception in Opportunity Stage Count :::: "+ e.getMessage()); System.out.println("Exception in Opportunity Stage Count :::: "+ e.getMessage());
} finally { } finally {
try { try
{
if (conn != null) { //Added by Jaffar on 03-04-19
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
//End
if (conn != null)
{
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} catch (Exception d) { } catch (Exception d) {
d.printStackTrace(); d.printStackTrace();
try { try {
...@@ -458,6 +488,18 @@ OpportunityStageSummaryRemote { ...@@ -458,6 +488,18 @@ OpportunityStageSummaryRemote {
stageDescrHMap.put(stageDescr, valueStageDescr); stageDescrHMap.put(stageDescr, valueStageDescr);
} }
} }
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmtDS != null)
{
pstmtDS.close();
pstmtDS = null;
}
System.out.println("Stage Descr HMap "+stageDescrHMap); System.out.println("Stage Descr HMap "+stageDescrHMap);
...@@ -479,27 +521,27 @@ OpportunityStageSummaryRemote { ...@@ -479,27 +521,27 @@ OpportunityStageSummaryRemote {
count++; count++;
} }
if (rs != null) {
rs.close();
rs = null;
}
if (pstmtDS != null) {
pstmtDS.close();
pstmtDS = null;
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception in Opportunity Stage Value :::: " + e.getMessage()); System.out.println("Exception in Opportunity Stage Value :::: " + e.getMessage());
} finally { } finally {
try { try
{
//Added by Jaffar on 03-04-19
if (rs != null) {
rs.close();
rs = null;
}
if (pstmtDS != null) {
pstmtDS.close();
pstmtDS = null;
}//End
if (conn != null) { if (conn != null) {
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} catch (Exception d) { } catch (Exception d) {
d.printStackTrace(); d.printStackTrace();
try { try {
...@@ -612,6 +654,20 @@ OpportunityStageSummaryRemote { ...@@ -612,6 +654,20 @@ OpportunityStageSummaryRemote {
} }
} }
//Added by Jaffar on 03-04-19
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
//End
Set<Map.Entry<String, Integer>> entrySet1 = stageCodeHMap.entrySet(); Set<Map.Entry<String, Integer>> entrySet1 = stageCodeHMap.entrySet();
Iterator<Entry<String, Integer>> entrySetIterator = entrySet1.iterator(); Iterator<Entry<String, Integer>> entrySetIterator = entrySet1.iterator();
...@@ -639,7 +695,8 @@ OpportunityStageSummaryRemote { ...@@ -639,7 +695,8 @@ OpportunityStageSummaryRemote {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception in Organization Stage Count :::: "+ e.getMessage()); System.out.println("Exception in Organization Stage Count :::: "+ e.getMessage());
} finally { } finally {
try { try
{
if (rs != null) { if (rs != null) {
rs.close(); rs.close();
rs = null; rs = null;
...@@ -654,7 +711,7 @@ OpportunityStageSummaryRemote { ...@@ -654,7 +711,7 @@ OpportunityStageSummaryRemote {
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} catch (Exception d) { } catch (Exception d) {
d.printStackTrace(); d.printStackTrace();
try { try {
...@@ -762,7 +819,21 @@ OpportunityStageSummaryRemote { ...@@ -762,7 +819,21 @@ OpportunityStageSummaryRemote {
stageCodeHMap.put(stageCode, valueStageCode); stageCodeHMap.put(stageCode, valueStageCode);
} }
} }
//Added by Jaffar on 03-04-19
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
//End
Set<Map.Entry<String, Double>> entrySet1 = stageCodeHMap.entrySet(); Set<Map.Entry<String, Double>> entrySet1 = stageCodeHMap.entrySet();
Iterator<Entry<String, Double>> entrySetIterator = entrySet1.iterator(); Iterator<Entry<String, Double>> entrySetIterator = entrySet1.iterator();
...@@ -785,22 +856,26 @@ OpportunityStageSummaryRemote { ...@@ -785,22 +856,26 @@ OpportunityStageSummaryRemote {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception in Organization Stage Value :::: " + e.getMessage()); System.out.println("Exception in Organization Stage Value :::: " + e.getMessage());
} finally { } finally {
try { try
if (rs != null) { {
if (rs != null)
{
rs.close(); rs.close();
rs = null; rs = null;
} }
if (pstmt != null) { if (pstmt != null)
{
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (conn != null) { if (conn != null)
{
conn.close(); conn.close();
conn = null; conn = null;
} }
conn = null; //conn = null;
} catch (Exception d) { } catch (Exception d) {
d.printStackTrace(); d.printStackTrace();
try { try {
......
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