<!--
RSS generated by JIRA (4.4#649-r158309) at Sat May 18 08:02:32 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/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+JDBC+AND+updated%3E%3D-1w+ORDER+BY+updated+DESC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+JDBC+AND+updated%3E%3D-1w+ORDER+BY+updated+DESC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="4" total="4"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[JDBC-56] Problem with find-connection when using agents with c3p0 connection pool</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-56</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I use an agent to offload email processing and update a db on completion. If I use a c3p0 connection pool, I get an exception and a complaint that the connection isn&apos;t open (see stacktrace). The code works if I wrap the agent fn in a clojure.java.jdbc/with-connection and get a connection from the pool in the agent thread.&lt;/p&gt;

&lt;p&gt;The in jdbc.clj, the find-connection (db-find-connection in HEAD) checks for an existing connection and tries to use it without checking if it&apos;s open. This causes an exception with a c3p0 connection that was acquired in another thread.&lt;/p&gt;

&lt;p&gt;Here&apos;s the stacktrace I&apos;m seeing (note the &quot;You can&apos;t operate on a closed Connection!!!&quot;):&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;2013-05-16 10:32:22,208 [clojure-agent-send-off-pool-7] DEBUG com.mchange.v2.sql.SqlUtils - Converting Throwable to SQLException...
java.lang.NullPointerException
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:186)
	at clojure.java.jdbc$prepare_statement.doInvoke(jdbc.clj:450)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:621)
	at clojure.java.jdbc$with_query_results_STAR_.invoke(jdbc.clj:646)
	at clj_record.core$find_by_sql$func__3362__auto____3378.invoke(core.clj:72)
	at clj_record.core$find_by_sql.invoke(core.clj:71)
	at clj_record.core$find_records.invoke(core.clj:85)
	at clj_record.core$find_record.invoke(core.clj:91)
	at neataudio.domain.interview_participant_relationship$find_record.invoke(interview_participant_relationship.clj:18)
	at neataudio.domain.interview_participant_relationship$update_email_status.invoke(interview_participant_relationship.clj:37)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115$fn__5116.invoke(participant_controller.clj:104)
	at clojure.java.jdbc$transaction_STAR_$fn__3162.invoke(jdbc.clj:372)
	at clojure.java.jdbc$transaction_STAR_.invoke(jdbc.clj:371)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113.invoke(participant_controller.clj:101)
	at clojure.lang.AFn.applyToHelper(AFn.java:185)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at clojure.core$apply.invoke(core.clj:623)
	at clojure.core$binding_conveyor_fn$fn__4115.doInvoke(core.clj:1848)
	at clojure.lang.RestFn.applyTo(RestFn.java:146)
	at clojure.lang.Agent$Action.doRun(Agent.java:114)
	at clojure.lang.Agent$Action.run(Agent.java:163)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:680)
java.sql.SQLException: You can&apos;t operate on a closed Connection!!!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:222)
	at clojure.java.jdbc$prepare_statement.doInvoke(jdbc.clj:450)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:621)
	at clojure.java.jdbc$with_query_results_STAR_.invoke(jdbc.clj:646)
	at clj_record.core$find_by_sql$func__3362__auto____3378.invoke(core.clj:72)
	at clj_record.core$find_by_sql.invoke(core.clj:71)
	at clj_record.core$find_records.invoke(core.clj:85)
	at clj_record.core$find_record.invoke(core.clj:91)
	at neataudio.domain.interview_participant_relationship$find_record.invoke(interview_participant_relationship.clj:18)
	at neataudio.domain.interview_participant_relationship$update_email_status.invoke(interview_participant_relationship.clj:37)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115$fn__5116.invoke(participant_controller.clj:104)
	at clojure.java.jdbc$transaction_STAR_$fn__3162.invoke(jdbc.clj:372)
	at clojure.java.jdbc$transaction_STAR_.invoke(jdbc.clj:371)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113.invoke(participant_controller.clj:101)
	at clojure.lang.AFn.applyToHelper(AFn.java:185)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at clojure.core$apply.invoke(core.clj:623)
	at clojure.core$binding_conveyor_fn$fn__4115.doInvoke(core.clj:1848)
	at clojure.lang.RestFn.applyTo(RestFn.java:146)
	at clojure.lang.Agent$Action.doRun(Agent.java:114)
	at clojure.lang.Agent$Action.run(Agent.java:163)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:186)
	... 28 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OS X 10.8.3&lt;br/&gt;
