Commit 1cf8e709 authored by arawankar's avatar arawankar

ReceiptAdvConf.java

- Throw exception from catch block in confirm method both with connection and without connection method.
- Confirm prompt not showing on confirmation of bank receipt
- rollback related changed in confirm method if local connection is used.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191647 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 157f559c
...@@ -43,7 +43,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -43,7 +43,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{ {
retString = confirm( tranID, xtraParams, forcedFlag, conn ,isPreview); retString = confirm( tranID, xtraParams, forcedFlag, conn ,isPreview);
if ( retString != null && retString.length() > 0 ) //Modified by Anjali R. on [05/10/2018][In case of success prompt,system should not throw exception][Start]
//if ( retString != null && retString.length() > 0 )
if ( retString != null && retString.length() > 0 && retString.indexOf("VTCICONF3") < 0 )
//Modified by Anjali R. on [05/10/2018][In case of success prompt,system should not throw exception][End]
{ {
throw new Exception("Exception while calling confirm for tran Id:["+tranID+"]"); throw new Exception("Exception while calling confirm for tran Id:["+tranID+"]");
} }
...@@ -51,6 +54,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -51,6 +54,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
catch(Exception exception) catch(Exception exception)
{ {
System.out.println("Exception in [InvHoldConfEJB] getCurrdateAppFormat " + exception.getMessage()); System.out.println("Exception in [InvHoldConfEJB] getCurrdateAppFormat " + exception.getMessage());
//Modified by Anjali R. on[05/10/2018][Throw exception][Start]
exception.printStackTrace();
throw new ITMException(exception);
//Modified by Anjali R. on[05/10/2018][Throw exception][End]
} }
return retString; return retString;
} }
...@@ -65,7 +72,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -65,7 +72,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{ {
retString = confirm( tranID, xtraParams, forcedFlag, conn ,isPreview); retString = confirm( tranID, xtraParams, forcedFlag, conn ,isPreview);
if ( retString != null && retString.length() > 0 ) //Modified by Anjali R. on [05/10/2018][In case of success prompt,system should not throw exception][Start]
//if ( retString != null && retString.length() > 0 )
if ( retString != null && retString.length() > 0 && retString.indexOf("VTCICONF3") < 0 )
//Modified by Anjali R. on [05/10/2018][In case of success prompt,system should not throw exception][End]
{ {
throw new Exception("Exception while calling confirm for tran Id:["+tranID+"]"); throw new Exception("Exception while calling confirm for tran Id:["+tranID+"]");
} }
...@@ -73,6 +83,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -73,6 +83,10 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
catch(Exception exception) catch(Exception exception)
{ {
System.out.println("Exception in [InvHoldConfEJB] getCurrdateAppFormat " + exception.getMessage()); System.out.println("Exception in [InvHoldConfEJB] getCurrdateAppFormat " + exception.getMessage());
//Modified by Anjali R. on[05/10/2018][Throw exception][Start]
exception.printStackTrace();
throw new ITMException(exception);
//Modified by Anjali R. on[05/10/2018][Throw exception][End]
} }
return retString; return retString;
} }
...@@ -101,14 +115,16 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo ...@@ -101,14 +115,16 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
{ {
if ( conn == null )//changed by Gulzar - 25/11/11 if ( conn == null )//changed by Gulzar - 25/11/11
{ {
ConnDriver connDriver = null; //Modified by Anjali R. on[05/10/2018][Commented unused variable connDriver][Start]
connDriver = new ConnDriver(); //ConnDriver connDriver = null;
//connDriver = new ConnDriver();
//Modified by Anjali R. on[05/10/2018][Commented unused variable connDriver][End]
//Changes and Commented By Bhushan on 06-06-2016 :START //Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END //Changes and Commented By Bhushan on 06-06-2016 :END
conn.setAutoCommit(false); conn.setAutoCommit(false);
connDriver = null; //connDriver = null;//Modified by Anjali R. on[05/10/2018][Commented unused variable connDriver]
connStatus = true; connStatus = true;
} }
finCommon = new FinCommon(); finCommon = new FinCommon();
...@@ -240,9 +256,17 @@ conn = getConnection(); ...@@ -240,9 +256,17 @@ conn = getConnection();
{ {
if(conn!=null) if(conn!=null)
{ {
try { try
{
//Modified by Anjali R. on[05/10/2018][If local connection is used then transaction get rollbacked in try block][Start]
if(connStatus)
{
conn.rollback(); conn.rollback();
} catch (SQLException ex) { }
//Modified by Anjali R. on[05/10/2018][If local connection is used then transaction get rollbacked in try block][End]
}
catch (SQLException ex)
{
System.out.println("Exception : "+e); System.out.println("Exception : "+e);
e.printStackTrace(); e.printStackTrace();
...@@ -290,7 +314,8 @@ conn = getConnection(); ...@@ -290,7 +314,8 @@ conn = getConnection();
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception : "+e);e.printStackTrace(); System.out.println("Exception : "+e);
e.printStackTrace();
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