We are using the latest v3.1 (JDBC2.0 or JDBC3.0) with ColdFusion8. How do you force a disconnect from the datasource. Is there a JDBC connection string parameter that will ensure that a connection is NOT maintained across queries. We need this because the DB files can be deleted and re-created on the fly by another application, but the cannot be deleted if our app still has a connection open. Thanks.
|
>Is there a JDBC connection string parameter that will ensure that a connection
>is NOT maintained across queries.
If you're using remote connection, you can use maxIdleTime connection property. But I guess that you're using embedded connection. You should call ResultSet.close or Statement.close, or Connection.close to release all unused resouce, otherwise, you need to wait the System.gc run.
>We need this because the DB files can be deleted and re-created on the fly by
>another application, but the cannot be deleted if our app still has a
>connection open.
First, "drop table..." sql can remove an unused db. Secondly, try delayedClose=-1 at here can help you to release an uused db on the fly.
|