Java 1.6.0_45&lt;br/&gt;
Clojure 1.5&lt;br/&gt;
c3p0 0.9.1.2&lt;br/&gt;
java.jdbc 0.2.1 (the problem also seems to be there in HEAD at the time of logging this)</environment>
            <key id="16188">JDBC-56</key>
            <summary>Problem with find-connection when using agents with c3p0 connection pool</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="edoloughlin">Ed O&apos;Loughlin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 May 2013 04:43:42 -0500</created>
                <updated>Thu, 16 May 2013 04:50:41 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31093" author="edoloughlin" created="Thu, 16 May 2013 04:50:41 -0500"  >&lt;p&gt;Apologies: this is a crappy bug report. I&apos;m under a bit of pressure at the moment so I can&apos;t make a test case.&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>

<item>
            <title>[JDBC-55] More reflection warnings to investigate</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-55</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Reflection warning, clojure/java/jdbc.clj:618:50 - reference to field executeQuery can&apos;t be resolved.&lt;br/&gt;
Reflection warning, clojure/java/jdbc.clj:618:33 - reference to field close can&apos;t be resolved.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16187">JDBC-55</key>
            <summary>More reflection warnings to investigate</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 May 2013 20:04:54 -0500</created>
                <updated>Wed, 15 May 2013 10:34:01 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31092" author="jafingerhut" created="Wed, 15 May 2013 10:34:01 -0500"  >&lt;p&gt;Patch jdbc-55-fix-reflection-warnings-v1.txt dated May 15 2013 adds one more type hint that eliminates the two mentioned instances of reflection.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11992" name="jdbc-55-fix-reflection-warnings-v1.txt" size="1086" author="jafingerhut" created="Wed, 15 May 2013 10:34:01 -0500" />
                </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>

<item>
            <title>[JDBC-46] A mechanism for reading specialized types from result sets could be useful</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-46</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I had this idea when trying to adapt Korma to use with postgres tables with columns of array types. I had some success using Korma&apos;s transform functions to convert the java.sql.Array objects into a seq on the way out, but recent changes to Korma seem to indicate that the transform functions are not guaranteed to run before the connection is closed. This interferes with efforts to read the arrays, which I think can be their own result sets.&lt;/p&gt;

&lt;p&gt;Presumably korma could be changed to support reading the arrays on the way out, but maybe being able to customize the read behavior within c.j.jdbc would be simpler.&lt;/p&gt;

&lt;p&gt;The first idea I&apos;ve had toward this end is to create a protocol with a single function that objects being read out of the resultset get passed through. It would default to the identity function, but users could e.g. extend it to java.sql.Array. I don&apos;t know if there are significant performance implications for an extra function call for each value coming out of the database.&lt;/p&gt;

&lt;p&gt;I&apos;ll have a patch in this vein attached shortly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15975">JDBC-46</key>
            <summary>A mechanism for reading specialized types from result sets could be useful</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="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Jan 2013 09:23:06 -0600</created>
                <updated>Wed, 15 May 2013 09:52:03 -0500</updated>
                    <resolved>Fri, 19 Apr 2013 21:34:49 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30472" author="gfredericks" created="Wed, 23 Jan 2013 10:26:21 -0600"  >&lt;p&gt;Attached patch. Is there any straightforward way to test this? Or a place it should be documented?&lt;/p&gt;</comment>
                    <comment id="30473" author="seancorfield" created="Wed, 23 Jan 2013 10:48:27 -0600"  >&lt;p&gt;Docs: just needs good docstring since the clojure.github.com site is auto-generated from those (although it is still triggered manually it seems).&lt;/p&gt;

&lt;p&gt;Test: mvn test&lt;/p&gt;

