db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1025) [xa] client XAResource.start() does not commit an active local transaction when auto commit is true
Date Wed, 29 Mar 2006 00:06:20 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1025?page=comments#action_12372170 ] 

Daniel John Debrunner commented on DERBY-1025:
----------------------------------------------

I wonder if the problem you are seeing may be due to this code in DRDAStatement:

	/**
	 * Get prepared statement
	 *
	 * @return prepared statement
	 */
	protected PreparedStatement getPreparedStatement() throws SQLException
	{
		if (ps instanceof BrokeredPreparedStatement)
			return (PreparedStatement)(
						   ((BrokeredPreparedStatement) ps).getStatement());
		else
			return ps;
	}


This code, for some unknown reason due to lack of comments, is getting the underlying embedded
statement
from a BrokeredPreparedStatement.  This should not be allowed, the BrokeredStatement wrappers
are there to
hide the embedded statement object as it can change under the covers of the wrapper.

It could be that the network server is getting the prepared statement and then hanging on
too long and performing
actions on the wrong object. Though it seems unlikely that auto-commit on a connection would
go through the
prepared statement.

I wonder why this code needs the inner statement

> [xa] client XAResource.start() does not commit an active local transaction when auto
commit is true
> ---------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1025
>          URL: http://issues.apache.org/jira/browse/DERBY-1025
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Reporter: Daniel John Debrunner
>     Assignee: Kathey Marsden

>
> Embedded XAResource.start() implementation commits the active local transaction on the
Connection associated with the XAResource if the connection is auto-commit mode.
> Client incorrectly throws an XAException with the XAER_RMFAIL error code (see DERBY-1024)
> XATest contains a work-around for client (calling commit) with a comment with this bug
number.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message