Results 1 to 3 of 3

Thread: Deployment configuration options

  1. #1
    Join Date
    Jan 2005
    Location
    Toronto, ON
    Posts
    8

    Default Deployment configuration options

    Hi all,

    We have an app which will be deployed at a number of sites. We call some external programs, so there are some configuration differences such as the location of the external binaries and their working directories. A recent requirements change mandates that users be able to configure these settings through our admin webapp.

    Originally I used PropertyPlaceholderConfigurer to pull the values from a properties file and inject them as bean properties. In order to support editing the configuration through the web, I moved to a ConfigDao interface backed by a JDBC implementation. Now, however, I have a lot of confgDao.getProperty("foo") calls in the code, which aren't really sitting right with me.

    How have other people dealt with this situation?

    Thanks,
    Patrick.

  2. #2
    Join Date
    Sep 2004
    Location
    Melbourne, Australia
    Posts
    54

    Default

    I had a similar problem and solved it by writting my own version of PropertyPlaceholderConfigurer. You can check it out at http://spring-config.sf.net. For ideas on how to implement your own evaluator have a look at the CommonsPlaceholderEvaluator class.

    It currently supports spring 1.1.5 and works well (I use the code in production applications). I'm planning on fixing the spring 1.2 issues some time soon...

  3. #3
    Join Date
    Jan 2005
    Location
    Toronto, ON
    Posts
    8

    Default

    I have taken a look at spring-config and it looks to be near to what I need. It seems easiest to subclass PropertyPlaceholderConfigurer as you did and resolve properties using my ConfigDao. The only downside to this approach is that the ApplicationContext will have to be refreshed after the properties have been saved.

Similar Threads

  1. Dynamic Property Configuration
    By fenrick in forum Container
    Replies: 3
    Last Post: May 12th, 2006, 02:38 AM
  2. Replies: 2
    Last Post: Jul 14th, 2005, 03:56 AM
  3. Replies: 0
    Last Post: Jun 21st, 2005, 06:17 AM
  4. Configuration / Deployment question
    By hay7777 in forum Container
    Replies: 9
    Last Post: Jun 21st, 2005, 04:32 AM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •