Commit 16ffeaec authored by agaikwad's avatar agaikwad

Request_id-D15GSUN006


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101145 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8d9739b6
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.dis.DistCommon; import ibase.webitm.ejb.dis.DistCommon;
//import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -49,11 +48,11 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost ...@@ -49,11 +48,11 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
int cnt=0,cnt1=0,listCnt=1; int cnt=0,cnt1=0,listCnt=1;
try try
{ {
E12GenericUtility genericUtility = new E12GenericUtility();
// GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
dom = genericUtility.parseString(domString); dom = genericUtility.parseString(domString);
tranId = genericUtility.getColumnValue("tran_id",dom); tranId = GenericUtility.getInstance().getColumnValue("tran_id",dom);
// Advance Screen Cross Update // Advance Screen Cross Update
sql="select exch_rate from misc_voucher where tran_id=?"; sql="select exch_rate from misc_voucher where tran_id=?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -245,56 +244,18 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost ...@@ -245,56 +244,18 @@ public class MiscVoucherPostSave extends ValidatorEJB implements MiscVoucherPost
//End Of Detail Screen Cross Update //End Of Detail Screen Cross Update
} }
catch(Exception e) catch (Exception e)
{ {
try { System.out.println("Exception : MiscVoucherPostSave -->["
conn.rollback(); + e.getMessage() + "]");
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
isError = true;
System.out.println("Exception :MiscVoucherPostSaveEJB : :==>\n"+e.getMessage());
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); try
}
finally
{
try
{ {
System.out.println("isError ["+isError+"]");
if( conn != null )
{
if( isError )
{
conn.rollback();
}
else
{
conn.commit();
}
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
catch(Exception e) catch (Exception e1)
{ {
System.out.println("Exception :MiscVoucherPostSaveEJB : :==>\n"+e.getMessage()); System.out.println("Exception while rollbacking transaction....");
try e1.printStackTrace();
{
System.out.println("Before rollback");
conn.rollback();
}
catch(SQLException sqle)
{
System.out.println(sqle);
}
throw new ITMException(e);
} }
} }
System.out.println("Out MiscVoucherPostSaveEJB ... "); System.out.println("Out MiscVoucherPostSaveEJB ... ");
......
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