CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and optimize @DB lookup with caching

2013-03-20 Thread Murali Reddy

Kelven, I see that you fixed action event issue in below commit. But I am
still running into some issues. While working on CLOUDSTACK-1673 I noticed
that in case of AccountManagerImpl, there are multiple methods with same
name. So in that case getAnnotation on the method is returning null even
though there is ActionEvent annotation. If I rename method then action
event annotation works fine. You can repro it by creating user (there are
two createUser methods in AccountManagerImpl). I looked at
ComponentMethodProxyCache to see if I can figure the problem but with no
luck. If you get a chance please try once.

On 19/03/13 6:44 AM, kelv...@apache.org kelv...@apache.org wrote:

Updated Branches:
  refs/heads/master d9b85e397 - fb94b7221


CLOUDSTACK-1568,CLOUDSTACK-1664: Fix ActionEvent interception and
optimize @DB lookup with caching


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fb94b72
2
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fb94b722
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fb94b722

Branch: refs/heads/master
Commit: fb94b72213bf96f2878b90260067f61629c6a956
Parents: d9b85e3
Author: Kelven Yang kelv...@gmail.com
Authored: Mon Mar 18 18:05:09 2013 -0700
Committer: Kelven Yang kelv...@gmail.com
Committed: Mon Mar 18 18:07:52 2013 -0700

--
 .../com/cloud/event/ActionEventInterceptor.java|   15 ++-
 .../ConsoleProxyHttpHandlerHelper.java |   14 ++-
 .../utils/component/ComponentMethodProxyCache.java |   90 +++
 .../utils/component/SpringComponentScanUtils.java  |1 -
 .../cloud/utils/db/TransactionContextBuilder.java  |   14 +--
 5 files changed, 119 insertions(+), 15 deletions(-)
--




RE: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and optimize @DB lookup with caching

2013-03-20 Thread Sangeetha Hariharan
Murali,

Fix for CLOUDSTACK-1664 has not made it to 4.1 yet.

Using builds from master , I am able to see the events being generated when 
creating account and for many other activities like starting Vms , creating 
firewall rules:

| 94 | 7683e89f-2dc8-46a8-bb8e-4acf0c0bff53 | ACCOUNT.CREATE| 
Completed | Successfully completed creating Account. Account Name: sangee, 
Domain Id:1|   2 |  1 | 1 | 2013-03-21 05:24:45 | 
INFO  |0 | NULL   |0 |


-Thanks
Sangeetha

-Original Message-
From: Murali Reddy [mailto:murali.re...@citrix.com] 
Sent: Wednesday, March 20, 2013 7:18 AM
To: Kelven Yang; cloudstack-dev@incubator.apache.org
Subject: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and 
optimize @DB lookup with caching


Kelven, I see that you fixed action event issue in below commit. But I am still 
running into some issues. While working on CLOUDSTACK-1673 I noticed that in 
case of AccountManagerImpl, there are multiple methods with same name. So in 
that case getAnnotation on the method is returning null even though there is 
ActionEvent annotation. If I rename method then action event annotation works 
fine. You can repro it by creating user (there are two createUser methods in 
AccountManagerImpl). I looked at ComponentMethodProxyCache to see if I can 
figure the problem but with no luck. If you get a chance please try once.

On 19/03/13 6:44 AM, kelv...@apache.org kelv...@apache.org wrote:

Updated Branches:
  refs/heads/master d9b85e397 - fb94b7221


CLOUDSTACK-1568,CLOUDSTACK-1664: Fix ActionEvent interception and 
optimize @DB lookup with caching


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fb94
b72
2
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fb94b7
22
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fb94b7
22

Branch: refs/heads/master
Commit: fb94b72213bf96f2878b90260067f61629c6a956
Parents: d9b85e3
Author: Kelven Yang kelv...@gmail.com
Authored: Mon Mar 18 18:05:09 2013 -0700
Committer: Kelven Yang kelv...@gmail.com
Committed: Mon Mar 18 18:07:52 2013 -0700

