Re: CAY-1173 Expose QueryLogger invocations as events

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Feb 11 2009 - 03:12:51 EST

  • Next message: Kevin Menard: "Re: PropertyUtils compiled accesor for nested properties bug?"

    Hi Anatol,

    First note on the patch itself. It seems to be generated from Eclipse.
    Single-project Eclipse patches are usually compatible with the "patch"
    command. This one is multi-project command-line patch is gettig
    confused. Could you please resubmit the patch created from command line:

    cd cayenne && svn diff > some_file

    (Just make sure that NEW files are added first, or otherwise they
    won't get included).

    Cheers,
    Andrus

    On Feb 9, 2009, at 5:14 PM, Anatol Lutski wrote:

    > Hi, guys.
    >
    > I work together with Andrus and have a chance to take part in
    > Cayenne-development.
    > I've just added my first patch to the mentioned task and it's very
    > important for me to know your feedback.
    >
    > Description:
    > https://issues.apache.org/cayenne/browse/CAY-1173
    > Patch https://issues.apache.org/cayenne/secure/attachment/10813/innitial_steps_log_ProcedureAction.txt
    > "innitial_steps_log_ProcedureAction.txt" is an initial step of
    > implementation. Statistics collection is shown by the example of
    > ProcedureAction.
    > The main idea is to have pair of events which will be generated in
    > the beginning and in the end of each transaction/action execution,
    > and also to have one event which saves logging info immediately. We
    > need this action because it's necessary to save executable sql
    > before start - in order to check it in the case of an error.
    > OperationObserver is present at any moment of an operation
    > execution. So it's used as a statistics collector.
    > DefaultStatisticsCollector - a new base abstract class implementing
    > additional functions for collecting info. All classes which now
    > implement OperationObserver have to extends this one. (It's a reason
    > why the code ins't compiled - cause the declaration was changed only
    > for DataDomainQueryAction).
    >
    > Some notes about classes.
    > New events: ActionFinishEvent, ActionStartEvent, FixInfoEvent,
    > TrxFinishEvent, TrxStaetEvent.
    > EventFacade - static class, used for posting events in different
    > places of framework.
    > Configuration - initialization of the listener
    > LoggingListener - default processor of Events.
    > DataNode, ProcedureTranslator - here you can see how the event which
    > immediately saves info in log is posted
    > BaseSQLAction - here log info is being collected in Observer
    > ProcedureAction- the pair of start and finish events is generated
    >
    > Please check the main idea. If everything is right I add the same
    > logging for the rest of the actions.
    >
    > WBR, Anatol.
    >



    This archive was generated by hypermail 2.0.0 : Wed Feb 11 2009 - 03:13:26 EST