I'm trying to use AOP inside JBoss AS 4.0.5.GA but to no avail.

I've downloaded and installed the latest version of JBossAOP and: 
-Deleted existing jboss-aop.deployer from the deploy folder
-Copied over the jboss-aop-jdk50.deployer to the deploy folder 
-added pluggable-instrumentor.jar to the bin folder
-added -javaagent:pluggable-instrumentor.jar to JAVA_OPTS
-Using JDK/JRE 1.5.0 update 11

My jboss-service.xml for aop.deployer is the following:


  |    <mbean code="org.jboss.aop.deployment.AspectManagerServiceJDK5"
  |       name="jboss.aop:service=AspectManager">
  |       <attribute name="EnableLoadtimeWeaving">true</attribute>
  |       <attribute name="SuppressTransformationErrors">true</attribute>
  |       <attribute name="Prune">true</attribute>
  |       <attribute name="Include">org.jboss.test, 
org.jboss.injbossaop</attribute>
  |       <attribute name="Exclude">org.jboss.</attribute>
  |       <!-- This avoids instrumentation of hibernate cglib enhanced proxies
  |       <attribute name="Ignore">*$$EnhancerByCGLIB$$*</attribute> -->
  |       <attribute name="Optimized">true</attribute>
  |       <attribute name="Verbose">false</attribute>
  |    </mbean>
  | 
  |    <mbean code="org.jboss.aop.deployment.AspectDeployer"
  |       name="jboss.aop:service=AspectDeployer">
  |    </mbean>
  | 
  | </server>
  | 

My jboss-aop.xml is:


  | <aop>
  |     <aspect class="org.lg.eapp.aop.AOPLoggingAspect" scope="PER_VM"/>
  |     <bind pointcut="execution(public 
org.lg.eapp.web.Handlers.ResponseHandler 
org.lg.eapp.web.Controller.Login->ProccessRequest(javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse))">
  |         <advice aspect="org.lg.eapp.aop.AOPLoggingAspect" name="log"/>
  |     </bind>
  | </aop>
  | 
and is located in aspects.aop/META-INF/

my application.xml is:


  | <application>
  |     <module>
  |             <java>aspects.aop</java>
  |     </module>
  |     <module>
  |             <java>support.jar</java>
  |     </module>
  |     <module>
  |             <ejb>ejbs.jar</ejb>
  |     </module>
  |     <module>
  |         <web>
  |             <web-uri>webapp.war</web-uri>
  |             <context-root>eapp</context-root>
  |         </web>
  |     </module>
  | </application>
  | 

and finally my jboss-app.xml is:


  | <jboss-app>
  |    <loader-repository>eapp:loader=eapp.ear</loader-repository>
  |    <module>
  |       <har>hibernate.har</har>
  |    </module>
  | </jboss-app>
  | 

I should note that I'm using isolated class-loading, so my UseJBossWebLoader 
attribute in the Tomcat service conf. is "false".

However, When the "ProccessRequest" method is called in the Login Servlet (as 
defined in the jboss-aop.xml above), nothing happens(there should be a console 
message saying "Hello AOP!"). No errors, no info. Nothing. The only thing I did 
notice, is a measurable slowdown when using the -javaagent option.

Any help will be much appreciated. Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037521#4037521

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037521
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to