Use JDNI for configuring database connections in production environments (1)
Currently, the MySQL JDBC driver, connection settings and authentication credentials are stored inside the generated WAR file archive. This has a number of drawbacks, especially in production environments:
- A rebuild of the WAR is required in case of a change, such as username/password
- Including privacy sensitive data, such as passwords, may be insecure
- It gives a potential license conflict; WebDSL is LGPL licensed, but the MySQL JDBC driver is GPL-only. Including a MySQL driver in an application like this, very likely makes it derived work; therefore the resulting WAR is GPL licensed.
By implementing JDNI support, we separate the database connection configuration from the WebDSL application itself. So WebDSL can use any JDBC connection (including other databases) which solves the issue with licensing, as MySQL is no longer a hard dependency but an option.Submitted by Sander van der Burg on 18 July 2011 at 14:37