db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1004) Client should not require user to rollback the active transaction before call to PooledConnection.getConnection()
Date Wed, 07 Jun 2006 23:29:31 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1004?page=comments#action_12415237 ] 

Deepa Remesh commented on DERBY-1004:

I went through the patch and it looks good to me. I also checked that the test passes with
the patch and fails without it.

I have one minor comment which is just a readability issue. I am curious why you changed the
place where rollback is called. In an earlier comment, you had mentioned you added a rollback
to client.am.Connection.resetConnection. I thought this was better as it would keep all the
changes to the physical connection at one place. Did it cause any problems? To match the method
names to the actions, I think it would be good to have all changes to the physicalConnection
in one method, something like resetPhysicalConnection. Then call createLogicalConnection to
get the logical connection. This would be similar to what is being done in EmbedPooledConnection.getConnection.


> Client should not require user to rollback the active transaction before call to PooledConnection.getConnection()
> -----------------------------------------------------------------------------------------------------------------
>          Key: DERBY-1004
>          URL: http://issues.apache.org/jira/browse/DERBY-1004
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions:,,,
>     Reporter: Kathey Marsden
>     Assignee: David Van Couvering
>     Priority: Minor
>  Attachments: DERBY-1004.diff
> For a PooledConnection.getConnection() the connection gets closed.
>  Embedded automatically rolls back any activity on the connection.
>  Client requires the user to rollback and gives an SQLException  
>  java.sql.Connection.close() requested while a transaction is in progress
> The test jdbcapi/checkDataSource.java shows this bug.   A boolean needRoolbackBeforePCGetConnection
has been added to the test and  explicit rollback has been added to the test to get it to
run with client.
> To reproduce take out instances of the explicit rollback for client from the test e.g.
> if (needRollbackBeforePCGetConnection)
> 			c1.rollback();

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message