Re: Lifecycle Callback

From: Adrian Wiesmann (awiesman..omap.org)
Date: Mon Oct 30 2006 - 12:35:13 EST

  • Next message: Andrus Adamchik: "Re: Lifecycle Callback"

    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



    This archive was generated by hypermail 2.0.0 : Mon Oct 30 2006 - 12:35:43 EST