External Web Application Configuration options?


General J2EE: External Web Application Configuration options?

  1. External Web Application Configuration options? (1 messages)

    What's the best way to have application configuration external to my ear file?

    We don't want our customers (who are non-technical) to have to unpack our ear file, then war file, edit web.xml settings or nested properties files, then have to pack everything back up again.

    We also need a solution that will work on any application server, e.g. ones that don't unpack the ear and war files as well as those that do, clustered and unclustered, any O/S etc.

    My first thought is to use an external property file but this has a few problems:
    - difficult to use a consistent file location (perhaps relative to the app server's "current directory" might be best?)
    - it would limit our application to only having one instance per server instance

    JNDI is pretty complex for a non-technical person to configure, especially in App servers that don't have a web-based configuration front end.

    And the database is out because the configuration includes what database to connect to!

    Anyone have any further ideas?


  2. Hi Chris,

    You could choose to define the location of the property file as URL resource in JNDI. This way you are freed of the consistent file location.
    Here is maybe an interesting article about managing environment specific properties in an AppServer