openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Gladwell <ricardo.gladw...@gmail.com>
Subject Problem with OpenJPA Life-cycle Listeners
Date Wed, 09 Sep 2009 14:36:49 GMT
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 <ricardo.gladwell@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message