openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject LifecycleListener problem
Date Fri, 29 Jun 2007 13:02:08 GMT

It is possible to registering a LifecycleListener like so:

    emf.addLifecycleListener(new MyLifecycleListener());

However, a listener so registered will never fire, because the
internal code will see a Class[0], not null, as the last argument to
addLifecycleListener(). The right syntax is:

    emf.addLifecycleListener(new MyLifecycleListener(), null);

Needless to say, this is a bit surprising. Maybe we should treat
Class[0] as null?


Patrick Linskey
202 669 5907

View raw message