Here is what I know about enhancer:

Enhancer is a term in cglib, an enhancer is a subclass of original class which 
'enhances' its functionality
In Cloudstack, enhancer (and interceptor) is used to implement aspect-oriented 
features, e.g, transaction, events framework..
Classes that implement ComponentMethodInterceptable are actually instantiated 
with their enhancers

You can check com.cloud.utils.component.ComponentInstantiationPostProcessor for 
details about how enhancer co-work with method interceptors.

And for interceptors:
ActionEventInterceptor : implement annotation-based event framework
TransactionContextBuilder: implement annotation-based transaction


Regards
Mice

-----Original Message-----
From: Mike Tutkowski [mailto:mike.tutkow...@solidfire.com] 
Sent: Thursday, May 09, 2013 12:37 PM
To: dev@cloudstack.apache.org
Subject: "_Enhancer" Question

Hi,

I was wondering if someone could explain to me the "_Enhancer" pattern we are 
using in CloudStack (below) and how this kind of class is created.

class
org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator_EnhancerByCloudStack_4ff7ea3a

Thanks!

--
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Reply via email to