Configuring Properties in 2.2

Glenn Golden

The file that was in kernel and now is in component/component-api/ component/src/config... is for the OOTB settings that are absolutely required to be set. Most if not all settings should NOT be required to be set anywhere.

Anything that is a bean should have their settings from the bean registration, which can be overridden in the sakai.properties files. So the default can be set in the components.xml file for the bean's (i.e. component implementation) pack. This code gets its values injected, so need not worry about finding these values from the ServerConfigurationService. This code should also default any of these configuration values to something reasonable in the code (that matches the defaults in the components.xml, just in case the xml file is modified and these are left out).

Anything that is not a bean (i.e. a tool) can look to the ServerConfigService to read configuration values. But this code should default to reasonable values if nothing is found. That means you don't need to put anything into the OOTB sakai.properties.

The only values that really must be in the sakai.properties file that is found OOTB are those that are placeholder values used in other bean settings, such as auto.ddl and hibernate.dialect. Other values that are good to have in here are those used in many places in the code, where there's no one good place to provide good defaults.

Values set as an example can be set in the docs sakai.properties, which is really just documentation.

The demo sakai.properties is used for the demo configuration, so any values that are just for the demo can be put in there.

If you have a value you would like to include in the OOTB sakai.properties, please email me and we can decide if they really need to go in there.

Glenn Golden

Remember, when you start running Sakai 2.2 with a sakai.properties file, as previously documented, you must update your properties because of the new API names.

For example, this line:

vendor@org.sakaiproject.service.framework.sql.SqlService=oracle

needs to be:

vendor@org.sakaiproject.db.api.SqlService=oracle

because the SqlService API name is changed.

Pretty much any setting of the form

name@bean-id=value

needs to be checked and updated.

For the rest of the database settings:

javax.sql.DataSource

has not changed name, so lines like this:

driverClassName@javax.sql.DataSource=oracle.jdbc.driver.OracleDriver
url@javax.sql.DataSource=jdbc:oracle:thin:@blah.blah.blah
username@javax.sql.DataSource=xxx
password@javax.sql.DataSource=xxx
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL

are ok.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.