Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0040046 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2019-01-28 14:03 | 2019-03-28 14:55 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR19Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 396b375afe22 | ||||
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 | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
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. | |||||||
Tags | Performance | |||||||
Attached Files | entityPersistenceEventObserver.diff [^] (1,098 bytes) 2019-01-28 14:04 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||||||
|
Notes | |
(0109328) hgbot (developer) 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 (developer) 2019-01-30 13:52 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: 26fa6e6dce880dfd4227590b86abd9419b92aab1 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Wed Jan 30 13:50:52 2019 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/26fa6e6dce880dfd4227590b86abd9419b92aab1 [^] related to issue 40046: make observer be stateless --- M src/org/openbravo/retail/storeserver/synchronization/eventhandler/ImportEntryNoSyncEventHandler.java --- |
(0109330) hgbot (developer) 2019-01-30 13:57 |
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations Changeset: 40f8f26b154025a40f30aca8c7a6588dd6431739 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Wed Jan 30 13:55:53 2019 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/40f8f26b154025a40f30aca8c7a6588dd6431739 [^] related to issue 40046: define observer as Dependent - Explicitly define the observer as @Dependent - Applied new java formatting --- M src/org/openbravo/warehouse/advancedwarehouseoperations/eventobserver/TaskEventObserver.java --- |
(0109339) hgbot (developer) 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 (developer) 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 --- |
(0109671) alostale (manager) 2019-02-11 14:39 |
reviewed |
(0110761) hudsonbot (developer) 2019-03-28 14:55 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^] Maturity status: Test |
(0110787) hudsonbot (developer) 2019-03-28 14:55 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^] Maturity status: Test |
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 | View Revisions |
2019-01-28 14:08 | caristu | Steps to Reproduce Updated | View Revisions |
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 | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |