Re: How to use TransactionDelegate to do audit logging?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Oct 03 2006 - 11:33:59 EDT

  • Next message: Mike Kienenberger: "Re: How to use TransactionDelegate to do audit logging?"

    Yeah, 3.0 builds are still in a bit of a disarray, so use it at your
    own risk. The code IMO is in a good shape though - FWIW myself and
    other people are running it in production :-)

    You can grab a nightly build here (last 3-4 builds are pretty stable):

    http://objectstyle.org/downloads/cayenne/nightly/

    The file "lib/cayenne-jdk1.4-3.0-incubating-SNAPSHOT.jar" is analog
    of 1.2.1 "cayenne-nodeps.jar". Modeler included in the nightly build
    is still broken, so grab the Modeler from here (I just posted
    manually built snapshots, see a previous message on this list):

    http://people.apache.org/~aadamchik/modeler-snapshot-10032006/

    Andrus

    On Oct 3, 2006, at 1:49 AM, Aristedes Maniatis wrote:
    > On 03/10/2006, at 3:00 PM, Jeff de Vries wrote:
    >
    >> Thanks! Couple more questions ...
    >>
    >> 1) Where do I get 3.0? Nightly snapshot? Is any one more stable
    >> than any other? Any installation instructions? Or things to watch
    >> out for?
    >
    > Use svn to get a local checkout of the source. Then install maven
    > on your computer and:
    >
    > # mvn install
    >
    > The product gets put in the world's longest path, somewhere inside
    > ~/.m2/ Just look at the last couple of messages in the maven build.
    >
    >
    >> 2) Is the "handleCallback" argument actually the name of the
    >> method to call as the callback, aka "myPostPersist"?
    >
    > That's the idea. We have methods like this in the entities:
    >
    > protected void prePersist() {
    > // do something
    > }
    >
    >
    >> 3) Where is the proper place to set up the callbacks? In a custom
    >> data context factory (assuming you always want the callbacks)?
    >> This is for a web app using thread data contexts.
    >
    > Where you initialise Cayenne.
    >
    >
    >> 4) Where do I get the domain object?
    >
    >
    > Configuration.initializeSharedConfiguration();
    > Configuration conf = Configuration.getSharedConfiguration();
    > dataDomain = conf.getDomain();
    >
    > LifecycleEventCallbackMap aCallback = dataDomain.getEntityResolver
    > ().getCallbacks( LifecycleEventCallback.PRE_PERSIST );
    > aCallback.addListener( Foo.class, "prePersist" );
    >
    >
    >
    >
    > Ari Maniatis
    >
    >
    >
    > -------------------------->
    > ish
    > http://www.ish.com.au
    > Level 1, 30 Wilson Street Newtown 2042 Australia
    > phone +61 2 9550 5001 fax +61 2 9550 4001
    > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Oct 03 2006 - 11:34:12 EDT