Fifth commit

parent 272e4535
...@@ -42,8 +42,9 @@ public class QuatationAmedmentIC extends ValidatorEJB{ ...@@ -42,8 +42,9 @@ public class QuatationAmedmentIC extends ValidatorEJB{
double newRate =0.0; double newRate =0.0;
double oldRate = 0.0; double oldRate = 0.0;
Timestamp ldt_date = new Timestamp(System.currentTimeMillis()); Timestamp ldt_date = new Timestamp(System.currentTimeMillis());
Connection conn = null;
try { try {
conn = getConnection();
switch(objContext) switch(objContext)
{ {
case "1": case "1":
...@@ -180,23 +181,27 @@ public class QuatationAmedmentIC extends ValidatorEJB{ ...@@ -180,23 +181,27 @@ public class QuatationAmedmentIC extends ValidatorEJB{
} }
finally finally
{ {
try { try
if (conn != null)
{ {
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 )
{
conn.close();
conn = null;
} }
} catch (Exception d) { }
catch(Exception d)
{
d.printStackTrace(); d.printStackTrace();
throw new ITMException(d);
} }
} }
return ""; return "";
......
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