Versions Compared

Key

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

...

List and describe new manager methods, Struts actions, JSP pages, macros, etc.

First an overview. 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. To install Roller with auto-install these are the steps:

0) Prerequisites: Java 5, Roller supported database, Servlet 2.4 container and JDBC driver jar in Servlet container's classpath.

1) Create a database and a database user account with full privileges in that database.

2) Create a roller-custom.properties file in Servlet container's classpath with the auto install option and your database connection parameters. For example:

{{
installation.type=auto
database.configurationType=jdbc
database.jdbc.driverClass=com.mysql.jdbc.Driver
database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollertest
database.jdbc.username=scott
database.jdbc.password=tiger
}}

3) Deploy roller.war to your Servlet container and browse to context URI.

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:

...

Change #5: Change PersistenceSessionFilter to check database configuration

This logic is executed ONLY if auto-install is enabled.

  • If DB connection fails
    • If installation.auto, show error page to explain what went wrong and how to fix it
    • Else, show simple error/maintenance page
  • If DB does not have tables
    • If installation.auto, show table creation page/action
    • Else, show simple error/maintenance page
  • If DB is older version
    • If installation.auto, show database upgrade page/action
    • Run database upgrade scripts and do upgradeDatabaseIfNeeded logic
    • Else, show simple error/maintenance page

...