You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2006/11/06 18:51:38 UTC
[jira] Commented: (DERBY-1911) rollback does not function with
pooled connection
[ http://issues.apache.org/jira/browse/DERBY-1911?page=comments#action_12447483 ]
Daniel John Debrunner commented on DERBY-1911:
----------------------------------------------
I think what you are seeing in correct behaviour.
A duplicated key results in the current statement failing, not the complete transaction.
> rollback does not function with pooled connection
> -------------------------------------------------
>
> Key: DERBY-1911
> URL: http://issues.apache.org/jira/browse/DERBY-1911
> Project: Derby
> Issue Type: Bug
> Components: Network Server
> Affects Versions: 10.1.3.1
> Environment: WIndows XP, Windows 2003, IBM Websphere Application Server Community Edition 1.1, Sun JDK 1.5_08, IBM JDK 5.0
> Reporter: Huang GuangXia
>
> My scenario: The derby is running in a Network Server mode.
> When using DriverManager to get connection, rollback works fine with setAutoCommit(false) to the connection.
> But rollback not do its work in the pooled connection scenario.
> I configured a data source in Websphere Application Server Community Edition 1.1 (WASCE for short hereafter), and get connection this way:
> Context ctx = new InitialContext();
> DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/eim");
> conn = ds.getConnection();
> with this connection, I insert data into three tables. All the three tables have primary key constraint, so no dup key can be inserted.
> before execute insert statement, I do this:
> conn.setAutoCommit(false);
> and then execute three insert statements.
> the third insertion failed because of duplicated key, so Exception caught, a rollback is executed.
> But the result is not right: the first and second insertion have not rolled back!!! The inserted data still in table.
> Any body can help me on this?
> Can this problem be solved by change settings?
> Thanks
> HuangGX
--
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