src/main/kotlin/de/uapcore/lightpit/DataSourceProvider.kt

changeset 167
3f30adba1c63
parent 158
4f912cd42876
child 180
009700915269
equal deleted inserted replaced
166:6eede6088d41 167:3f30adba1c63
126 126
127 override fun contextInitialized(sce: ServletContextEvent?) { 127 override fun contextInitialized(sce: ServletContextEvent?) {
128 val sc = sce!!.servletContext 128 val sc = sce!!.servletContext
129 129
130 val dbSchema = sc.getInitParameter(Constants.CTX_ATTR_DB_SCHEMA) ?: DB_DEFAULT_SCHEMA 130 val dbSchema = sc.getInitParameter(Constants.CTX_ATTR_DB_SCHEMA) ?: DB_DEFAULT_SCHEMA
131 sc.getInitParameter(Constants.CTX_ATTR_DB_DIALECT)?.let {dbDialect -> 131 sc.getInitParameter(Constants.CTX_ATTR_DB_DIALECT)?.let { dbDialect ->
132 try { 132 try {
133 dialect = Dialect.valueOf(dbDialect) 133 dialect = Dialect.valueOf(dbDialect)
134 } catch (ex: IllegalArgumentException) { 134 } catch (ex: IllegalArgumentException) {
135 logger().error( 135 logger().error(
136 "Unknown or unsupported database dialect {}. Defaulting to {}.", 136 "Unknown or unsupported database dialect {}. Defaulting to {}.",

mercurial