Defect #389
Reports should run inside current transaction if one exists.
0%
Description
Today, if you generate a report while a transaction is active, the report runs outside that transaction. Instead, the plugin should participate in the active transaction if one exists.
Our use case is that we use Oracle global temp tables to store report parameters (eg. keys from a foundset) for performance reasons but since the plugin doesn't participate in the current transaction it doesn't "see" the keys we stored in the temp table.
History
Updated by Andrei Costache over 13 years ago
- Status changed from New to Closed
- Assignee set to Andrei Costache
Fixed.
Updated by Corey Puffalt over 13 years ago
Andrei, thanks for addressing this issue. I think there may be a bug in SVN revision 29. Connections participating in a transaction need to be closed using:
... finally { if (conn != null) { if (txid != null) { Utils.releaseConnection(conn); } else try { conn.close(); } catch (SQLException ex) { } } }
I really hope a future release of Servoy wraps Connections so that the .close() method does the right thing seamlessly without hacky code like the above which is error-prone but for now I don't think there's anyway around that.
Thanks.
Updated by Corey Puffalt over 13 years ago
Oops. Ignore that. I see you already caught that and fixed at SVN r33.