Commit 04193611 authored by blad's avatar blad

Updated components has been uploaded for remove new getConnection() method in FIN.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101892 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 104df434
...@@ -99,10 +99,7 @@ public class MilestonePayGen ...@@ -99,10 +99,7 @@ public class MilestonePayGen
{ {
System.out.println("getXmlData inside dom !!!!!!!!"); System.out.println("getXmlData inside dom !!!!!!!!");
SimpleDateFormat sdf1 = new SimpleDateFormat(e12GenericUtility.getApplDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(e12GenericUtility.getApplDateFormat());
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(e12GenericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(e12GenericUtility.getApplDateFormat());
java.util.Calendar cal = java.util.Calendar.getInstance(); java.util.Calendar cal = java.util.Calendar.getInstance();
...@@ -466,10 +463,7 @@ public class MilestonePayGen ...@@ -466,10 +463,7 @@ public class MilestonePayGen
{ {
System.out.println("getXmlData inside dom !!!!!!!!"); System.out.println("getXmlData inside dom !!!!!!!!");
SimpleDateFormat sdf1 = new SimpleDateFormat(e12GenericUtility.getApplDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(e12GenericUtility.getApplDateFormat());
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
NodeList hdrDommList = dom.getElementsByTagName("Detail2"); NodeList hdrDommList = dom.getElementsByTagName("Detail2");
System.out.println("length of details 2 xml===>["+hdrDommList.getLength()+"]"); System.out.println("length of details 2 xml===>["+hdrDommList.getLength()+"]");
...@@ -1666,10 +1660,7 @@ public class MilestonePayGen ...@@ -1666,10 +1660,7 @@ public class MilestonePayGen
try try
{ {
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
System.out.println("saveSampleData>>>>>>>"+saveSampleData); System.out.println("saveSampleData>>>>>>>"+saveSampleData);
if (saveSampleData != null && saveSampleData.trim().length() > 0) if (saveSampleData != null && saveSampleData.trim().length() > 0)
{ {
...@@ -2202,54 +2193,4 @@ public class MilestonePayGen ...@@ -2202,54 +2193,4 @@ public class MilestonePayGen
return calRelAmt; return calRelAmt;
} }
//Added By Bhushan on 06-06-2016 :START
private UserInfoBean userInfo = null;
public UserInfoBean getUserInfo()
{
return this.userInfo;
}
public void setUserInfo(UserInfoBean userInfo)
{
this.userInfo = userInfo;
}
public Connection getConnection()throws RemoteException,ITMException
{
Connection conn = null;
try
{
if(this.userInfo != null)
{
String transDB = this.userInfo.getTransDB();
System.out.println("getConnection :: transDB :: ["+transDB+"]");
if( transDB != null && transDB.trim().length() > 0 && !"null".equalsIgnoreCase(transDB))
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB(transDB);
connDriver = null;
}
else
{
throw new ITMException(new Exception("Connection file not specified in trans_db column of users table."));
}
}
else
{
throw new ITMException(new Exception("UserInfo is null."));
}
}
catch(Exception e)
{
System.out.println("Exception :[getConnection] :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
throw new ITMException(e);
}
return conn;
}
//Added By Bhushan on 06-06-2016 :END
} }
\ No newline at end of file
...@@ -125,10 +125,7 @@ public class PurcVchrMultiAttachmentBean ...@@ -125,10 +125,7 @@ public class PurcVchrMultiAttachmentBean
try try
{ {
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
String sql = "select v.tran_id as voucher_id,v.confirmed,l.tran_id as ref_id,l.purc_order,l.status,l.tran_date" String sql = "select v.tran_id as voucher_id,v.confirmed,l.tran_id as ref_id,l.purc_order,l.status,l.tran_date"
+" from VOUCHER v, LC_VOUCHER l where v.purc_order=l.purc_order and v.tran_id=? Order by v.purc_order"; +" from VOUCHER v, LC_VOUCHER l where v.purc_order=l.purc_order and v.tran_id=? Order by v.purc_order";
...@@ -264,10 +261,7 @@ public class PurcVchrMultiAttachmentBean ...@@ -264,10 +261,7 @@ public class PurcVchrMultiAttachmentBean
try try
{ {
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
String sql = "select tran_id from lc_voucher where tran_id=?"; String sql = "select tran_id from lc_voucher where tran_id=?";
...@@ -461,10 +455,7 @@ public class PurcVchrMultiAttachmentBean ...@@ -461,10 +455,7 @@ public class PurcVchrMultiAttachmentBean
try try
{ {
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
conn.setAutoCommit(false); conn.setAutoCommit(false);
InitialContext ctx = new InitialContext(new AppConnectParm().getProperty()); InitialContext ctx = new InitialContext(new AppConnectParm().getProperty());
...@@ -639,54 +630,5 @@ public class PurcVchrMultiAttachmentBean ...@@ -639,54 +630,5 @@ public class PurcVchrMultiAttachmentBean
return documentNames; return documentNames;
} }
//Added By Bhushan on 06-06-2016 :START
private UserInfoBean userInfo1 = null;
public UserInfoBean getUserInfo()
{
return this.userInfo;
}
public void setUserInfo(UserInfoBean userInfo)
{
this.userInfo = userInfo;
}
public Connection getConnection()throws RemoteException,ITMException
{
Connection conn = null;
try
{
if(this.userInfo != null)
{
String transDB = this.userInfo.getTransDB();
System.out.println("getConnection :: transDB :: ["+transDB+"]");
if( transDB != null && transDB.trim().length() > 0 && !"null".equalsIgnoreCase(transDB))
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB(transDB);
connDriver = null;
}
else
{
throw new ITMException(new Exception("Connection file not specified in trans_db column of users table."));
}
}
else
{
throw new ITMException(new Exception("UserInfo is null."));
}
}
catch(Exception e)
{
System.out.println("Exception :[getConnection] :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
throw new ITMException(e);
}
return conn;
}
//Added By Bhushan on 06-06-2016 :END
} }
...@@ -43,10 +43,7 @@ public class RPTValAprvWF ...@@ -43,10 +43,7 @@ public class RPTValAprvWF
try try
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
if(refSer != null && refSer.equalsIgnoreCase("P-ORD")) if(refSer != null && refSer.equalsIgnoreCase("P-ORD"))
{ {
...@@ -184,10 +181,7 @@ public class RPTValAprvWF ...@@ -184,10 +181,7 @@ public class RPTValAprvWF
try try
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
E12GenericUtility genericUtility = new ibase.utility.E12GenericUtility(); E12GenericUtility genericUtility = new ibase.utility.E12GenericUtility();
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
...@@ -1062,10 +1056,7 @@ public class RPTValAprvWF ...@@ -1062,10 +1056,7 @@ public class RPTValAprvWF
try try
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
InetAddress ownIP=InetAddress.getLocalHost(); InetAddress ownIP=InetAddress.getLocalHost();
termID = checkNull(ownIP.getHostAddress()); termID = checkNull(ownIP.getHostAddress());
System.out.println("termID :-["+termID+"]"); System.out.println("termID :-["+termID+"]");
...@@ -1328,53 +1319,4 @@ public class RPTValAprvWF ...@@ -1328,53 +1319,4 @@ public class RPTValAprvWF
} }
return input.trim(); return input.trim();
} }
//Added By Bhushan on 06-06-2016 :START
private UserInfoBean userInfo = null;
public UserInfoBean getUserInfo()
{
return this.userInfo;
}
public void setUserInfo(UserInfoBean userInfo)
{
this.userInfo = userInfo;
}
public Connection getConnection()throws RemoteException,ITMException
{
Connection conn = null;
try
{
if(this.userInfo != null)
{
String transDB = this.userInfo.getTransDB();
System.out.println("getConnection :: transDB :: ["+transDB+"]");
if( transDB != null && transDB.trim().length() > 0 && !"null".equalsIgnoreCase(transDB))
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB(transDB);
connDriver = null;
}
else
{
throw new ITMException(new Exception("Connection file not specified in trans_db column of users table."));
}
}
else
{
throw new ITMException(new Exception("UserInfo is null."));
}
}
catch(Exception e)
{
System.out.println("Exception :[getConnection] :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
throw new ITMException(e);
}
return conn;
}
//Added By Bhushan on 06-06-2016 :END
} }
...@@ -31,10 +31,7 @@ public class ThreeWayMatchCond { ...@@ -31,10 +31,7 @@ public class ThreeWayMatchCond {
int resultCnt = 0; int resultCnt = 0;
try { try {
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
timestamp = new Timestamp(System.currentTimeMillis()); timestamp = new Timestamp(System.currentTimeMillis());
...@@ -242,52 +239,4 @@ public class ThreeWayMatchCond { ...@@ -242,52 +239,4 @@ public class ThreeWayMatchCond {
return retString; return retString;
} }
//Added By Bhushan on 06-06-2016 :START
private UserInfoBean userInfo = null;
public UserInfoBean getUserInfo()
{
return this.userInfo;
}
public void setUserInfo(UserInfoBean userInfo)
{
this.userInfo = userInfo;
}
public Connection getConnection()throws RemoteException,ITMException
{
Connection conn = null;
try
{
if(this.userInfo != null)
{
String transDB = this.userInfo.getTransDB();
System.out.println("getConnection :: transDB :: ["+transDB+"]");
if( transDB != null && transDB.trim().length() > 0 && !"null".equalsIgnoreCase(transDB))
{
ConnDriver connDriver = null;
connDriver = new ConnDriver();
conn = connDriver.getConnectDB(transDB);
connDriver = null;
}
else
{
throw new ITMException(new Exception("Connection file not specified in trans_db column of users table."));
}
}
else
{
throw new ITMException(new Exception("UserInfo is null."));
}
}
catch(Exception e)
{
System.out.println("Exception :[getConnection] :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
throw new ITMException(e);
}
return conn;
}
//Added By Bhushan on 06-06-2016 :END
} }
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