You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Geoff (JIRA)" <ji...@apache.org> on 2019/04/14 20:13:00 UTC
[jira] [Created] (OPENJPA-2786) Registering a Lifecycle Event
Listener that implements UpdateListener is never invoked
Geoff created OPENJPA-2786:
------------------------------
Summary: Registering a Lifecycle Event Listener that implements UpdateListener is never invoked
Key: OPENJPA-2786
URL: https://issues.apache.org/jira/browse/OPENJPA-2786
Project: OpenJPA
Issue Type: Bug
Affects Versions: 2.4.3
Reporter: Geoff
There is a Lifecycle Event Listener interface called UpdateListener, which is similar to PersistListener, LoadListener, StoreListener, etc. If a listener that implements this interface is registered (through LifecycleEventManager.addListener) the methods are not invoked.
This appears to be because org.apache.openjpa.event.LifecycleEventManager.ListenerList#getEventTypes is missing the following logic:
{{if (listener instanceof UpdateListener) {}}
{{ types |= 2 << LifecycleEvent.BEFORE_UPDATE;}}
{{ types |= 2 << LifecycleEvent.AFTER_UPDATE_PERFORMED;}}
{{}}}
Additionally, the LifecycleListener interface, which claims to contain all listeners, does not extend UpdateListener.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)