I'm trying to add a PersistListener to my OpenJPA EntityManagerFactory like
so:

OpenJPAEntityManagerFactorySPI emf = (OpenJPAEntityManagerFactorySPI)
OpenJPAPersistence.cast(entityManagerFactory);
emf.addLifecycleListener(listener, classes);

However, when I then call my DAO to update the my entity like so:

entity = dao.readValue(id);
entity.setValue("NewValue");
dao.updateValue(entity);

My PersistListener is never called. Am I doing something wrong?

Using debugging introspection I identified that my PersistListener has been
successfully added to the DAO internal JDBCBrokerFactory _lifecycleListeners
HashMap.

Can anyone advise if I'm doing something wrong?

TIA...

Ricardo Gladwell <[email protected]>

Reply via email to