Commit 7c61b3f1 authored by piyush's avatar piyush

Changes done in shiftprocess and shiftpattern to resolve issue of from ITM


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91570 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 432ee0a4
ibase3-webitm-adm5-0-7.jar Released
EJB3 - The changes done in ShiftPattern.java (wfvaldata & itemchanged method) to close the resultset/statements/connections in finally block as it was throwing exception. Issue raised by Pinakin on 08/12/2011.
......@@ -191,6 +191,50 @@ public String wfValData() throws RemoteException,ITMException
errString = genericUtility.createErrorString(e);
e.printStackTrace();
}
// Modified by Piyush on 08/12/2011 to close the connection in finally block as it was throwing exception (Issue raised by Pinakin) .Start
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (rs2 != null)
{
rs2.close();
rs2 = null;
}
if (st != null)
{
st.close();
st = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (stmt != null)
{
stmt.close();
stmt = null;
}
if (conn != null)
{
conn.close();
conn = null;
}
}
catch(Exception e1)
{
System.out.println("Exception during closing the connections :ShiftPatternEJB :wfValData(Document dom):" + e1.getMessage() + ":");
errString = genericUtility.createErrorString(e1);
e1.printStackTrace();
}
}
// Modified by Piyush on 08/12/2011 to close the connection in finally block as it was throwing exception (Issue raised by Pinakin) .End
System.out.println("error :"+errString);
return (errString);
}
......@@ -319,9 +363,28 @@ public String wfValData() throws RemoteException,ITMException
{
try
{
// Modified by Piyush on 08/12/2011 to close the connection/statements/resultsets in finally block .Start
/*
System.out.println("Closing Connection.......");
conn.close();
conn = null;
*/
if (rs != null)
{
rs.close();
rs = null;
}
if (stmt != null)
{
stmt.close();
stmt = null;
}
if (conn != null)
{
conn.close();
conn = null;
}
// Modified by Piyush on 08/12/2011 to close the connection/statements/resultsets in finally block .Start
}catch(Exception se){}
}
System.out.println("Return XML" + valueXmlString.toString() );
......
......@@ -300,7 +300,8 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
{
if( xtraParams.indexOf("user_lang=") <= 0 )
{
fromDate = genericUtility.getValidDateString(fromDate, "yy-MM-dd" , genericUtility.getApplDateFormat());
//fromDate = genericUtility.getValidDateString(fromDate, "yy-MM-dd" , genericUtility.getApplDateFormat());
fromDate = genericUtility.getValidDateString(fromDate, "dd/MM/yy" , genericUtility.getApplDateFormat());
}
}
//Added By Rupesh on [14-10-11] [CCF No.:-AD01SUN0018] [Reason :- Convert Date format from ITM format to ApplDateFormat] End
......@@ -318,7 +319,8 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
{
if( xtraParams.indexOf("user_lang=") <= 0 )
{
toDate = genericUtility.getValidDateString(fromDate, "yy-MM-dd" , genericUtility.getApplDateFormat());
//toDate = genericUtility.getValidDateString(fromDate, "yy-MM-dd" , genericUtility.getApplDateFormat());
toDate = genericUtility.getValidDateString(toDate, "dd/MM/yy" , genericUtility.getApplDateFormat());
}
}
//Added By Rupesh on [14-10-11] [CCF No.:-AD01SUN0018] [Reason :- Convert Date format from ITM format to ApplDateFormat] End
......@@ -771,9 +773,22 @@ public class ShiftProcess extends ProcessEJB implements ShiftProcessLocal,ShiftP
// changed by Dhiraj 11/10/10 [AD01SUN008].start
// errString = itmDBAccessEJB.getErrorString("","VTPCOMPT","","",conn);
// return errString;
//Added by Santosh on [19/12/11][to solve the issue when called on Employee Event Confirmation][Start] -->
if(patternCodeFilt != null && patternCodeFilt.length() > 0)
{
errString = "";
}
else
{
errString = itmdbAccessLocal.getErrorString("","VTPCOMPT","","",conn);
}
return errString;
//Added by Santosh on [19/12/11][to solve the issue when called on Employee Event Confirmation][End] -->
//Commented by Santosh on [19/12/11][Not in Use][Start]-->
//errString = itmdbAccessLocal.getErrorString("","VTPCOMPT","","",conn);
//return errString;
// changed by Dhiraj 11/10/10 [AD01SUN008].end
//Commented by Santosh on [19/12/11][Not in Use][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