configuration

Is it bad practice to include properties/configuaration files within jars?

For example: MyApp is a web app that contains a properties file (server.properties) that describes config data (e.g. server names) for the app. In the development phase, server.properties is located in its own IDE project folder (a logical spot for it). Now it's time to deploy MyApp. The IDE makes it quite trivial to jar up the class...

How let OSGi (Config Admin) persist/reuse your configuration?

I'm new to OSGi. My aim is to create a structure with the config admin, so you can enter a configuration, which will be reused after restarting the server. While I have read the api and tried some samples, I thought this feature will be included by default. My question to you: Is this possible at all and if yes: what have I to consider...

Where you you store your setting.xml?

For several of our applications we use an application configuration file. It usually just stores some directory paths and a few universal settings. We usually save it in the application directory (C:/Program Files/MyAppName) One problem we see is users want to edit this (from the application) while logged in as a user that doesn't have ...

How to setup mod_python configuration variables?

I'm running a Python server with mod_python, and I've run into some issues with configuration variables. This is actually two questions rolled into one, because I think they are highly related: I need a way to configure variables that will be available in Python while running. I currently just have a module that sets some name-value ...

Architecture for one database and several apps

If five applications are using the same database, and these apps need to be released at different times, what type of architecture or configuration accommodates that scenario? The main concern is: Any of the five applications are allowed to change the database, which can then break any of the four apps in production. ...

Good solutions to distribute a pre-configured Eclipse?

I am working with a medium team of developers. So far, everyone has its own version of Eclipse, configured with a slightly different set of plugins and with different configuration options. It is normally a pain to set up a new computer as we have to hunt for a bunch of different plugins and configure everything by hand. Is there a wa...

OLE DB Release Configuration Problem

When I compile my C# WPF project in release configuration mode with Visual Studio 2008 and run the project on my computer I have no problem at all. If I move the Release directory onto another computer (that does not have Visual Studio) everything seems to work except OLE DB. This is probably because the other computer does not have what...

How to share common properties among several maven projects?

I have several projects built by maven, and I want to share some common properties among them - spring version, mysql driver version, svn base url, etc. - so I can update them once and it will be reflected on all projects. I thought of having a single super pom with all the properties, but if I change one of the problem I need to eithe...

mysql ndb cluster add data node

Hi All, This is my config.ini file options affecting ndbd processes on all data nodes: [ndbd default] NoOfReplicas=1 # Number of replicas DataMemory=80M # How much memory to allocate for data storage IndexMemory=18M # How much memory to allocate for index storage # For DataMemory and IndexMemory, we have use...

Reloading a configuration file under jBoss

Hello everyone. Inspired by how Log4j reload its configuration files everytime I change it, I wrote a similar mbean task that read my xml file put in server/(myconfig)/conf Now I need to access it from my web application, which is in the deploy folder packaged as a .war file (it's a SEAM application). Should I create a method in the ...

Can SpringMVC be configured to process all requests, but exclude static content directories?

If I map my spring application to process all incoming requests ('/*'), then requests for static content return 404's. For example, a request for "myhost.com/css/global.css" would return a 404, even though the resource exists as Spring intercepts the request. The alternative is to map SpringMVC to a subdirectory (for example '/home/'), ...

Getting a StringCollection out of AppSettings through the configuration manager

I am accessing my assembly's configuration like this: ExeConfigurationFileMap map = new ExeConfigurationFileMap(); map.ExeConfigFilename = Assembly.GetExecutingAssembly().Location + ".config"; Configuration conf = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); AppSettingsSection appSettings = conf.App...

How do I set sys.excepthook to invoke pdb globally in python?

From Python docs: sys.excepthook(type, value, traceback)¶ This function prints out a given traceback and exception to sys.stderr. When an exception is raised and uncaught, the interpreter calls sys.excepthook with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this ...

How to filter ressources during build in Eclipse project?

I have an application that uses several configuration files (let just consider appli.properties here). These files contain several values that depend on the environment. We can find some information such as: server.port=${envi.server.port} On other side, I have a set of properties files, one per environment (dev.properties, homolo.pro...

How to solve problem with out of synchronization of J2EE module dependency in Eclipse?

I have two projects : my-lib and my-web. my-lib is built using the Java compiler of Eclipse, and a short Ant task is run on some properties files, which are then modified (as explained here). This is not a pretty solution, but it works. Now, as my-web is dependent of my-lib, I define my-lib as a Java EE Module Dependency of my-web. How...

How do I Log the Class file without the path in log4net

I want to be able to log the class file and line number in my log file so I am using the following config... <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <!--etc--> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level (%file:%line) %logger => ...

Log4Net filters "OR"

Is it possible to make a filter, for example a PropertyFilter that is neutral (and passed to next filter in the chain) if either one or another value matches? Something like: <filter type="log4net.Filter.PropertyFilter"> <Key value="myProperty" /> <StringsToMatch Operator="OR"> <Match>value1</Match> <Match>value2</Ma...

Why are the Configuration options not available in Visual Studio 2008?

I have a simple Web Handler project, and for some reason I cannot choose it's configuration either from the drop Down on the standard bar (It is greyed out), or from the Build Menu (there is no "Batch Build" or "Configuration Manager" menu entries for this one project). All the rest of my projects work fine, and it is a fresh clean buil...

.NET IoC - Equivalent Code for .NET Unity

In this Autofac IoC article they show an example of mapping an interface to an implementation with a parameter. You'll find it halfway down the article. What is the Unity equivalent in XML? Can't use the fluent syntax for what I'm doing. Needs to be an external config file. UPDATE: This is the specific piece of code I want to know how ...

Change in AppSettings needs restart my Application how can I avoid?

I'm using C# .NET 2.0 Windows Application. and I'm using app.config for my Application Settings. but change in AppSettings doesn't reflected runtime, it Needs Application to be restarted. How can I avoid it. Here is my code snippet I used to read and write the Application Settings. I'm reading the Setting like this string temp = Co...