Commit c1f23e30 authored by arawankar's avatar arawankar

PayIbcaPostSave.java

- Changes made to not commit or rollback the transaction throgh post save event.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196665 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a2155e05
...@@ -140,24 +140,30 @@ conn = getConnection(); ...@@ -140,24 +140,30 @@ conn = getConnection();
count = pstmt.executeUpdate(); count = pstmt.executeUpdate();
if (count > 0) if (count > 0)
{ {
conn.commit(); //Modified by Anjali R. on [04/02/2019][commit will not happen here][Start]
//conn.commit();
//Modified by Anjali R. on [04/02/2019][commit will not happen here][End]
} }
else else
{ {
conn.rollback(); //Modified by Anjali R. on [04/02/2019][rollback will not happen here][Start]
//conn.rollback();
//Modified by Anjali R. on [04/02/2019][rollback will not happen here][End]
} }
System.out.println("Post Update count>>>" + count); System.out.println("Post Update count>>>" + count);
} }
catch(Exception e) catch(Exception e)
{ {
try //Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][Start]
/*try
{ {
conn.rollback(); conn.rollback();
} catch (SQLException e1) { } catch (SQLException e1) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e1.printStackTrace(); e1.printStackTrace();
} }*/
//Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][End]
isError = true; isError = true;
System.out.println("Exception :PayIbcaPostSaveEJB : :==>\n"+e.getMessage()); System.out.println("Exception :PayIbcaPostSaveEJB : :==>\n"+e.getMessage());
e.printStackTrace(); e.printStackTrace();
...@@ -171,14 +177,16 @@ conn = getConnection(); ...@@ -171,14 +177,16 @@ conn = getConnection();
if( conn != null ) if( conn != null )
{ {
if( isError ) //Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][Start]
/*if( isError )
{ {
conn.rollback(); conn.rollback();
} }
else else
{ {
conn.commit(); conn.commit();
} }*/
//Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][End]
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -189,16 +197,20 @@ conn = getConnection(); ...@@ -189,16 +197,20 @@ conn = getConnection();
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :PayIbcaPostSaveEJB : :==>\n"+e.getMessage()); System.out.println("Exception :PayIbcaPostSaveEJB : :==>\n"+e.getMessage());
try //Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][Start]
/*try
{ {
System.out.println("Before rollback"); System.out.println("Before rollback");
conn.rollback();
//conn.rollback();
} }
catch(SQLException sqle) catch(SQLException sqle)
{ {
System.out.println(sqle); System.out.println(sqle);
} }*/
//Modified by Anjali R. on [04/02/2019][commit/rollback will not happen here][End]
throw new ITMException(e); throw new ITMException(e);
} }
} }
......
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