How to load config xml for apache Ignite from resources - ignite

In my java project, I have config.xml in the
java/main/resources
folder. How do I load it so apache ignite can pick it up?
Ignition.start("config.xml");

You should put the file in java/main/resources/META-INF folder. In this case it will be picked up automatically.

Related

multiple webapp with Log4j log file on a single apache server

I'm deploying multiple WAR files in an apache tomcat server. each WAR file is containing their respective Log4j.properties file (Log4j located in WEB-INF/Log4j.properties).
If I'm deploying app1.WAR, having WEB-INF/classes/Log4j.properties to generate logs in CATALINA-HOME/logs/app1.log and another app2.WAR, having WEB-INF/classes/Log4j.properties to generate logs in CATALINA-HOME/logs/app2.log, but every logs from my both webapps are written into CATALINA-HOME/logs/app1.log.
how can I configure Log4j to create dedicated log file for each webapp loaded in apache ?
I finally found a solution.
we just need to copy Log4j and commons lib jar files in the WEB-INF/lib folder of each WAR file to get an independent instance of Log4j per webapp. Then, Log4J will get the Log4j.properties file of the webapp to create its own Logging instance.
Hope it will help.
The solution by #tiamat didn't worked for me. I have to configure a listener to initialize logger context along with providing configuration location explicitly to the context
URL configLocation = Class.forName("com.example.MyAppListener").getResource("/log4j2.xml");
LoggerContext context = (LoggerContext) LogManager.getContext(false);
context.setConfigLocation(configLocation.toURI());
if(!context.isInitialized()) {
context.initialize();
}else {
context.reconfigure();
}

Resin plugin for IntelliJ Ultimate- where is conf folder

I just installed Resin plugin for IntelliJ, but I couldn't set the configuration correctly.
Running Resin separately has worked for my application. Here's what I did to configure Resin (the standalone application)
Download http://www.caucho.com/download/resin-pro-3.1.12.zip
Copy some conf files to C:\resin-pro-3.1.12\conf
I figured the reason why my IntelliJ's Resin plugin doesn't behave as expected is because I haven't put my conf files into conf folder. But, I don't know where conf folder is located for Resin plugin for IntelliJ
Actually, just go to Run > Edit Configurations.. > Resin > Configure.. and select default resin configuration file

Tomcat customization while starting server

I am manually copying a war file to the web-apps folder of Tomcat and starting Tomcat using cmd ./catalina.sh start. I want to customize it in such a way that I can use a war name to start e.g ./catalina.sh start quickenweb (where 'quickenweb' is a war file name).
Please suggest how to achieve this.
If you have access to Windows and WinZip or the 7-Zip File Manager, you can open the war file with Zip Program. Or, if you have LINUX, PeaZip/File Roller would work too.
In the zip program, you can navigate to the folder - like log4j.properties for example and edit it. When closing TextPad/LeafPad for example, the Zip program should prompt you to update the war file. It is advisable to edit/update the war file outside of the tomcat folder structure and then delete the war under tomcat and then update.. Actually, probe is a great tool for managing/updating/compiling war files.
Hope this helps?

Define repository for apache archiva with svn or any configuration file

Is it possible to define apache archiva repository in configuration file and save it in SVN.
So that the repository does not need to be re-applied by hand in the next installation of Apache Archiva?
Sure all is in one file.
Search the file $ARCHIVA_BASE/conf/archiva.xml and backup it.

Loading property files in weblogic 10.3

I have an application which acesses a lot of property files. In jboss 5.1 we can load this from the conf directory. I would like to know if there is any such way of loading the property files in weblogic 10.3 .
I don't want to include it in an jar and place in the lib,since these property files are configurable files. The user needs to configure certain properties of the application.
Also placing the property files in the domain directory is not very good and I also would like to know if there is any other way of achieving the same .
Regards
Raj
You can place the properties files needed by your application(s) to the classpath of Weblogic and then remove the files from your WAR/JAR/EAR.
If you choose a specific folder that is not yet in your classpath, just log on the Weblogic console, and navigate through Environment -> Servers -> [Your server name] -> Configuration -> Server Start
Now it is just about adding the folder containing your properties file(s) to the classpath.