cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelven Yang <kelven.y...@citrix.com>
Subject Re: @ActionEvent generation doesn't work when method is called within the same manager context
Date Thu, 08 May 2014 18:43:48 GMT
When I first made Spring changes, to support @DB and @ActionEvents, I had to disable Spring
Proxy mode so that the same semantics has been kept. I mentioned about the impact of this
issue when switching to Spring proxy-based injection mode, for @DB, it has been taken care
of with pre-setup done from ManagedContexts, but @ActionEvents will become victim, developers
should be aware of that @ActionEvents will not be constantly work magically as before, this
will post a big coding constancy problem.  If things can’t work consistently, I would suggestion
to drop @ActionEvents at all, and ask developers always to publish events programmatically,
unless we have a better solution for this.

Kelven

From: Darren Shepherd <darren.shepherd@citrix.com<mailto:darren.shepherd@citrix.com>>
Date: Wednesday, May 7, 2014 at 2:30 PM
To: Alena Prokharchyk <Alena.Prokharchyk@citrix.com<mailto:Alena.Prokharchyk@citrix.com>>
Cc: Kelven Yang <kelven.yang@citrix.com<mailto:kelven.yang@citrix.com>>, "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>"
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Subject: Re: @ActionEvent generation doesn't work when method is called within the same manager
context

Any call to this.method() will not process @ActionEvent annotation.  That is expected after
the spring changes that were done.  There's no change that can be done to change that behavior,
it's just how spring AOP work because it's proxy based.

If you want @ActionEvent to be processed you must cross beans, or just programmatically record
the action event.

Darren

On May 7, 2014, at 1:57 PM, "Alena Prokharchyk" <Alena.Prokharchyk@citrix.com<mailto:Alena.Prokharchyk@citrix.com>>
wrote:

Kelven/Darren,

While working on the fix for  CLOUDSTACK-6595, I’ve noticed that the methods annotated with
@ActionEvents sometimes don’t generate the events. It happens when the annotated method
is called within the same manager. When its called from another manager, the event is generated
and inserted to cloud.events table. Kelven said its related to the Spring changes done by
Darren.

Can you please take a look at it? Kelven, I’ve reassigned CLOUDSTACK-6595 to you (fix has
to be submitted to 4.4-forward first, then cherry-picked to 4.4)

-Alena.

From: Alena Prokharchyk <alena.prokharchyk@citrix.com<mailto:alena.prokharchyk@citrix.com>>
Date: Wednesday, May 7, 2014 at 1:53 PM
To: Daan Hoogland <daan.hoogland@gmail.com<mailto:daan.hoogland@gmail.com>>, "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>"
<dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>>
Subject: [ACS44] Cherry pick for CLOUDSTACK-6595

Daan, can you please cherry-pick the commit to 4.4 branch:

commit b9284db857cd001e75926cb7c49b6aff4ab63695
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com<mailto:alena.prokharchyk@citrix.com>>
Date:   Wed May 7 13:44:26 2014 -0700

    CLOUDSTACK-6595: call expunge method marked with @ActionEvent from expunge thread context.
So the action even EXPUNGE.VM is generated when vm is expunged by the thread.

Thank you,
Alena.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message