Commit b524f103 authored by ssalve's avatar ssalve

Sarita: Done changes to add new method commit on 19MARCH2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@182297 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cf63045b
......@@ -38,12 +38,69 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
E12GenericUtility genericUtility= new E12GenericUtility();
FinCommon finCommon = new FinCommon();
DistCommon disCommon= new DistCommon();
//Added Method By Sarita on 19MARCH2018 [start]
public String confirm(String tranId, String xtraParams, String forcedFlag)throws RemoteException, ITMException
{
System.out.println("Inside Confirm Method of Connection!!!!!!!!");
String errString = "";
boolean isError = false;
Connection conn = null;
try
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = getConnection();
conn.setAutoCommit(false);
errString = confirm(tranId, xtraParams,forcedFlag,conn);
System.out.println("errString[confirm] is ["+errString+"]");
if(errString != null && !(errString.indexOf("VTMCONF2") > -1))
{
isError = true;
}
}
catch(Exception e)
{
System.out.println("Exception [AdjIssueRcpConf]"+e);
e.printStackTrace();
isError = true;
throw new ITMException(e);
}
finally
{
try
{
if(isError)
{
conn.rollback();
System.out.println("SRLContainerSplit connection rollback");
}
else
{
conn.commit();
System.out.println("SRLContainerSplit connection committed");
}
if(conn != null)
{
conn.close();
conn = null;
}
}
catch(Exception e)
{
System.out.println("Exception : "+e);e.printStackTrace();
throw new ITMException(e);
}
}
return errString;
}
//Added Method By Sarita on 19MARCH2018 [start]
public String confirm(String tranId, String xtraParams, String forcedFlag,Connection conn)throws RemoteException, ITMException
{
System.out.println(">>>>>>>>>>>>>>>>>>AdjIssueRcpConf and receipt Conf confirm called>>>>>>>>>>>>>>>>>>>");
String confirmed = "",runMode="";
String sql = "";
Connection conn = null;
//Connection conn = null;
PreparedStatement pstmt = null;
String errString = null;
String refSer = "",winName= "";
......@@ -54,13 +111,15 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
E12GenericUtility genericUtility= new E12GenericUtility();
try
{
ConnDriver connDriver = null;
//Commented by sarita on 19MARCH2018 [start]
/*ConnDriver connDriver = null;
connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
conn.setAutoCommit(false);
conn.setAutoCommit(false);*/
//Commented by sarita on 19MARCH2018 [end]
runMode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "runMode");
System.out.println("runMode["+runMode+"]");
if (tranId != null && tranId.trim().length() > 0)
......@@ -101,7 +160,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
{
cnt = rs.getInt(1);
}
System.out.println("confirmed>>>>>>>>"+confirmed);
System.out.println("confirmed>>>>>>>>cnt is "+cnt);
rs.close();
rs = null;
pstmt.close();
......@@ -113,9 +172,11 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
System.out.println("retrieveAdjissrcp>>>"+errString);
if (errString == null || errString.trim().length() == 0)
{
conn.commit();
//Commented by sarita on 19MARCH2018
//conn.commit();
errString = itmDBAccessLocal.getErrorString("", "VTMCONF2", "");
}else
}
else
{
conn.rollback();
}
......@@ -124,6 +185,7 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
}
} catch (Exception e)
{
if(conn!=null)
{
try {
......@@ -141,11 +203,13 @@ public class AdjIssueRcpConf extends ActionHandlerEJB implements AdjIssueRcpConf
{
try
{
if(conn != null)
//Commented by sarita on 19MARCH2018[start]
/*if(conn != null)
{
conn.close();
conn = null;
}
}*/
//Commented by sarita on 19MARCH2018[end]
if(rs != null)
{
rs.close();
......
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