...
Here are the specific changes to be made to enable property based installation/configuration:
Change #1: New properties -
...
COMMITTED
database.installation = (auto|manual): if auto, Roller will prompt to create/upgrade tables
...
mail.connectionType = (jndi|properties) - choose either JNDI or properties for mail session
mail.jndiName - JNDI name to be used for mail-session if type is 'jndi'
mail.hostname: Host name of mail server to be used if type is 'properties'
mail.username: Username for mail server to be used if type is 'properties'
mail.password: Password for mail server to be used if type is 'properties'
Change #2: Change implementations of the Roller interface -
...
COMMITTED
When creating persistence strategy, we rely on a DatabaseProvider class with this logic:
- If JDBC connection properties present, use them
- Else use JNDI data-source
Change #3: Change mail sending code - COMMITTED
When creating mail-session - DONE
- Create new 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 -
...
COMMITTED
- Change contextInitialized() so that it initializes only the UI portions of Roller
- Move RollerImpl initialization into RollerImpl classes
- Change contextInitialized() so that it does not throw exceptions
- We want context to load regardless of Roller configuration
...