Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Declined
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
We have a connection pool in Java and would like to use the same for our complete project where code is mixture of Clojure/Java.
(def db (ConnectionManager/getConnection)) ; #<ConnectionHandle com.jolbox.bonecp.ConnectionHandle@53371566> connection type we get after excuting this line
sql/with-connection db
(sql/with-query-results res ["select * from DummyTable where rownum <=100"] (vec res)
(map #(println (class (val %)) " " (key %)) (first res))
)
)
If we execute the above (with connection - with-query results) i get the following exception
IllegalArgumentException db-spec com.jolbox.bonecp.ConnectionHandle@53371566 is missing a required parameter clojure.java.jdbc/get-connection (jdbc.clj:192)