If this SQL object was created with a Connection then this method closes the connection. If this SQL object was created from a DataSource then this method only frees any cached objects (statements in particular).
()
| 3905 | * this method only frees any cached objects (statements in particular). |
| 3906 | */ |
| 3907 | @Override |
| 3908 | public void close() { |
| 3909 | namedParamSqlCache.clear(); |
| 3910 | namedParamIndexPropCache.clear(); |
| 3911 | clearStatementCache(); |
| 3912 | if (useConnection != null) { |
| 3913 | try { |
| 3914 | useConnection.close(); |
| 3915 | } catch (SQLException e) { |
| 3916 | LOG.finest("Caught exception closing connection: " + e.getMessage()); |
| 3917 | } |
| 3918 | } |
| 3919 | } |
| 3920 | |
| 3921 | /** |
| 3922 | * Returns the {@link DataSource} backing this instance. |
nothing calls this directly
no test coverage detected