cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Wiesmann <>
Subject Lifecycle Callback
Date Sun, 15 Oct 2006 16:03:35 GMT
Hello list

I am in the process to migrate my project to Cayenne 3 and doing so I
would like to use the Lifecycle Callbacks. My problem with them is, that
I can't make them to work.

I am using cayenne-generic-3.0-incubating-SNAPSHOT from 14. 10. 2006.

In the sourcecode I am doing this:

configuration = Configuration.getSharedConfiguration();
dataDomain = configuration.getDomain("sobf");
EntityResolver er = dataDomain.getEntityResolver();
LifecycleEventCallbackMap cbPrePersist =
er.getCallbacks(LifecycleEventCallback.PRE_PERSIST );		
cbPrePersist.addListener( CDBCommon.class, "prePersist" );		
cbPrePersist.addListener( CThreatAgent.class, "prePersist" );

I have the same sourcecode (last 3 lines) for all of the 7 callback

But neither the CThreatAgent nor the CDBCommon class get's called. Neither
when I am creating a new DBObject, nor when I am commiting my changes to
the DataContext.

What am I missing or doing wrong?


View raw message