RE: How to receive Data Object Transaction Events

From: DOMINGUEZ Felipe (Felipe.DOMINGUE..urocontrol.int)
Date: Fri Oct 13 2006 - 03:31:21 EDT

  • Next message: Andrus Adamchik: "Re: How to receive Data Object Transaction Events"

    Hello.

    I did find the solution.

    It is as simple as to enable event dispatching on the DataContext :-0

    context.setTransactionEventsEnabled(true);

    then it works as it says in the documentation.

    I post it in case some one is having the same silly problem in the
    future.

    Cheers

    Felipe

    -----Original Message-----
    From: DOMINGUEZ Felipe [mailto:Felipe.DOMINGUE..urocontrol.int]
    Sent: Thursday 12 October 2006 19:16
    To: cayenne-use..ncubator.apache.org
    Subject: How to receive Data Object Transaction Events

    Hello again.

    I have another question, this time is regarding events.

    I am looking at DataObjectTransactionEventListener and by reading the
    documentation added in the javadoc API I would understand that by just
    implementing this interface y any DataObject I would receive events
    telling me when the object will be committed or when the object was
    committed.

    ====================================
    This interface declares methods that DataObject classes can implement to
    be notified about transactions of their DataContext. Note: explicit
    registration with EventManager is not necessary, since the events are
    simply forwarded by ContextCommitObserver; stricly speaking these
    methods are just regular 'callbacks'. The event argument is passed along
    for convenience.
    ====================================

    but it don't manage to make it work, in fact I have not found any way
    to get these events, no even registering the object with the
    EventManager..

    Any help will be appreciated.

    cheers

    Felipe

    ____

    This message and any files transmitted with it are legally privileged
    and intended for the sole use of the individual(s) or entity to whom
    they are addressed. If you are not the intended recipient, please notify
    the sender by reply and delete the message and any attachments from your
    system. Any unauthorised use or disclosure of the content of this
    message is strictly prohibited and may be unlawful.

    Nothing in this e-mail message amounts to a contractual or legal
    commitment on the part of EUROCONTROL, unless it is confirmed by
    appropriately signed hard copy.

    Any views expressed in this message are those of the sender.

    ____

    This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

    Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

    Any views expressed in this message are those of the sender.



    This archive was generated by hypermail 2.0.0 : Fri Oct 13 2006 - 03:32:25 EDT