Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Design for Option #1: Property file based configuration

List and describe new manager methods, Struts actions, JSP pages, macros, etcWe'll implement option #1.

First an overview. We'll change Roller so that it's database configuration comes from the Roller properties file and we'll have table auto creation/upgrade.

Roller will operate in two modes, controlled by the 'installation.type' property. In production systems, 'installation.type' should be set to 'manual' to ensure that we never show an revealing database error page or "would you like to upgrade" tables page in production.

At installation time, users can choose turn on auto-install by setting 'installation.type=auto'. In this mode, Roller will give . Users are encouraged to use Roller auto-install because auto-install will give them informative error messages when the database setup fails, it will create the Roller tables automatically and it will even upgrade them if they need upgrade.

Users with special needs, i.e. very large sites, upgrading from pre 1.2 Roller, customized data models, can choose not use auto-install. By setting 'installation.type=manual' they can choose to do upgrades the old way, running scripts by hand.

To install Roller with auto-install these are the steps:

...

STEP 3 - Deploy roller.war to your Servlet container and browse to context URI. If there is a database connection error, you'll see details in the browser. If tables need creation or upgrade, Roller will do it automatically for you on your commant.
Users with special needs (i.e. very large sites, upgrading from pre 1.2 Roller, customized data models) can choose not use auto-install – they should do upgrades the old way, running scripts by hand.

Here are the specific changes to be made to enable property based installation/configuration:

...