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 : Mon Feb 09 2009 - 10:15:16 EST