Re: JDBC gripe list

From: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Dave Cramer <pg(at)fastcrypt(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC gripe list
Date: 2011-03-29 14:29:41
Message-ID: 4D91ECD5.6010109@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

29.03.11 17:11, Kevin Grittner написав(ла):
> Vitalii Tymchyshyn<tivv00(at)gmail(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message MauMau 2011-03-29 15:21:58 Re: JDBC gripe list
Previous Message Kevin Grittner 2011-03-29 14:11:46 Re: JDBC gripe list