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