Commit 62c3307d authored by ssalve's avatar ssalve

changes for E12GenericUtility and DBConnect


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@43951 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4c1cf625
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.utility.UserInfoBean; import ibase.utility.UserInfoBean;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
...@@ -66,6 +67,8 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun ...@@ -66,6 +67,8 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun
int currentFormNo=0; int currentFormNo=0;
int ctr=0,cnt=0; int ctr=0,cnt=0;
Connection conn = null; Connection conn = null;
//Added by sarita on 01/06/2017
ConnDriver connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null ; ResultSet rs = null ;
NodeList parentNodeList = null; NodeList parentNodeList = null;
...@@ -84,7 +87,13 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun ...@@ -84,7 +87,13 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
try try
{ {
conn = getConnection(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = getConnection();
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;
//changes and commented by sarita for DBConnection on 01/06/2017 :END
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
{ {
...@@ -410,6 +419,8 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun ...@@ -410,6 +419,8 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun
public String itemChanged(Document dom, Document dom1, Document dom2,String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException public String itemChanged(Document dom, Document dom1, Document dom2,String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
Connection conn = null; Connection conn = null;
//Added by sarita on 01/06/2017
ConnDriver connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null ; ResultSet rs = null ;
SimpleDateFormat sdf; SimpleDateFormat sdf;
...@@ -432,7 +443,13 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun ...@@ -432,7 +443,13 @@ public class AccountsIC extends ValidatorEJB implements AccountsICRemote, Accoun
try try
{ {
conn = getConnection(); //changes and commented by sarita for DBConnection on 01/06/2017 :START
//conn = getConnection();
connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;
//changes and commented by sarita for DBConnection on 01/06/2017 :END
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
......
...@@ -72,10 +72,13 @@ public class LoanPartyIC extends ValidatorEJB implements LoanPartyICLocal, LoanP ...@@ -72,10 +72,13 @@ public class LoanPartyIC extends ValidatorEJB implements LoanPartyICLocal, LoanP
String code="",tempCode="",descr = ""; String code="",tempCode="",descr = "";
try try
{ {
//conn = connDriver.getConnectDB("DriverITM");
//conn.setAutoCommit(false); //changes and commented by sarita for DBConnection on 01/06/2017
//connDriver = null; conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn.setAutoCommit(false);
connDriver = null;
//conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext.trim()); currentFormNo = Integer.parseInt(objContext.trim());
...@@ -801,8 +804,10 @@ public class LoanPartyIC extends ValidatorEJB implements LoanPartyICLocal, LoanP ...@@ -801,8 +804,10 @@ public class LoanPartyIC extends ValidatorEJB implements LoanPartyICLocal, LoanP
try try
{ {
SimpleDateFormat sdf1= new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf1= new SimpleDateFormat(genericUtility.getDBDateFormat());
//conn = connDriver.getConnectDB("DriverITM"); //changes and commented by sarita for DBConnection on 01/06/2017
conn = getConnection(); conn = connDriver.getConnectDB("DriverITM");
//conn = getConnection();
//changes and commented by sarita for DBConnection on 01/06/2017
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
{ {
......
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