Subject | Re: Connections will not close. |
---|---|
Author | rrokytskyy |
Post date | 2002-08-19T13:51:27Z |
Hi,
code for close() method:
public synchronized void close() {
if (mc != null) {
mc.close(this);
mc = null;
}
}
code for isClosed() method:
public boolean isClosed() {
return mc == null;
}
So, I hardly see any possibility that isClosed() returns false after
close() is called except:
a) close() is invoked on one instance and isClosed() on another;
b) there was runtime exception in mc.close(this).
Sorry, maybe I miss something, but from my experience, after calling
close() I am able to physically delete database. This means that
connection is really closed, otherwise Firebird would prevent it.
Best regards,
Roman Rokytskyy
code for close() method:
public synchronized void close() {
if (mc != null) {
mc.close(this);
mc = null;
}
}
code for isClosed() method:
public boolean isClosed() {
return mc == null;
}
So, I hardly see any possibility that isClosed() returns false after
close() is called except:
a) close() is invoked on one instance and isClosed() on another;
b) there was runtime exception in mc.close(this).
Sorry, maybe I miss something, but from my experience, after calling
close() I am able to physically delete database. This means that
connection is really closed, otherwise Firebird would prevent it.
Best regards,
Roman Rokytskyy
--- In Firebird-Java@y..., "Claus Holst" <claus@b...> wrote:
> Hi,
>
> After I have closed all my connections, something is still hanging
between
> java and Firebird.
>
> I got a hint that something is wrong:
>
> After connection.close() I have tried to run connection.isClosed(),
and it
> returns false !
>
> There is no exception thrown.
>
> I have also tried to check for warnings (connection.getWarnings())
but there
> is none.
>
>
> I am not using autoCommit and I am (almost) sure I do not have any
pending
> transactions (how can i check that ?).
>
> Do any of you have a clue, what would make a connection refuse to
close ?
>
> Regards,
> /Claus
>
> ________________________
>
> b-team ApS
> Udviklingsparken Århus
> Sønderhøj 46
> DK8260 Viby J
> Tlf. 87345618
> Fax. 87345566
> www.b-team.dk