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)

Reply via email to