Commit 4e51e087 authored by manohar's avatar manohar

bug fix conn.commit() added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91868 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9cf112c9
...@@ -602,7 +602,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -602,7 +602,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
if(allocQty > 0) if(allocQty > 0)
{ {
System.out.println("if calling........"); System.out.println("if calling........");
errString = sorderAllocate(saleOrder, lineNo, itemCode, allocQty, expLev); errString = sorderAllocate(saleOrder, lineNo, itemCode, allocQty, expLev, conn);
if (errString != null && errString.trim().length() > 0) if (errString != null && errString.trim().length() > 0)
{ {
System.out.println("errString :"+errString); System.out.println("errString :"+errString);
...@@ -672,7 +672,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -672,7 +672,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
} }
private String sorderAllocate(String saleOrder, String lineNo, String itemCode, double allocQty, String expLev) throws ITMException private String sorderAllocate(String saleOrder, String lineNo, String itemCode, double allocQty, String expLev, Connection conn) throws ITMException
{ {
System.out.println("updateSOrder calling .............."); System.out.println("updateSOrder calling ..............");
String getDataSql = null; String getDataSql = null;
...@@ -721,9 +721,9 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -721,9 +721,9 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
try try
{ {
ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //connDriver = null;
// 21/08/12 manoharan get the shipping site // 21/08/12 manoharan get the shipping site
getDataSql = "SELECT SITE_CODE__SHIP FROM SORDER WHERE SALE_ORDER = ? "; getDataSql = "SELECT SITE_CODE__SHIP FROM SORDER WHERE SALE_ORDER = ? ";
pstmtStock = conn.prepareStatement(getDataSql); pstmtStock = conn.prepareStatement(getDataSql);
...@@ -1002,6 +1002,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc ...@@ -1002,6 +1002,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
System.out.println("SQLException :" + se); System.out.println("SQLException :" + se);
se.printStackTrace(); se.printStackTrace();
errString = se.getMessage(); errString = se.getMessage();
conn.rollback();
return errString; return errString;
} }
......
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