Re: JDBC gripe list - Mailing list pgsql-jdbc

From Vitalii Tymchyshyn
Subject Re: JDBC gripe list
Date
Msg-id 4D91ECD5.6010109@gmail.com
Whole thread Raw
In response to Re: JDBC gripe list  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: JDBC gripe list
List pgsql-jdbc
29.03.11 17:11, Kevin Grittner написав(ла):
> Vitalii Tymchyshyn<tivv00@gmail.com>  wrote:
>
>> Please note that you will get into problems with classloaders and
>> different containers. E.g. running a thread from classloader will
>> prevent this classloader to be GCd.
>
> Would this be a problem if closing the last open connection in the
> driver instance caused a call to Timer.cancel()?
I think this may help. There are a lot of tricks and confusion with
classloaders and I am not an expert in it.
Some more things to check are:
1) Thread creation may be prohibited by SecurityManager. I'd expect J2EE
containers prohibit such a thing since EJBs are prohibited to create
it's own threads.
2) Postgresql driver may be located in "global" classloader, but used
from "local" one. I am not sure, which classloader will new thread
receive. If it will be "local" one, this will mean global driver will
hold reference to classloader (application) from which it were used for
the first time. "Clever" container may kill such a thread when
application is shut down.

Best regards, Vitalii Tymchyshyn


pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: JDBC gripe list
Next
From: "MauMau"
Date:
Subject: Re: JDBC gripe list