cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Wiesmann <awiesm...@somap.org>
Subject Re: Lifecycle Callback
Date Mon, 30 Oct 2006 17:35:13 GMT
Hi Andrus

> Your code is right, but an extra setup is needed - DataContext needs  
> to be decorated in two callback interceptors. I haven't documented it  
> yet, as we still need to come up with a more transparent procedure.  
> But here is how I am doing it in my apps:

Thanks for helping me out with this.

I have one comment (for the log, perhaps others want to try that as well).


> // build interceptor sitting between DD and DC - one interceptor can  
> // be shared by multiple DataContexts.
> DataChannel postInterceptor = new DataChannelCallbackInterceptor();
> postInterceptor.setChannel(domain);

There is no setChannel method on the DataChannel Interface. I guess this
is a typo and should read like this?:

DataChannelCallbackInterceptor postInterceptor = new
DataChannelCallbackInterceptor();

Most of the callbacks are working now. But I can't seem to get the
prePersist method work as expected? PrePersist is never called, although I
registered all the possible events. Do you have an idea?

Thanks again,
Adrian

Mime
View raw message