Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034499 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | always | 2016-11-14 17:06 | 2016-12-16 18:38 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR17Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 48248d89f4ba | ||||
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 | 0034499: [clustering] CachedPreference feature is not supported on clustered environments | |||||||
Description | The CachedPreference class is an application scoped which implements a cache that keeps in memory the value of some preferences defined at system level along the application life cycle, avoiding the time spent to compute the preference value. This cache is invalidated/updated by using an observer called PreferenceEventHandler. This kind of cache invalidation is not valid for clustered environments (multiple JVM) Currently, it will be necessary to restart Tomcat to retrieve the new value of the preference in every JVM. | |||||||
Steps To Reproduce | In description | |||||||
Proposed Solution | Two possible alternatives: a) Declare CachedPreference as @SessionScoped. This way the cache will be recreated on every new session. This is even more appropriate for the case of preferences as they are being refreshed on every new session. This is the recommended solution for this case. b) Implement a invalidation mechanism valid for a clustered environment. For example based on a timer: by invalidating the cache every time the timeout is expired. | |||||||
Tags | clustering | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Notes | |
(0091522) hgbot (developer) 2016-11-15 08:37 |
Repository: erp/devel/pi Changeset: 48248d89f4bae13423869c9969342943c7f97b1f Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Tue Nov 15 08:36:29 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/48248d89f4bae13423869c9969342943c7f97b1f [^] fixes issue 34499: CachedPreference feature does not support clustering The CachedPreference was being used as a singleton which was keeping a set of preferences defined at System Level in a cache. Those values can be refreshed with the PreferenceEventHandler every time it detects a change. This mechanism was not valid for clustered environments because changes were being detected just on the node (JVM) where the event handler was executed. To fix this problem we have modified the scope of the class from application to session. Thus, the cache will be initialized on every new session created on each node of the cluster. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java --- |
(0091575) hgbot (developer) 2016-11-15 16:47 |
Repository: erp/devel/pi Changeset: 9d2a3ac397418df563ba20c90766b20e9e6635a1 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Tue Nov 15 16:45:28 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/9d2a3ac397418df563ba20c90766b20e9e6635a1 [^] related to issue 34499: removed PreferenceEventHandler class PreferenceEventHandler class was being used to detect changes on the preference values cached by the CachedPreference class. As CachedPreference now declared the @SessionScoped is no longer a singleton therefore the cached values will persist along the life cycle of a session. As preferences are refreshed with every new session this handler is no longer required. Besides, the injection of the @SessionScoped bean in this handler was causing WELD-001303 error. --- R modules/org.openbravo.client.application/src/org/openbravo/client/application/event/PreferenceEventHandler.java --- |
(0091576) hgbot (developer) 2016-11-15 16:47 |
Repository: erp/devel/pi Changeset: 7ce6ca92bcbe89c1bd88c213b7e0dfa680160d9f Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Tue Nov 15 16:45:52 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/7ce6ca92bcbe89c1bd88c213b7e0dfa680160d9f [^] related to issue 34499: updated comment --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java --- |
(0091811) alostale (manager) 2016-11-25 09:34 |
code reviewed + tested |
(0092622) hudsonbot (developer) 2016-12-16 18:38 |
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/dc8bf00badd0 [^] Maturity status: Test |
(0092631) hudsonbot (developer) 2016-12-16 18:38 |
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/dc8bf00badd0 [^] Maturity status: Test |
(0092632) hudsonbot (developer) 2016-12-16 18:38 |
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/dc8bf00badd0 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2016-11-14 17:06 | caristu | New Issue | |
2016-11-14 17:06 | caristu | Assigned To | => platform |
2016-11-14 17:06 | caristu | Modules | => Core |
2016-11-14 17:06 | caristu | Triggers an Emergency Pack | => No |
2016-11-14 17:06 | caristu | Relationship added | blocks 0034490 |
2016-11-14 17:07 | caristu | Relationship added | related to 0032039 |
2016-11-14 17:07 | caristu | Relationship added | related to 0030204 |
2016-11-14 17:09 | caristu | Relationship added | related to 0032702 |
2016-11-14 17:10 | caristu | Relationship added | related to 0032728 |
2016-11-14 17:18 | caristu | Relationship added | related to 0032610 |
2016-11-14 17:19 | caristu | Proposed Solution updated | |
2016-11-14 19:15 | caristu | Assigned To | platform => caristu |
2016-11-14 19:15 | caristu | Status | new => scheduled |
2016-11-15 08:37 | hgbot | Checkin | |
2016-11-15 08:37 | hgbot | Note Added: 0091522 | |
2016-11-15 08:37 | hgbot | Status | scheduled => resolved |
2016-11-15 08:37 | hgbot | Resolution | open => fixed |
2016-11-15 08:37 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/48248d89f4bae13423869c9969342943c7f97b1f [^] |
2016-11-15 08:38 | caristu | Review Assigned To | => alostale |
2016-11-15 08:59 | alostale | Tag Attached: clustering | |
2016-11-15 09:37 | caristu | Relationship added | causes 0034514 |
2016-11-15 16:25 | caristu | Relationship added | related to 0034536 |
2016-11-15 16:47 | hgbot | Checkin | |
2016-11-15 16:47 | hgbot | Note Added: 0091575 | |
2016-11-15 16:47 | hgbot | Checkin | |
2016-11-15 16:47 | hgbot | Note Added: 0091576 | |
2016-11-25 09:34 | alostale | Note Added: 0091811 | |
2016-11-25 09:34 | alostale | Status | resolved => closed |
2016-11-25 09:34 | alostale | Fixed in Version | => 3.0PR17Q1 |
2016-12-16 18:38 | hudsonbot | Checkin | |
2016-12-16 18:38 | hudsonbot | Note Added: 0092622 | |
2016-12-16 18:38 | hudsonbot | Checkin | |
2016-12-16 18:38 | hudsonbot | Note Added: 0092631 | |
2016-12-16 18:38 | hudsonbot | Checkin | |
2016-12-16 18:38 | hudsonbot | Note Added: 0092632 |
Copyright © 2000 - 2009 MantisBT Group |