<?xml version="1.0" encoding="UTF-8"?>

<!--
    Aspect  Deployer
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">

	<!-- 
		Valid values for the AspectManager bean for use with enableTransformer=true are:
		* org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
		* org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
	-->
   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
      <property name="enableLoadtimeWeaving">false</property>
      <!-- only relevant when EnableLoadtimeWeaving is true.
           When transformer is on, every loaded class gets
           transformed.  If AOP can't find the class, then it
           throws an exception.  Sometimes, classes may not have
           all the classes they reference.  So, the Suppressing
           is needed.  (i.e. Jboss cache in the default configuration -->
      <property name="suppressTransformationErrors">true</property>
      <property name="prune">true</property>
      <property name="include">org.jboss.test, org.jboss.injbossaop, org.jboss.cache.jmx, org.jboss.cache.pojo.jmx, org.jboss.ha, org.jboss.invocation</property>
      <property name="exclude">org.jboss.</property>
      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
      <property name="optimized">true</property>
      <property name="verbose">false</property>
      <!--
         Available choices for this attribute are:
            org.jboss.aop.instrument.ClassicInstrumentor (default)
            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
      -->
   </bean>



   <!-- Aspect Deployment -->
   <bean name="AspectDeployer" class="org.jboss.aop.deployers.AspectDeployer">
      <install bean="MainDeployer" method="addDeployer">
         <parameter><this/></parameter>
      </install>
      <uninstall bean="MainDeployer" method="removeDeployer">
         <parameter><this/></parameter>
      </uninstall>
      <depends>AspectManager</depends>
   </bean>
</deployment>
