Subject | Re: [Firebird-Java] FBManagedConnection |
---|---|
Author | David Jencks |
Post date | 2002-09-28T19:26:31Z |
I made several changes that I think will fix this problem. I would
appreciate it if you can try the driver from cvs and see if this problem is
fixed. If this and the serialization problems are fixed I will release a
new binary RC2 in a few days.
Thanks
david jencks
appreciate it if you can try the driver from cvs and see if this problem is
fixed. If this and the serialization problems are fixed I will release a
new binary RC2 in a few days.
Thanks
david jencks
On 2002.09.27 01:02:25 -0400 Stefan Mühlemann wrote:
> Hello,
>
> i had the problem, when i used built in pooling and had no active
> connection, after idletimeout was gone the connection was not returned
> properly to firebird.
> FBWrappingDataSource returned connection and created a new one because
> minSize of pooling was 1.
> But the connection was not returned to firebird. So after a while it
> ended up eating all my resources of firebird (many, many open
> connections).
>
> The code i think is the problem (from FBManagedConnection.destroy()):
> if (currentDbHandle != null) {
> try {
> // if (log!=null) log.debug("in
> ManagedConnection.destroy",new Exception());
> mcf.releaseDbHandle(currentDbHandle, cri);
> }
> catch (GDSException ge) {
> System.out.println(getClass().getName() + " / Can't
> detach from db: " + ge.toString());
> throw new ResourceException("Can't detach from db: " +
> ge.toString());
> }
> finally {
> currentDbHandle = null;
> }
> }
>
> If currentDbHandle is null nothing happends to this open connection.
> I changed it to:
> if (currentDbHandle == null) {
> try {
> currentDbHandle = getIscDBHandle();
> }
> catch (XAException xae) {
> System.out.println(getClass().getName() + " /
> XAException " + xae.getMessage());
> }
> }
> if (currentDbHandle != null) {
> try {
> // if (log!=null) log.debug("in
> ManagedConnection.destroy",new Exception());
> .....
>
> What do you think.
> Did i do something wrong before reaching this? I do not understand wher
> this currentDbHandle is set, so maybe the problem is somewhere else....
>
> Greetings
>
> Stefan Mühlemann
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>