Hi Firzhan, Reason why always the catalina-server.xml file get copied into "<CARBON_HOME>/repository/conf/" folder when using *serverConfigurationManager.applyConfiguration(sourceCatalinaFile, targetCatalinaFile)* is because of the method implementation ignores the target file path and consider only the file name and all the activities are happening inside "<CARBON_HOME>/repository/conf/". I have created a TA-JIRA [1] for this.
*** *serverConfigurationManager.*applyConfigurationWithoutRestart*(sourceCatalinaFile, targetCatalinaFile,*true*) method can be used without any issue. [1]. https://wso2.org/jira/browse/TA-952 <https://wso2.org/jira/browse/TA-952> Thanks and Best Regards, Saneth Dharmakeerthi Senior Software Engineer WSO2, Inc. Mobile: +94772325511 On Mon, Mar 2, 2015 at 8:47 AM, Saneth Dharmakeerthi <sane...@wso2.com> wrote: > Hi Firzhan, > > Use following method and it will do the job. > > serverConfigurationManager.*applyConfigurationWithoutRestart*(sourceCatalinaFile, > targetCatalinaFile,*true*); > > Thanks and Best Regards, > > Saneth Dharmakeerthi > Senior Software Engineer > WSO2, Inc. > Mobile: +94772325511 > > On Sun, Mar 1, 2015 at 10:48 PM, Firzhan Naqash <firz...@wso2.com> wrote: > >> Hi All, >> >> I am trying to write an automation test where I need to copy the >> modified catalina-server.xml file in to >> <CARBON_HOME>/repository/conf/tomcat folder. >> >> But always the catalina-server.xml file get copied in to >> <CARBON_HOME>/repository/conf/ folder. But on the other hand I could copy >> the axis.xml file without any issues. >> >> I am using following method to copy this. >> >> >> File sourceCatalinaFile = new >> File(ProductConstant.SYSTEM_TEST_RESOURCE_LOCATION + >> BPSTestConstants.DIR_ARTIFACTS >> + File.separator + >> BPSTestConstants.DIR_HTTPS_ONLY_TRANSPORT + File.separator + >> "catalina-server.xml"); >> File targetCatalinaFile = new >> File(CarbonUtils.getCarbonConfigDirPath() + File.separator + "tomcat" + File >> .separator + "catalina-server.xml"); >> >> >> serverConfigurationManager.applyConfiguration(sourceCatalinaFile, >> targetCatalinaFile); >> >> Any help is appreciated to sort out this issue. >> >> Regards, >> Firzhan >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev