<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 17:16:29 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/JDBC-36/JDBC-36.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[JDBC-36] using exisiting java based connection pool in clojure</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-36</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;(def db (ConnectionManager/getConnection)) ; #&amp;lt;ConnectionHandle com.jolbox.bonecp.ConnectionHandle@53371566&amp;gt; connection type we get after excuting this line&lt;br/&gt;
sql/with-connection db&lt;br/&gt;
    (sql/with-query-results res &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;select * from DummyTable where rownum &amp;lt;=100&amp;quot;&amp;#93;&lt;/span&gt; (vec res)&lt;br/&gt;
      (map #(println  (class (val %)) &quot;  &quot; (key %)) (first res))&lt;br/&gt;
      )&lt;br/&gt;
    )&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15589">JDBC-36</key>
            <summary>using exisiting java based connection pool in clojure</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="4m1r">Amir</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jul 2012 02:57:50 -0500</created>
                <updated>Sun, 12 Aug 2012 21:36:24 -0500</updated>
                    <resolved>Sun, 12 Aug 2012 21:36:24 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29034" author="4m1r" created="Tue, 24 Jul 2012 03:00:23 -0500"  >&lt;p&gt;If we execute the above (with connection - with-query results) i get the following exception&lt;/p&gt;

&lt;p&gt;IllegalArgumentException db-spec com.jolbox.bonecp.ConnectionHandle@53371566 is missing a required parameter  clojure.java.jdbc/get-connection (jdbc.clj:192)&lt;/p&gt;</comment>
                    <comment id="29037" author="seancorfield" created="Tue, 24 Jul 2012 12:34:24 -0500"  >&lt;p&gt;Use the :datasource option to define your db-spec:&lt;/p&gt;

&lt;p&gt;(def db {:datasource bonecpDataSourceObject})&lt;/p&gt;

&lt;p&gt;I looked at the BoneCP docs and I don&apos;t see a ConnectionManager class but if you define the db-spec based on the BoneCPDataSource object, java.jdbc will call getConnection on that object to get a working connection for operations.&lt;/p&gt;</comment>
                    <comment id="29068" author="seancorfield" created="Tue, 31 Jul 2012 19:49:17 -0500"  >&lt;p&gt;Amir, have you had a chance to try my suggestion?&lt;/p&gt;</comment>
                    <comment id="29070" author="4m1r" created="Wed, 1 Aug 2012 02:20:22 -0500"  >&lt;p&gt;Hi Sean,&lt;/p&gt;

&lt;p&gt;No, we moved to clojure based pooling in a while. We thought its better to have all stuff in clojure rather than having java+clojure. But i can give it a try today.&lt;/p&gt;

&lt;p&gt;Thanks for your suggestion. will keep you posted.&lt;/p&gt;

</comment>
                    <comment id="29122" author="seancorfield" created="Sun, 12 Aug 2012 21:35:03 -0500"  >&lt;p&gt;I&apos;ll close this out then Amir, thanx.&lt;/p&gt;</comment>
                    <comment id="29123" author="seancorfield" created="Sun, 12 Aug 2012 21:36:24 -0500"  >&lt;p&gt;I believe there is a way to access the the BoneCP connection pool directly and use it with java.jdbc as-is, however it is no longer an issue for the creator of this ticket.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>