Re: Where to find all open DB connections and closes them
"Frank Schoenheit, Sun Microsystems Germany" <[email protected]> Thu, 01 Jul 2010 13:56:01 +0200
| Newsgroups | gmane.comp.openoffice.dba.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Fernand,
> When opening a DatasourceBrowser with the dispatcher using
> loadComponentFromURL(".component:DB/DataSourceBrowser", "_beamer", 0,
> aProps)
> I have a connection opened with the database server.
>
> How can i find this "opened" connection and close it with the API ?
>
> I tried and found a "activeConnection" on the derivided rowset
>
> "orowset.activeconnection.dispose"
> or
> "orowset.activeConnection.close"
> does nothing the connection stays open on the server site, only closing
> OO closes this connection
Since you say in your other mail that disabling connection pooling
doesn't change the behavior, I can't think of any legitimate reason for
keeping the connection open - so, it sounds like a bug.
And yet more, there's no chance to iterate over opened connections, and
forcefully close them (as this would ... irritate a lot of other
components). Sorry to say.
Interesting question would be whether this also happens with MySQL over
JDBC, for instance. (One reason why this is interesting is because the
JDBC driver has built-in logging capabilities, see
http://wiki.services.openoffice.org/wiki/Logging_JDBC_Activity.)
Ciao
Frank
--
ORACLE
Frank Schönheit | Software Engineer | [email protected]