On Jan 20, 2009, at 6:16 PM, Juergen Gmeiner wrote:

I've been using clojure for prototyping in JBoss and I found that
clojure.contrib.sql does not currently support opening JDBC
connections
via a javax.sql.DataSource.

So I propose the patch below.

Hi Juergen,

I'd like for clojure.contrib.sql to support DataSource. As an alternative implementation, what do you think of db-spec allowing a :datasource key. If :datasource is specified, with-connection could use its value to acquire the connection, possibly along with :username and :password if they are specified. If not, it would connect using the jdbc URL parts as it does now.

I think it makes sense to prefer :datasource if it's present because according to recent jdbc docs, DataSource is preferred over DriverManager as a way of acquiring a connection.

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to