--
 .../com/cloud/event/ActionEventInterceptor.java|   15 ++-
 .../ConsoleProxyHttpHandlerHelper.java |   14 ++-
 .../utils/component/ComponentMethodProxyCache.java |   90 +++
 .../utils/component/SpringComponentScanUtils.java  |1 -
 .../cloud/utils/db/TransactionContextBuilder.java  |   14 +--
 5 files changed, 119 insertions(+), 15 deletions(-)
--




Re: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and optimize @DB lookup with caching

2013-03-20 Thread Chip Childers
On Wed, Mar 20, 2013 at 03:31:05PM -0700, Sangeetha Hariharan wrote:
 Murali,
 
 Fix for CLOUDSTACK-1664 has not made it to 4.1 yet.

It is there in 4.1 now.


RE: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and optimize @DB lookup with caching

2013-03-20 Thread Sangeetha Hariharan
Yes Murali. We do NOT see any event being generated when creating user.

But updating a user , generates an event.

| 187 | 9411dc27-a7bd-4f51-ab80-f781674111e1 | USER.UPDATE   | 
Completed | Successfully completed updating User. UserId: 4 
|   2 |  3 | 1 | 2013-03-21 08:08:53 | INFO 
 |0 | NULL   |0 |

-Thanks
Sangeetha

-Original Message-
From: Murali Reddy 
Sent: Wednesday, March 20, 2013 5:50 PM
To: cloudstack-dev@incubator.apache.org; Kelven Yang; Sangeetha Hariharan
Subject: Re: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception and 
optimize @DB lookup with caching

As I mentioned, this is case with particular actions only. For e.g please check 
crete user generates event?

On 21/03/13 4:01 AM, Sangeetha Hariharan
sangeetha.hariha...@citrix.com wrote:

Murali,

Fix for CLOUDSTACK-1664 has not made it to 4.1 yet.

Using builds from master , I am able to see the events being generated 
when creating account and for many other activities like starting Vms , 
creating firewall rules:

| 94 | 7683e89f-2dc8-46a8-bb8e-4acf0c0bff53 | ACCOUNT.CREATE|
Completed | Successfully completed creating Account. Account Name:
sangee, Domain Id:1|   2 |  1 | 1 |
2013-03-21 05:24:45 | INFO  |0 | NULL   |0 |


-Thanks
Sangeetha

-Original Message-
From: Murali Reddy [mailto:murali.re...@citrix.com]
Sent: Wednesday, March 20, 2013 7:18 AM
To: Kelven Yang; cloudstack-dev@incubator.apache.org
Subject: CLOUDSTACK-1568, CLOUDSTACK-1664: Fix ActionEvent interception 
and optimize @DB lookup with caching


Kelven, I see that you fixed action event issue in below commit. But I 
am still running into some issues. While working on CLOUDSTACK-1673 I 
noticed that in case of AccountManagerImpl, there are multiple methods 
with same name. So in that case getAnnotation on the method is 
returning null even though there is ActionEvent annotation. If I rename 
method then action event annotation works fine. You can repro it by 
creating user (there are two createUser methods in AccountManagerImpl). 
I looked at ComponentMethodProxyCache to see if I can figure the 
problem but with no luck. If you get a chance please try once.

On 19/03/13 6:44 AM, kelv...@apache.org kelv...@apache.org wrote:

Updated Branches:
  refs/heads/master d9b85e397 - fb94b7221


CLOUDSTACK-1568,CLOUDSTACK-1664: Fix ActionEvent interception and 
optimize @DB lookup with caching


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fb9
4
b72
2
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fb94b
7
22
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fb94b
7
22

Branch: refs/heads/master
Commit: fb94b72213bf96f2878b90260067f61629c6a956
Parents: d9b85e3
Author: Kelven Yang kelv...@gmail.com
Authored: Mon Mar 18 18:05:09 2013 -0700
Committer: Kelven Yang kelv...@gmail.com
Committed: Mon Mar 18 18:07:52 2013 -0700

--
 .../com/cloud/event/ActionEventInterceptor.java|   15 ++-
 .../ConsoleProxyHttpHandlerHelper.java |   14 ++-
 .../utils/component/ComponentMethodProxyCache.java |   90
+++
 .../utils/component/SpringComponentScanUtils.java  |1 -
 .../cloud/utils/db/TransactionContextBuilder.java  |   14 +--
 5 files changed, 119 insertions(+), 15 deletions(-)
--