From geronimo-dev-return-7168-apmail-incubator-geronimo-dev-archive=incubator.apache.org@incubator.apache.org Thu May 06 16:52:47 2004 Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 53815 invoked from network); 6 May 2004 16:52:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 May 2004 16:52:47 -0000 Received: (qmail 60192 invoked by uid 500); 6 May 2004 16:52:35 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 60147 invoked by uid 500); 6 May 2004 16:52:35 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 60128 invoked from network); 6 May 2004 16:52:34 -0000 Received: from unknown (HELO acspmxe02.agenciaclick.com.br) (200.162.45.22) by daedalus.apache.org with SMTP; 6 May 2004 16:52:34 -0000 Received: by ACSPMXE02 with Internet Mail Service (5.5.2653.19) id ; Thu, 6 May 2004 14:02:13 -0300 Message-ID: <07258F4244D6F649B1A78993D070B7CA0122D7C0@ACSPMXE02> From: "Hamilton Verissimo de Oliveira (Engenharia - SPO)" To: geronimo-dev@incubator.apache.org Subject: Re: Reusing connections from JTA transactions Date: Thu, 6 May 2004 14:02:11 -0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Ashamed! :-) You're right. My Jdbc-JCA bridge was closing the connection on the cleanup method. Thanks, hammett -----Mensagem original----- De: David Jencks [mailto:david@coredevelopers.net] Enviada em: quinta-feira, 6 de maio de 2004 13:07 Para: geronimo-dev@incubator.apache.org Assunto: Re: Reusing connections from JTA transactions 1. Are you using xa? 2. assuming "yes", do you get a new (sql Connection) handle from the XAConnection for each connection handle request? If so, you might try: -- when the XAConnection is first obtained, immediately get a sql Connection from it -- when the adapter ConnectionFactory/Datasource hands out a sql Connection handle, wrap this single oracle sql Connection. If you never close even an oracle handle, perhaps they will last longer. --when the ManagedConnection is destroyed, only then close the Oracle sql Connection. Is this Oracle 10g? Hope this helps david On Thursday, May 6, 2004, at 06:58 AM, Hamilton Verissimo de Oliveira (Engenharia - SPO) wrote: > -----Mensagem original----- > De: David Jencks [mailto:david@coredevelopers.net] > >> There is something wrong somewhere. Can you locate the code in the >> jdbc wrapper you are using that calls close on the oracle connection >> and get a stack trace for when it is called? > > I can, but I'm sure that is not being closed prematurely. I'm using > classes12_g.jar driver. I already exchange a message with an Oracle dev > asking why, for example, after the enlist the next call to > getConnection > will throw "Connection Closed". That leads me to think Oracle driver > has its > own personality :-) > >> In the current openejb jdbc wrapper, closing a connection handle does >> not close the underlying connection. > > Yup. I made a few test cases trying to reproduce the situation. I > tested > with Oracle and HSQL. Didn't have success. Test cases passed, the my > application fails. > >> Is there some chance that you have obtained the underlying Oracle >> connection and have closed it by mistake? > > This is almost impossible. The connection is being created by the > stack of > Connection interceptors and JBDC-JCA bridge. I don't have access to the > underlying connection... > > I'll keep digging. > > > Cheers, > hammett >