Commit 21dcaa42 authored by msingh's avatar msingh

Changed by Manish on 08/06/16 for pick de-allocation for DDUK


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101790 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af3b44db
......@@ -95,12 +95,23 @@ public class ConsolidatToDoc {
DistCommon disCommon = new DistCommon();
ConnDriver connDriver = null;
Connection tempConn = null; //Added by Manish on 19/04/16
boolean isLocalConnection = false;
try
{
System.out.println("*********inside try block** CONSOLIDATE TO DOCK *****");
System.out.println("ptcn ======>["+ptcn+"]");
if(conn == null)
{
isLocalConnection = true;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
}
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
java.util.Date sysDate = new java.util.Date();
String sysDateStr = sdf.format(sysDate);
......@@ -1110,6 +1121,7 @@ public class ConsolidatToDoc {
tempConn = connDriver.getConnectDB("DriverITM");
connDriver = null;
// errString = updatedespatch(ptcn, conn);
errString = updatedespatch(ptcn, tempConn);
//Changed by Manish on 19/04/16 [end]
......@@ -1467,6 +1479,22 @@ public class ConsolidatToDoc {
return errString;
*/
if(isLocalConnection)
{
try
{
if(conn != null)
{
conn.rollback();
}
}
catch(Exception e1)
{
e1.printStackTrace();
throw new ITMException(e1) ;
}
}
throw new ITMException(b) ;
//Changed by Rohan on 10-12-12 to throw error.end
......@@ -1495,6 +1523,22 @@ public class ConsolidatToDoc {
return errString;
*/
if(isLocalConnection)
{
try
{
if(conn != null)
{
conn.rollback();
}
}
catch(Exception e1)
{
e1.printStackTrace();
throw new ITMException(e1) ;
}
}
throw new ITMException(se) ;
//Changed by Rohan on 10-12-12 to throw error.end
}
......@@ -1521,6 +1565,22 @@ public class ConsolidatToDoc {
}
return errString ;
*/
if(isLocalConnection)
{
try
{
if(conn != null)
{
conn.rollback();
}
}
catch(Exception e1)
{
e1.printStackTrace();
throw new ITMException(e1) ;
}
}
throw new ITMException(e) ;
//Changed by Rohan on 10-12-12 to throw error.end
}
......@@ -1577,7 +1637,23 @@ public class ConsolidatToDoc {
}
//Changed by Manish 0n 15/03/16 for max cursor issue for DDUK[end]
if(conn != null && isError)
if(isLocalConnection && !isError)
{
try
{
if(conn != null)
{
System.out.println("commiting the transaction....");
conn.commit();
}
}
catch(Exception e1)
{
e1.printStackTrace();
throw new ITMException(e1) ;
}
}
else if(conn != null && isError)
{
System.out.println("rollbacking the changes*************");
conn.rollback();
......
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