Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0040046 | Openbravo ERP | A. Platform | public | 2019-01-28 14:03 | 2019-03-28 14:55 |
|
Reporter | caristu | |
Assigned To | caristu | |
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR19Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0040046: unnecessary objects are created every time any DAL object is created/updated/deleted |
Description | EntityPersistenceEventObserver should be declared as an @ApplicationScoped bean, otherwise when a new event (save, update, delete, transaction begin, transaction completed) is fired a new instance of every EntityPersistenceEventObserver listening to that particular event is created. |
Steps To Reproduce | 1) Apply the provided patch, which writes in the log every time a new instance of EntityPersistenceEventObserver is created.
2) Go to the [Sales Order]
3) Create a new record. Check in the log that a new instance of every EntityPersistenceEventObserver listening to the save event is created.
4) Create another record. Check in the log that a new instance of every EntityPersistenceEventObserver listening to the save event is created again.
Note that same happens for the rest of events. |
Proposed Solution | Set EntityPersistenceEventObserver as @ApplicationScoped and review all classes extending EntityPersistenceEventObserver to ensure that this change is safe. |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0030571 | | closed | AugustoMauch | Openbravo ERP | It is not possible to remove a row if it contains a mandatory image | related to | defect | 0040072 | | new | Triage Omni WMS | Modules | TaskEventObserver should be defined as @ApplicationScoped | related to | defect | 0040066 | | closed | caristu | Openbravo ERP | API Change: EntityPersistenceEventObserver declared as an @ApplicationScoped bean | related to | defect | 0040067 | | closed | caristu | Openbravo ERP | Cleanup in EntityPersistenceEventObserver classes |
|
Attached Files | entityPersistenceEventObserver.diff (1,098) 2019-01-28 14:04 https://issues.openbravo.com/file_download.php?file_id=12557&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2019-01-28 14:03 | caristu | New Issue | |
2019-01-28 14:03 | caristu | Assigned To | => platform |
2019-01-28 14:03 | caristu | Modules | => Core |
2019-01-28 14:03 | caristu | Triggers an Emergency Pack | => No |
2019-01-28 14:04 | caristu | File Added: entityPersistenceEventObserver.diff | |
2019-01-28 14:08 | caristu | Description Updated | bug_revision_view_page.php?rev_id=18196#r18196 |
2019-01-28 14:08 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=18198#r18198 |
2019-01-28 14:08 | caristu | Assigned To | platform => caristu |
2019-01-28 14:08 | caristu | Proposed Solution updated | |
2019-01-28 16:11 | caristu | Summary | EntityPersistenceEventObserver should be declared as application scoped => EntityPersistenceEventObserver should be declared as @ApplicationScoped |
2019-01-28 16:11 | caristu | Description Updated | bug_revision_view_page.php?rev_id=18199#r18199 |
2019-01-29 09:01 | alostale | Tag Attached: Performance | |
2019-01-29 09:03 | alostale | Summary | EntityPersistenceEventObserver should be declared as @ApplicationScoped => unnecessary objects are created every time any DAL object is created/updated/deleted |
2019-01-30 12:57 | caristu | Issue cloned | 0040066 |
2019-01-30 12:57 | caristu | Relationship added | related to 0040066 |
2019-01-30 13:02 | caristu | Issue cloned | 0040067 |
2019-01-30 13:02 | caristu | Relationship added | related to 0040067 |
2019-01-30 13:22 | caristu | Relationship added | related to 0030571 |
2019-01-30 13:49 | hgbot | Checkin | |
2019-01-30 13:49 | hgbot | Note Added: 0109328 | |
2019-01-30 13:52 | hgbot | Checkin | |
2019-01-30 13:52 | hgbot | Note Added: 0109329 | |
2019-01-30 13:57 | hgbot | Checkin | |
2019-01-30 13:57 | hgbot | Note Added: 0109330 | |
2019-01-30 14:05 | caristu | Relationship added | related to 0040072 |
2019-01-30 19:07 | hgbot | Checkin | |
2019-01-30 19:07 | hgbot | Note Added: 0109339 | |
2019-01-30 19:09 | caristu | Status | new => scheduled |
2019-02-01 09:49 | hgbot | Checkin | |
2019-02-01 09:49 | hgbot | Note Added: 0109408 | |
2019-02-01 09:49 | hgbot | Status | scheduled => resolved |
2019-02-01 09:49 | hgbot | Resolution | open => fixed |
2019-02-01 09:49 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/396b375afe225c3474e022655cd11040e73f2734 [^] |
2019-02-01 09:50 | caristu | Review Assigned To | => alostale |
2019-02-11 14:39 | alostale | Note Added: 0109671 | |
2019-02-11 14:39 | alostale | Status | resolved => closed |
2019-02-11 14:39 | alostale | Fixed in Version | => 3.0PR19Q2 |
2019-03-28 14:55 | hudsonbot | Checkin | |
2019-03-28 14:55 | hudsonbot | Note Added: 0110761 | |
2019-03-28 14:55 | hudsonbot | Checkin | |
2019-03-28 14:55 | hudsonbot | Note Added: 0110787 | |
Notes |
|
(0109328)
|
hgbot
|
2019-01-30 13:49
|
|
Repository: erp/devel/pi
Changeset: e74dadb5ea9bc8b31f9625d86473b91cdb61542c
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jan 30 13:48:11 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e74dadb5ea9bc8b31f9625d86473b91cdb61542c [^]
related to issue 40046: make observer be stateless
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java
---
|
|
|
(0109329)
|
hgbot
|
2019-01-30 13:52
|
|
|
|
(0109330)
|
hgbot
|
2019-01-30 13:57
|
|
|
|
(0109339)
|
hgbot
|
2019-01-30 19:07
|
|
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 2d93921155ac5011d455f3d44ea27b043cf199df
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jan 30 19:03:22 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/2d93921155ac5011d455f3d44ea27b043cf199df [^]
related to issue 40046: remove final modifiers to avoid error on server startup
Removed the final modifiers, now that the observers are @ApplicationScoped, the following error is raised on server startup in case they are final or if they have any final method: "org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001437 Normal scoped bean class is not proxyable because the type is final or it contains a final method"
---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/AutoRouteAndPushGenericEventHandler.java
---
|
|
|
(0109408)
|
hgbot
|
2019-02-01 09:49
|
|
Repository: erp/devel/pi
Changeset: 396b375afe225c3474e022655cd11040e73f2734
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Feb 01 08:48:40 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/396b375afe225c3474e022655cd11040e73f2734 [^]
fixes bug 40046: unnecessary objects created every time a DAL event is fired
Declare EntityPersistenceEventObserver as @ApplicationScoped so that just one instance of every event handler is created by default. This is because being Dependent, a new instance of every event handler listening to a particular DAL event (save, update, delete, transaction begin, transaction completed) was being created.
---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/event/EntityPersistenceEventObserver.java
---
|
|
|
|
|
|
|
|
|
|
|