Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030182
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminorhave not tried2015-06-15 14:302022-02-25 10:10
ReportershuehnerView Statuspublic 
Assigned ToTriage Platform Base 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030182: jasper subreports using DAL do leak connection + transactions

DescriptionNote: 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 ReproduceMake or find a jrxml having subreport using dal.
Run once
Observe connection (especially idle in transaction) status just after that.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0048465 closedcaristu Some process definition reports stop working after upgrading from 18Q3 to 21Q2.3 
related to defect 0032576 closedalostale connection leak when printing Requisition report 
related to defect 0036697 closedcaristu connection leak when printing a image on a jasper subreport using the Utility.showImage method 
related to defect 0039261 closedjarmendariz connection leak when printing image on subreports using the Utility.showImageLogo method 

-  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
Powered by Mantis Bugtracker