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":
...@@ -178,25 +179,29 @@ public class QuatationAmedmentIC extends ValidatorEJB{ ...@@ -178,25 +179,29 @@ public class QuatationAmedmentIC extends ValidatorEJB{
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
finally finally
{ {
try { try
if (conn != null) {
if(rs != null)
{ {
if (rs != null) rs.close();
{ rs = null;
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
} catch (Exception d) { if(pstmt!= null)
{
pstmt.close();
pstmt = null;
}
if( conn != null )
{
conn.close();
conn = null;
}
}
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