Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A03DC1337B68 for ; Tue, 29 Mar 2011 11:30:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 91968-03 for ; Tue, 29 Mar 2011 14:30:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id B8B8C1337B47 for ; Tue, 29 Mar 2011 11:30:22 -0300 (ADT) Received: by bwz15 with SMTP id 15so220268bwz.19 for ; Tue, 29 Mar 2011 07:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=VNg00i35e09ZWnS1stmUgw5LZC5hIVtlup3UKDi0rio=; b=w0YMXpiPl10v0/2fC19JwPRCeByWMmuKNRI5yFgUsnewYwtv1E3Irjj9LqBS0mCDzl RKqrx217+HAyonhR0h1rnFfFVERdfTHryV7yW7Ysc2pYcUZONz+AyqIBfHuf4xwzQt5U sv67RAetONhm6UXBvr1VEY5FKgw7OjNWp2zAI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=iqM7yDHFXEUv4CX3MWR06WEp/zWIyunZ0mp7YTySBmNSis1nnJJ6aTi7RSNcOPxRKi SctxaE76mXkmaMkOrPTEyORMZUgJjZ+LKBNDGquZl2kugPVDKWQsy5AYZhmSr/hNUZhx pbyQ1IPB1CKPbqJQNWnhytY0vgdR8DeOyF7Ag= Received: by 10.204.20.134 with SMTP id f6mr4822885bkb.165.1301408984536; Tue, 29 Mar 2011 07:29:44 -0700 (PDT) Received: from [10.1.1.57] (skuns.zoral.com.ua [91.193.166.194]) by mx.google.com with ESMTPS id j13sm1377741faa.1.2011.03.29.07.29.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2011 07:29:43 -0700 (PDT) Message-ID: <4D91ECD5.6010109@gmail.com> Date: Tue, 29 Mar 2011 17:29:41 +0300 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Kevin Grittner CC: Craig Ringer , Dave Cramer , List Subject: Re: JDBC gripe list References: <4D914191.8050103@postnewspapers.com.au> <4D919A02.60607@gmail.com> <4D91A252020000250003BE85@gw.wicourts.gov> In-Reply-To: <4D91A252020000250003BE85@gw.wicourts.gov> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.346 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201103/107 X-Sequence-Number: 21662 29.03.11 17:11, Kevin Grittner написав(ла): > Vitalii Tymchyshyn 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