Versions Compared

Key

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

...

Change #1: New properties

database.installation = auto: if auto, Roller will prompt to create/upgrade tables

jdbc.driverClass: JDBC driver class, if not present then Roller will use JNDI mail-session
jdbc.connectionURL: JDBC connection string, only used if jdbc.driverClass specified
jdbc.username: JDBC username, only used if jdbc.driverClass specified
jdbc.password: JDBC password, only used if jdbc.driverClass specified

mail.hostname: Host name of mail server for email notification features, if not present then Roller will fall back to use JNDI mail-session mail.
installation.auto: True to enable automatic creation and upgrade of database tables.
JDBC properties: We've already got JDBC connection properties in roller.properties, we just need to make small changes to how we use them.username: Username for mail server, only used if mail.hostname specified
mail.password: Password for mail server, only used if mail.hostname specified

Change #2: Change implementations of the Roller interface (Hibernate and JPA backends)

...

  • If JDBC connection properties present, use them
    • Save errors in Servlet context attributes so we can show them later
  • Else use JNDI data-source
    • Save errors in Servlet context attributes so we can show them later

Change #3: Change mail sending code

When creating mail-session

  • Use MailProvider class to get mail-session, provider will use this logic:
    • If mail-host property is present, use it
    • Else use JNDI mail-session

Change #4: Change RollerContext initialization

...