Commit f72a0cdc authored by mjadhav's avatar mjadhav

connection add in insertmethod


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96769 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1d8bba8c
...@@ -17,16 +17,16 @@ import ibase.webitm.ejb.ProcessEJB; ...@@ -17,16 +17,16 @@ import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.io.BufferedReader; //import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; //import java.io.InputStream;
import java.io.InputStreamReader; //import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException; //import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection; //import java.net.HttpURLConnection;
import java.net.URL; //import java.net.URL;
import java.net.URLEncoder; //import java.net.URLEncoder;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
...@@ -52,9 +52,9 @@ import org.w3c.dom.NodeList; ...@@ -52,9 +52,9 @@ import org.w3c.dom.NodeList;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.rpc.ParameterMode; import javax.xml.rpc.ParameterMode;
import ibase.webitm.ejb.dis.DistCommon; //import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.dis.GenerateSaleOrderPrc; import ibase.webitm.ejb.dis.GenerateSaleOrderPrc;
import ibase.webitm.ejb.fin.FinCommon; //import ibase.webitm.ejb.fin.FinCommon;
@Stateless @Stateless
public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusPrcLocal,GenWOTrackStatusPrcRemote public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusPrcLocal,GenWOTrackStatusPrcRemote
...@@ -62,7 +62,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -62,7 +62,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
static static
{ {
System.out.println("-- GenerateworkOrderTrackPrc called -- "); System.out.println("-- GenerateworkOrderTrackPrc called!!! -- ");
} }
public String process() throws RemoteException,ITMException public String process() throws RemoteException,ITMException
...@@ -129,7 +129,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -129,7 +129,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
try try
{ {
System.out.println("process starts!!!!!!!"); System.out.println("process starts @@@!!!!!!!");
genericUtility = new GenericUtility(); genericUtility = new GenericUtility();
itmDBAccessEJB = new ITMDBAccessEJB(); itmDBAccessEJB = new ITMDBAccessEJB();
connDriver = new ConnDriver(); connDriver = new ConnDriver();
...@@ -211,7 +211,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -211,7 +211,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
errString=insertWorderTrack(workOrder,eventNo,activitySet,xtraParams); errString=insertWorderTrack(workOrder,eventNo,activitySet,xtraParams,conn);
errString = errString.toLowerCase(); errString = errString.toLowerCase();
System.out.println("err String from GenWOTrackStatusPrc ="+errString); System.out.println("err String from GenWOTrackStatusPrc ="+errString);
if((errString != null ) && (errString.indexOf("success") > -1)) if((errString != null ) && (errString.indexOf("success") > -1))
...@@ -278,7 +278,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -278,7 +278,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
public String insertWorderTrack(String workOrder ,String eventNo,String activitySet,String xtraParams) throws RemoteException,ITMException public String insertWorderTrack(String workOrder ,String eventNo,String activitySet,String xtraParams,Connection conn) throws RemoteException,ITMException
{ {
System.out.println( " Scheduler activity starts ......"); System.out.println( " Scheduler activity starts ......");
...@@ -292,7 +292,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -292,7 +292,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
int seqNo = 0; int seqNo = 0;
java.sql.Timestamp currDate = null; java.sql.Timestamp currDate = null;
java.util.Date planDate = null ; java.util.Date planDate = null ;
Connection conn = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
PreparedStatement pstmt = null,pstmt1 = null; PreparedStatement pstmt = null,pstmt1 = null;
PreparedStatement pstmtInst = null; PreparedStatement pstmtInst = null;
...@@ -304,10 +304,11 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -304,10 +304,11 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
try try
{ {
System.out.println("------insertWorderTrack-----");
Date currentDate = new Date(); Date currentDate = new Date();
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
connDriver = null; //connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
currDate = new java.sql.Timestamp(System.currentTimeMillis()); currDate = new java.sql.Timestamp(System.currentTimeMillis());
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
...@@ -494,7 +495,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -494,7 +495,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
catch(Exception e1){} catch(Exception e1){}
throw new ITMException(e); throw new ITMException(e);
} }
finally /*finally
{ {
try try
{ {
...@@ -505,7 +506,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP ...@@ -505,7 +506,7 @@ public class GenWOTrackStatusPrc extends ProcessEJB implements GenWOTrackStatusP
conn = null; conn = null;
} }
}catch(Exception se){} }catch(Exception se){}
} }*/
System.out.println("retString........:: " + retString); System.out.println("retString........:: " + retString);
return retString; return retString;
} }
......
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