etm.contrib.aop.aspectwerkz
Class NamedEtmAspectWerkzAspect

java.lang.Object
  extended by etm.contrib.aop.aspectwerkz.EtmAspectWerkzAspect
      extended by etm.contrib.aop.aspectwerkz.NamedEtmAspectWerkzAspect

public class NamedEtmAspectWerkzAspect
extends EtmAspectWerkzAspect

AspectWerkz aspect that supports method invocations using a common name for all matching joinpoints. This may be helpful for recording exection times for a group of methods such as DB Interactions.

Interally it uses a static EtmMonitor provided by EtmManager.getEtmMonitor().

Example usage that records all method calls of all classes ending with Service using aop.xml.

 <aspect class="etm.contrib.aop.aspectwerkz.EtmAspectWerkzAspect" deployment-model="perClass">
  <pointcut name="monitorServices" expression="execution(* ..*Service.*(..))    "/>
  <advice name="monitor" type="around" bind-to="monitorServices"/>
  <param name="name" value="ServiceExecution"/>
 </aspect>
 

Version:
$Revision: 109 $
Author:
void.fm

Field Summary
 
Fields inherited from class etm.contrib.aop.aspectwerkz.EtmAspectWerkzAspect
etmMonitor
 
Constructor Summary
NamedEtmAspectWerkzAspect(org.codehaus.aspectwerkz.AspectContext aContext)
           
 
Method Summary
 java.lang.Object monitor(org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint joinPoint)
           
 
Methods inherited from class etm.contrib.aop.aspectwerkz.EtmAspectWerkzAspect
alterNamePostException, calculateName, calculateShortName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedEtmAspectWerkzAspect

public NamedEtmAspectWerkzAspect(org.codehaus.aspectwerkz.AspectContext aContext)
Method Detail

monitor

public java.lang.Object monitor(org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint joinPoint)
                         throws java.lang.Throwable
Overrides:
monitor in class EtmAspectWerkzAspect
Throws:
java.lang.Throwable


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.