Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »


The purpose of this aspect is to allow you to easily expose your objects as JMX mbeans.


In order to be able to use this aspect, you need to define two pointcuts: one specifying which classes to transform (named mbeansClasses) as DynamicMBean and NotificationEmitter and another one (named mbeansToRegister) indicating when should the registration of your objects as managed beans should be done.
Usually you use a class_ pointcut for mbeansClasses and a method pointcut for mbeansToRegister in order to intercept constructor calls to the classes you picked in mbeansClasses.

Classes you would like to weave need a XML file describing the JMX constructors, operations, attributes and notifications you'd like to expose. This aspect for each class weaved (let's say class looks for a resource named with the name of the class suffixed by -mbean.xml (so C-mbean.xml for example) in the same package (so as the one of the class.

Here is a sample definition file:

Here is a sample _aspectwerkz.xml_ file:

  • No labels