geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <da...@coredevelopers.net>
Subject Re: Reusing connections from JTA transactions
Date Wed, 05 May 2004 23:41:57 GMT
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?

something like
new Exception("stack trace").printStackTrace();

In the current openejb jdbc wrapper, closing a connection handle does  
not close the underlying connection.

Is there some chance that you have obtained the underlying Oracle  
connection and have closed it by mistake?

On Wednesday, May 5, 2004, at 03:57 PM, Hamilton Verissimo de Oliveira  
(Engenharia - SPO) wrote:

>
> After the end of transaction, the connections are being returned to  
> pool.
> Maybe this is ok for every single database out there, except for  
> Oracle :-)

It has been ok for Oracle with other jca-jdbc wrappers.

thanks
david jencks


>
> I'm using local transaction, after the completion the connection is  
> closed.
> Reciclying it to the pool and trying to use it again results in a  
> Connection
> Closed ORA error. I changed the
> TransactionCachingInterceptor.afterCompletion to
>
>     public void afterCompletion(Object managedConnectionInfo) {
>         ConnectionInfo connectionInfo = new ConnectionInfo();
>
> connectionInfo.setManagedConnectionInfo((ManagedConnectionInfo)managedC 
> onnec
> tionInfo);
>         returnConnection(connectionInfo,  
> ConnectionReturnAction.DESTROY);
>     }
>
> So I explicit don't want to re-use connections used by transactions.  
> Hope
> you provide a work-around for Oracle drivers.
>
>
> Regards,
> hammett
>


Mime
View raw message