Project

General

Profile

Defect #389

Reports should run inside current transaction if one exists.

Added by Corey Puffalt over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
High
Start date:
11/03/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

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

#1

Updated by Andrei Costache over 12 years ago

  • Status changed from New to Closed
  • Assignee set to Andrei Costache

Fixed.

#2

Updated by Corey Puffalt over 12 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.

#3

Updated by Corey Puffalt over 12 years ago

Oops. Ignore that. I see you already caught that and fixed at SVN r33.

Also available in: Atom PDF