Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0030182 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2015-06-15 14:30 | 2022-02-25 10:10 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | Triage Platform Base | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0030182: jasper subreports using DAL do leak connection + transactions | |||||||
Description | Note: report is about behavior known to be like this some years ago. Jasper update may have changed it. So please verify. When jasper engine does process a jrxml having a subreport, then this subreport is processing in a separate Thread created by japser engine (subreport-filler or similar name in jstack). If then the subreport definition uses dal (i.e. via calling some java utility methods) that somehow managed to create a dal-context in the thread (so connection+transaction) However that transaction+connection are never committed+closed as that Thread is not covered by the usual DalThreadHandler we have for http requests. Note: GC seems to clean that problem up after some time. | |||||||
Steps To Reproduce | Make or find a jrxml having subreport using dal. Run once Observe connection (especially idle in transaction) status just after that. | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||
|
Notes | |
(0085404) alostale (manager) 2016-04-04 11:43 |
The problem is caused because Jasper subreports are generated within a new thread. When using DAL (or DalConnectionProvider), org.openbravo.dal.core.SessionHandler.getInstance() is invoked, this method creates a DAL transaction (associated with a DB connection) in a thread local if it does not exist yet, which is used to do DB queries. The problem is this transaction is never closed because standard dal thread handling is not invoked. As workaround, when any subreport invoking backend methods that use DAL or DalConnectionProvider, it must be checked these methods close the dal connection before leaving. |
(0135312) caristu (developer) 2022-02-25 10:10 |
Fixed with 0048465 |
Issue History | |||
Date Modified | Username | Field | Change |
2015-06-15 14:30 | shuehner | New Issue | |
2015-06-15 14:30 | shuehner | Assigned To | => platform |
2015-06-15 14:30 | shuehner | Modules | => Core |
2015-06-15 14:30 | shuehner | Triggers an Emergency Pack | => No |
2015-06-16 11:49 | alostale | Status | new => acknowledged |
2015-06-18 09:05 | alostale | Tag Attached: Performance | |
2015-06-18 09:05 | alostale | Priority | normal => urgent |
2015-06-18 09:05 | alostale | Target Version | => 3.0PR15Q4 |
2015-07-22 09:43 | alostale | Assigned To | platform => caristu |
2015-09-29 12:29 | alostale | Target Version | 3.0PR15Q4 => 3.0PR16Q1 |
2015-11-06 11:01 | alostale | Target Version | 3.0PR16Q1 => |
2015-11-11 11:37 | alostale | Priority | urgent => normal |
2015-11-11 12:13 | alostale | Assigned To | caristu => platform |
2016-04-04 11:37 | alostale | Relationship added | related to 0032576 |
2016-04-04 11:43 | alostale | Note Added: 0085404 | |
2016-12-01 14:05 | alostale | Priority | normal => urgent |
2016-12-01 14:05 | alostale | Priority | urgent => high |
2016-12-01 14:34 | alostale | Type | defect => design defect |
2017-08-23 10:35 | caristu | Relationship added | related to 0036697 |
2018-09-25 10:15 | caristu | Relationship added | related to 0039261 |
2022-02-01 08:09 | alostale | Assigned To | platform => Triage Platform Base |
2022-02-14 12:27 | caristu | Relationship added | related to 0048465 |
2022-02-25 10:10 | caristu | Status | acknowledged => scheduled |
2022-02-25 10:10 | caristu | Review Assigned To | => caristu |
2022-02-25 10:10 | caristu | Note Added: 0135312 | |
2022-02-25 10:10 | caristu | Status | scheduled => closed |
2022-02-25 10:10 | caristu | Resolution | open => fixed |
Copyright © 2000 - 2009 MantisBT Group |