getrailo/railo — pull request #51 by dev-21solutions (2012-09-16 07:27:00+00:00)
Title: modified H2.cfc

please consider the following update which solves JIRA ticket https://issues.jboss.org/browse/RAILO-2006

changed the connection string format to allow for the different options listed at http://www.h2database.com/html/features.html#database_url :

jdbc:h2:{protocol}{host}{path}{database}{additional}

removed the Mode as it can be added in {additional} if the user chooses to do so.

**a few issues with this update**

1) the main problem is that when I click Edit in the admin (to update an existing datasource) the radio option for the _protocol_ is not preserved, but it looks like the Mode was not preserved either in the current implementation.

2) users who already have a datasource for H2 will see JDBC - Other as the connection string (aka dsn) has changed.

3) the host value should only be used in Server mode, i.e. with TCP or SSL protocol. the cf-driver ignores the value correctly for other protocols, but I can't change the description just for it as modifying languages/en.xml:settings.dbhostdesc will affect all drivers

I can, however, change it to custom_host or something like that and add description there if this seems to be a major issue.

let me know what you think,

Igal