Fifth commit

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