Commit 765345bc authored by vvengurlekar's avatar vvengurlekar

WeekOffCreationPrc.java - getConnection related changes done


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199632 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 78eb94ee
......@@ -7,18 +7,23 @@ Auther : Gulzar
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import java.sql.*;
import org.w3c.dom.*;
import javax.ejb.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import ibase.system.config.*;
import java.util.Calendar;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import javax.ejb.Stateless; // added for ejb3
import org.w3c.dom.Document;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.utility.ITMException;
@Stateless // added for ejb3
public class WeekOffCreationPrc extends ProcessEJB implements WeekOffCreationPrcLocal,WeekOffCreationPrcRemote // SessionBean
......@@ -50,7 +55,9 @@ public class WeekOffCreationPrc extends ProcessEJB implements WeekOffCreationPrc
if(xmlString != null && xmlString.trim().length() > 0)
{
System.out.println("XML String :"+xmlString);
GenericUtility genericUtility = GenericUtility.getInstance();
//Changed by Varsha V on 15-04-19 to use E12GenericUtility
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
dom = genericUtility.parseString(xmlString);
}
resString = process(dom,dom1,windowName,xtraParams);
......@@ -75,11 +82,15 @@ public class WeekOffCreationPrc extends ProcessEJB implements WeekOffCreationPrc
int dayNo = 0, noOfDays = 0, minDays = 0, maxDays = 0, weeklyOffDay = 0, insCnt = 0, count = 0;
java.util.Date fromDate = null, weeklyOffDate = null, toDate = null;
GenericUtility genericUtility = GenericUtility.getInstance();
//Changed by Varsha V on 15-04-19 to use E12GenericUtility
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//Added by Varsha V on 15-04-19 to change connection setting
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
conn.setAutoCommit(false);
fromDt = genericUtility.getColumnValue("from_date",dom);
toDt = genericUtility.getColumnValue("to_date",dom);
......@@ -269,7 +280,9 @@ public class WeekOffCreationPrc extends ProcessEJB implements WeekOffCreationPrc
String relativeDate ="";
try
{
SimpleDateFormat sdf = new SimpleDateFormat(GenericUtility.getInstance().getApplDateFormat());
//changed by Varsha V on 15-04-19 to use E12GenericUtility.
//SimpleDateFormat sdf = new SimpleDateFormat(GenericUtility.getInstance().getApplDateFormat());
SimpleDateFormat sdf = new SimpleDateFormat(new E12GenericUtility().getApplDateFormat());
Calendar calObject = Calendar.getInstance();
calObject.setTime(effDate);
calObject.add(calObject.DATE,no);
......
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