Thank you Kabir. I could make the loadtime weaving work. 

I have a related question - for JBoss 4.x/ JDK 5 how to enable hotswap?

I have an ear which is prepared for runtime weaving and a HotSwapAspects.aop 
with the aspects. I deployed the ear first. Now if I access my application 
once, then deploy the .aop, the weaving is not happenning.

But if I deploy both and access the application, then I could see aspect code 
executed. (loadtime weaving???)

I used the following JAVAOPTS in the run.bat? Is this switch correct?

-javaagent:pluggable-instrumentor.jar=-hotSwap

I also changed the MBean config for aop deployer like this

<?xml version="1.0" encoding="UTF-8"?>
  | <!-- $Id: jboss-service.xml,v 1.3.2.5 2005/10/04 07:03:14 kkhan Exp $ -->
  | 
  | <!-- ===================================================================== 
-->
  | <!--  JBoss Server Configuration                                           
-->
  | <!-- ===================================================================== 
-->
  | 
  | <server>
  | 
  |    <!-- The code for the service is different for the different run 
scenarios
  |       *** JBoss 4.0
  |           * JDK 1.4 - org.jboss.aop.deployment.AspectManagerService
  |           * JDK 5 (not using -javaagent switch) - 
org.jboss.aop.deployment.AspectManagerService
  |           * JDK 5 (using -javaagent switch) - 
org.jboss.aop.deployment.AspectManagerServiceJDK5
  |           * BEA JRockit 1.4.2 - 
org.jboss.aop.deployment.AspectManagerService
  |       *** JBoss 3.2
  |           * JDK 1.4 - org.jboss.aop.deployment.AspectManagerService32
  |           * JDK 5 (not using -javaagent switch) - 
org.jboss.aop.deployment.AspectManagerService32
  |           * JDK 5 (using -javaagent switch) - 
org.jboss.aop.deployment.AspectManagerService32JDK5
  |           * BEA JRockit 1.4.2 - 
org.jboss.aop.deployment.AspectManagerService32
  |    -->
  |    <mbean code="org.jboss.aop.deployment.AspectManagerServiceJDK5"
  |       name="jboss.aop:service=AspectManager">
  |       <attribute name="EnableLoadtimeWeaving">true</attribute>
  |       <!-- 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 -->
  |       <attribute name="SuppressTransformationErrors">true</attribute>
  |       <attribute name="Prune">true</attribute>
  |       <attribute name="Include">org.jboss.test, 
org.jboss.injbossaop,nita.ejb,nita.web</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>
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918441


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to