Commit 514f522a authored by vvengurlekar's avatar vvengurlekar

ReceivablesOpening.java, ReceivablesOpeningConf.java - added code to close connection


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191883 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b3074f5b
......@@ -183,6 +183,26 @@ conn = getConnection();
}
catch(SQLException se)
{
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
conn.rollback();
}
catch(Exception e)
{
System.out.println("Exception --["+ e.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("SQLException [04][confirmReceivables][Excuting Query Failed]" + sqlHdr + se.getMessage());
se.printStackTrace();
retString = se.getMessage();
......@@ -190,6 +210,26 @@ conn = getConnection();
}
catch(Exception e)
{
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
conn.rollback();
}
catch(Exception e1)
{
System.out.println("Exception --["+ e1.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("Exception [05][confirmReceivables][Excuting Query Failed]" + sqlHdr + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
......@@ -281,6 +321,26 @@ conn = getConnection();
}
catch(SQLException se)
{
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rsMst != null)
{
rsMst.close();
rsMst = null;
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
conn.rollback();
}
catch(Exception e)
{
System.out.println("Exception --["+ e.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("SQLException [07][confirmReceivables][Excuting Query Failed]" + sql + se.getMessage());
se.printStackTrace();
retString = se.getMessage();
......@@ -288,6 +348,26 @@ conn = getConnection();
}
catch(Exception e)
{
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rsMst != null)
{
rsMst.close();
rsMst = null;
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
conn.rollback();
}
catch(Exception e1)
{
System.out.println("Exception --["+ e1.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("Exception [08][confirmReceivables]" + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
......@@ -464,6 +544,31 @@ conn = getConnection();
}
catch(Exception e)
{
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rsMst != null)
{
rsMst.close();
rsMst = null;
}
if(pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
conn.rollback();
}
catch(Exception e1)
{
System.out.println("Exception --["+ e1.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("Exception [11][confirmReceivables][Excuting Query Failed]" + sqlIns + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
......@@ -558,6 +663,13 @@ conn = getConnection();
System.out.println("SQLException [13][confirmReceivables][Excuting Query Fail]" + sql+ se.getMessage());
try
{
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
//ended by Varsha V on 11-10-18 for closing connection
conn.rollback();
}
catch(Exception e)
......@@ -574,6 +686,13 @@ conn = getConnection();
e.printStackTrace();
try
{
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
//ended by Varsha V on 11-10-18 for closing connection
conn.rollback();
}
catch(Exception e1)
......@@ -581,6 +700,7 @@ conn = getConnection();
e = e1;
}
retString = e.getMessage();
return retString;
}
finally
{
......@@ -726,6 +846,13 @@ conn = getConnection();
System.out.println("SQLException[16] :[ReceivablesOpeningConfEJB][Excuting Query Failed]" + sql + se.getMessage());
se.printStackTrace();
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
//ended by Varsha V on 11-10-18 for closing connection
retString = se.getMessage();
return retString;
}
......@@ -733,9 +860,17 @@ conn = getConnection();
{
retString = "Not Confirmed";
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("Exception[17] ::"+e.getMessage());
e.printStackTrace();
retString = "Not Confirmed :" + e.getMessage();
return retString;
}
finally
{
......
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