Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajorhave not tried2018-06-21 11:202018-06-25 18:32
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2.1
StatusclosedFix in branchFixed in SCM revision4887e05c89dc
ProjectionnoneETAnoneTarget Version3.0PR18Q2.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0038828: If flush inside TriggerHandler.enable() throws an exception, threadlocal is not cleared, thread remains with triggers disabled

DescriptionIf flush inside TriggerHandler.enable() throws an exception, threadlocal is not cleared, thread remains with triggers disabled.

This means that when that thread is reused the database and hibernate triggers will be disabled, although still the safety mechanisms work and the disablement will not be committed to the database.
Steps To ReproduceCreate a process that:
- Disables the triggers
- Adds a record that will result in an exception when the flush is done (for instance create a UOM with a name of an existing one)
- Reenable the triggers. An exception will be thrown
- Don't disable the triggers again, and place some log to show whether the triggers are disabled. The next time the previous thread executes that log, it will show that their triggers remain disabled.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0038801 closedAugustoMauch If flush inside TriggerHandler.enable() throws an exception, threadlocal is not cleared, thread remains with triggers disabled 

-  Notes
hgbot (developer)
2018-06-25 14:52

Repository: erp/backports/3.0PR18Q2.1
Changeset: 4887e05c89dc0357d1049a2024210612198d80cb
Author: Augusto Mauch <augusto.mauch <at>>
Date: Mon Jun 25 14:52:03 2018 +0200
URL: [^]

Fixes issue 38828: TriggerHandler.enable no longer leaves triggers disabled

The problem was that if the flush indie TriggerHandler.enable (invoked when retrieving DAL's connection) failed, the clear method was not
invoked, and the ThreadLocal was not reset. The next time the thread was reused, it would work with disabled triggers.

Now that doesn't happen anymore because the flush is done inside the try block.

M src/org/openbravo/dal/core/
hgbot (developer)
2018-06-25 18:17

Repository: erp/backports/3.0PR18Q2.1
Changeset: 72eebae994003d05cc273025047462d84a085b57
Author: Augusto Mauch <augusto.mauch <at>>
Date: Mon Jun 25 18:16:41 2018 +0200
URL: [^]

Related with issue 38828: Fixes log

M src/org/openbravo/dal/core/
caristu (developer)
2018-06-25 18:32


- Issue History
Date Modified Username Field Change
2018-06-25 14:04 AugustoMauch Type defect => backport
2018-06-25 14:04 AugustoMauch Target Version => 3.0PR18Q2.1
2018-06-25 14:52 hgbot Checkin
2018-06-25 14:52 hgbot Note Added: 0105361
2018-06-25 14:52 hgbot Status scheduled => resolved
2018-06-25 14:52 hgbot Resolution open => fixed
2018-06-25 14:52 hgbot Fixed in SCM revision [^] => [^]
2018-06-25 18:17 hgbot Checkin
2018-06-25 18:17 hgbot Note Added: 0105368
2018-06-25 18:32 caristu Note Added: 0105370
2018-06-25 18:32 caristu Status resolved => closed
2018-06-25 18:32 caristu Fixed in Version => 3.0PR18Q2.1

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker