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 {}.", |