Can I close statements in a transaction before committing it in Derby (JDBC)?
<p>Basically I have (ignoring exception handling, etc.):</p>

<pre><code>connection.setAutoCommit(false);

Statement statement1 = connection.createStatement();
statement1.executeUpdate("...");
statement1.close();

Statement statement2 = connection.createStatement();
statement2.executeUpdate("...");
statement2.close();

connection.commit();
</code></pre>

<p>If I understand correctly it shouldn't have any impact because all it really does is free the resources for the GC. <a href="http://db.apache.org/derby/manuals/develop/develop63.html" rel="nofollow">Especially with Derby</a>: You should explicitly close Statements, ResultSets, and Connections when you no longer need them. Connections to Derby are resources external to an application, and the garbage collector will not close them automatically.</p>

<p>However will it cause any issues with the transaction? I don't believe the transaction relies on the Statement. Can anyone please confirm this?</p>
