Commit d7fe34f0 authored by agaikwad's avatar agaikwad

Create Channel partner connection


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@43846 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dc763ba9
...@@ -148,9 +148,21 @@ public class PostOrderActivity { ...@@ -148,9 +148,21 @@ public class PostOrderActivity {
} }
if (("A".equalsIgnoreCase(disLink)|| "S".equalsIgnoreCase(disLink) || "C".equalsIgnoreCase(disLink) ) && "Y".equalsIgnoreCase(purIntegrate)) if (("A".equalsIgnoreCase(disLink)|| "S".equalsIgnoreCase(disLink) || "C".equalsIgnoreCase(disLink) ) && "Y".equalsIgnoreCase(purIntegrate))
{ {
connCP = chaneParnerExist(despId,disLink,xtraParams,conn);
System.out.println("connCP["+connCP+"]");
//Changed By Nasruddin Start 04-11-16 //Changed By Nasruddin Start 04-11-16
long startTime2 = System.currentTimeMillis(); long startTime2 = System.currentTimeMillis();
retString=createPORCP(despId,disLink,xtraParams,conn,connCP); //retString=createPORCP(despId,disLink,xtraParams,conn,connCP);
if(connCP != null)
{
System.out.println("INSIDE CONNCP CONNECTION");
retString = createPORCP(despId,disLink,xtraParams,conn,connCP);
}
else
{
System.out.println("INSIDE CONN CONNECTION");
retString = createPORCP(despId,disLink,xtraParams,conn,conn);
}
long endTime2 = System.currentTimeMillis(); long endTime2 = System.currentTimeMillis();
System.out.println("DIFFERANCE IN TIME createPORCP DATA IN SECONDS INSIDE createPORCP():::["+(endTime2-startTime2)/1000+"]"); System.out.println("DIFFERANCE IN TIME createPORCP DATA IN SECONDS INSIDE createPORCP():::["+(endTime2-startTime2)/1000+"]");
//Changed By Nasruddin END 04-11-16 //Changed By Nasruddin END 04-11-16
...@@ -4292,5 +4304,47 @@ public class PostOrderActivity { ...@@ -4292,5 +4304,47 @@ public class PostOrderActivity {
} }
return retString; return retString;
} }
private Connection chaneParnerExist(String despId,String disLink,String xtraParams,Connection conn) throws ITMException
{
System.out.println("Inside chaneParnerExist...........");
String purIntegrate="";
Connection connCP = null;
ConnDriver connDriver = new ConnDriver();
DistCommon distCommon = new DistCommon();
try
{
purIntegrate=distCommon.getDisparams("999999", "PUR_INTEGRATED", conn);
if ("C".equalsIgnoreCase(disLink) )
{
String dirPath="";
if ( CommonConstants.APPLICATION_CONTEXT != null )
{
dirPath = CommonConstants.APPLICATION_CONTEXT + CommonConstants.SETTINGS;
System.out.println("dirPath1>>>>"+dirPath);
}
else
{
dirPath = CommonConstants.JBOSSHOME + File.separator + "server" + File.separator + "default" + File.separator + "deploy" + File.separator + "ibase.ear" + File.separator + "ibase.war" + File.separator + CommonConstants.SETTINGS;
System.out.println("dirPath2>>>>>>"+dirPath);
}
File xmlFile = new File( dirPath + File.separator + "DriverITMCP" + ".xml" );
System.out.println("xmlFile>>>>>"+xmlFile);
if(xmlFile.exists())
{
System.out.println("file exist new connection is creating");
connCP = connDriver.getConnectDB("DriverITMCP");
return connCP;
}
}
}catch(Exception e)
{
System.out.println("Exception :conf ::" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
return connCP;
}
} }
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