Is it possible to load values for infinispan-config.xml file from some property file so that we can get rid of hard coded values. If possible then can somebody show me the way how i load property file in infinispan-config.xml file because there is no Pre defined tag for configuration.
This is possible by setting respective system properties.
For example here is one specific Infinispan configuration file which is using this approach: https://github.com/infinispan/infinispan/blob/master/core/src/test/resources/configs/string-property-replaced.xml
and here is a test which is working with that file: https://github.com/infinispan/infinispan/blob/master/core/src/test/java/org/infinispan/config/StringPropertyReplacementTest.java
This looks to be the most straightforward way how to achieve this.
The last thing which needs to be done is to simply read all lines in your configuration file and put them correctly to system properties.
Related
I am working with a config file from Python that, depending on the configuration, some variables should not be filled (adding values to these variables will have no effect).
I was wondering if there is an easy and clean way to make an "interactive" config file. With this I mean, I would like to make a configuration application that, for example, shows some new variables to be filled, depending on a previously given value, or even limits the input values with sliders.
I have searched for something like this, but I haven't found anything. Is there any way to make the config files more "interactive" (preferably Python-based)?
I have a customer using an application called 'Nhibernate' and a plugin called Log4net. Both work in conjunction to generates a log file.
My problem is that once nhibernate.log reaches more than 200MB a new file is generated and the old file is renamed NHibernate.log.1
Is there way to avoid the segmentation of the log files and makes the log readable even after 200MB.
Thank you for your responses.
Regards.
You can open the NHibernate.log.1 with any text editor. If you open the configuration file you can change the logname pattern for the NHibernate logger file property.
If you want all in one file you can change the appender to a normal fileappender.
An link to an older blog with some information on how to do the configuration for the NHibernate appender: http://geekswithblogs.net/opiesblog/archive/2006/09/29/92721.aspx
Log4net has a configurator that defines the max size of the file and the number of extra files created after reaching this max size.
If you want everything on a single file, you can re-defines these properties.
You probably have an .config file or on your app.config/web.config an set of xml properties that defines these parameters.
This is an example of the property you are looking for:
<maximumFileSize value="200MB" />
For instance I can have two files with the same file ending:
nginx.conf
ossec.conf
The first one is in nginx format, the second is XML. How do I force different highlights for each without renaming the files?
Setting the template data language for the files in the project settings might help: (See point 3.)
https://confluence.jetbrains.com/display/PhpStorm/Syntax+highlighting+of+PHP+inside+JavaScript+%28and+other+languages%29
How can I set the dynamic file path or folder directory for kettle jobs?
Please check the attached screenshot.
Goal: Read the path from a config file as a variable[so that we can change the path dynamically as per the other parameters.]
Details: Say, we want to use the /web/test directory for test environment and we want to fetch file repository from the normal path when the parameter is not test! I assume, there must be a way to keep a config/ini file from where we can read the path and use the variable inside the "File/Directory" section of pentaho.
I am gone through variable reference option but which is mainly for database configurations parameter ,some people suggested which is not good option instead of you can specified the database configuration in xml.
Please suggest any idea or solution.
Sounds like you want to set a parameter/variable in the .kettle file and reference it in the File or directory text box. Note the red dollar sign next to the box. That means this field accepts variables. Here's the wiki entry for variables:
PDI Variables
You can also read from a config file directly (from a transform) and set it dynamically with the Set variables step if you can only have one .kettle file. Also check out the Check if connected to repository (from the Repository branch) step as well and see if that will suit your needs.
If none of these suite your needs, please add detail to your question to describe exactly what you're trying to do and how you're trying to do it.
I have this pretty simple application, it uses a webService to transfer data to my servers DataBase. Now it is very important for me to keep this application as one single file, and not having some XML files needed for it to work, but this is the case. I think the XML file holds the information to this webService, so without it the application crashes. Is there a way to get the application to work without this XML file, or a way to put the XML inside the exe archive?
Any way to accomplish this is much appreciated.
It sounds like what you want to do is invoke a web service programmatically (without a Visual-Studio-added web reference). Another potentially useful link here.
I imagine all of the configuration settings that exist in an app.config file can be hard-coded in one way or another, the various config sections will just require varying degrees of ingenuity to make it happen.