> My PersistListener is never called.
> entity.setValue("NewValue");

PersistListener is called on newly-persistent instances.
May be you need a UpdateListener?


Ricardo Gladwell wrote:
> 
> 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]>
> 
> 


-----
Pinaki 
-- 
View this message in context: 
http://n2.nabble.com/Problem-with-OpenJPA-Life-cycle-Listeners-tp3611413p3617981.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to