[
https://issues.apache.org/jira/browse/DERBY-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Waagan closed DERBY-1911.
----------------------------------
I'm taking the liberty of closing this issue.
We haven't heard anything from the reporter in a long time, and the issue has
been resolved as invalid.
I wrote a little app to test the reported behavior, and as far as I can tell,
Derby behaves correctly both with and without an explicit rollback after the
exception.
There is one exception, where the client driver does not check if there is an
active transaction when the connection is closed. This has been logged earlier
as DERBY-3319.
> rollback does not function with pooled connection
> -------------------------------------------------
>
> Key: DERBY-1911
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.