&lt;p&gt;I have Derby, HSQLDB, MySQL, MS SQL Server (two drivers), MySQL. I don&apos;t have Postgres to test against. By default mvn test only tries Derby, HSQLDB and SQLite. TEST_DBS=... mvn test will test more.&lt;/p&gt;</comment>
                    <comment id="30474" author="seancorfield" created="Wed, 23 Jan 2013 10:49:43 -0600"  >&lt;p&gt;Would be nice to have a test with a custom conversion, mapping any String to some constant perhaps? Perhaps a separate test ns that is required and tested from test_jdbc.clj?&lt;/p&gt;</comment>
                    <comment id="30475" author="gfredericks" created="Wed, 23 Jan 2013 14:38:59 -0600"  >&lt;p&gt;Oh, we have to be careful with testing because I believe any extensions to the protocol are going to be effective for all the remaining tests, right?&lt;/p&gt;</comment>
                    <comment id="30476" author="gfredericks" created="Wed, 23 Jan 2013 15:53:25 -0600"  >&lt;p&gt;Attached new patch with docstrings and a test. I&apos;ve only run the tests with MySQL. Let me know if there&apos;s anything else I can do.&lt;/p&gt;</comment>
                    <comment id="30507" author="gfredericks" created="Tue, 29 Jan 2013 16:37:21 -0600"  >&lt;p&gt;This patch recently came in handy in an different situation, when jdbc was returning Integers instead of Longs, we had a really clean spot to do the conversion.&lt;/p&gt;</comment>
                    <comment id="30899" author="seancorfield" created="Sun, 7 Apr 2013 03:44:18 -0500"  >&lt;p&gt;There have been a lot of code changes since you submitted the patch and right now the patch doesn&apos;t apply. Can you re-submit the patch against the latest master branch so I can try again? Thanx!&lt;/p&gt;</comment>
                    <comment id="30933" author="gfredericks" created="Thu, 11 Apr 2013 21:32:21 -0500"  >&lt;p&gt;I&apos;m getting 3 test failures on master currently (with a basic &lt;tt&gt;mvn test&lt;/tt&gt;), and after applying this new patch (p3) I still get 3 failures. So hopefully that means I didn&apos;t break anything.&lt;/p&gt;</comment>
                    <comment id="30978" author="seancorfield" created="Fri, 19 Apr 2013 21:34:49 -0500"  >&lt;p&gt;Applied. Will be in 0.3.0-alpha2&lt;/p&gt;</comment>
                    <comment id="31091" author="gfredericks" created="Wed, 15 May 2013 09:52:03 -0500"  >&lt;p&gt;I&apos;m thinking this feature is no longer necessary due to the :row-fn option &amp;#8211; since the only motivation in the first place was to have the opportunity to transform a result before the connection closes.&lt;/p&gt;

&lt;p&gt;There would still be no easy way to do it from Korma, but that&apos;s Korma&apos;s fault. So maybe we should remove this before 0.3.0 is released?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11812" name="JDBC-46-p1.patch" size="1923" author="gfredericks" created="Wed, 23 Jan 2013 10:26:21 -0600" />
                    <attachment id="11813" name="JDBC-46-p2.patch" size="3560" author="gfredericks" created="Wed, 23 Jan 2013 15:53:25 -0600" />
                    <attachment id="11953" name="JDBC-46-p3.patch" size="3549" author="gfredericks" created="Thu, 11 Apr 2013 21:32:21 -0500" />
                </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>

<item>
            <title>[JDBC-53] create-table &amp; drop-table doesn&apos;t honor naming strategy</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-53</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;create-table &amp;amp; drop-table doesn&apos;t take the current naming strategy into account.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16156">JDBC-53</key>
            <summary>create-table &amp; drop-table doesn&apos;t honor naming strategy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="r0man">Roman Scherer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Apr 2013 08:47:12 -0500</created>
                <updated>Sun, 12 May 2013 20:56:38 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30987" author="seancorfield" created="Wed, 24 Apr 2013 11:08:25 -0500"  >&lt;p&gt;Just to note: the naming strategy stuff, based on dynamically bound globals, is all deprecated in 0.3.0. Alternatives to create-table and drop-table, which respect the new entities function approach, will be provided in an upcoming alpha build of 0.3.0.&lt;/p&gt;</comment>
                    <comment id="31084" author="davidj" created="Sat, 11 May 2013 20:51:07 -0500"  >&lt;p&gt;Any update on this? I noticed the deprecations while reading the code. Could you say a few words or add a few docs on the 0.3 way of doing naming strategies?&lt;/p&gt;</comment>
                    <comment id="31085" author="seancorfield" created="Sat, 11 May 2013 23:20:08 -0500"  >&lt;p&gt;The replacement is entities and identifiers (as keyword arguments in java.jdbc functions and as macros in java.jdbc.sql). You can see some examples here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://clojure.github.io/java.jdbc/doc/clojure/java/jdbc/NameMapping.html&quot;&gt;http://clojure.github.io/java.jdbc/doc/clojure/java/jdbc/NameMapping.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Replacements for create-table / drop-table will be added before beta1. I&apos;m not sure right now how many more alphas we&apos;ll have. There&apos;s a lot of churn in the code right now and I want it to be feature complete and fairly settled before the first beta.&lt;/p&gt;</comment>
                    <comment id="31086" author="moquist" created="Sun, 12 May 2013 20:56:38 -0500"  >&lt;p&gt;Thanks for the update; looking forward to it!&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>