1 Reply Latest reply on Jun 28, 2005 3:17 PM by kabirkhan

    injboss example in JBoss 4.0.3RC1

    vestergaard

      I have trouble getting the "injboss" example to work on JBoss 4.0.3RC1.
      I have set EnableLoadtimeWeaving to true in
      jboss403RC1\server\all\deploy\jboss-aop-jdk50.deployer\META-INF\jboss-service.xml

      And I have tried adding the -javaagent:pluggable-instrumentor.jar to run.bat after adding the file to "bin" directory.

      It worked like that under 4.0.2 with JBoss AOP 1.1.2 with JDK 1.5

      has the method to enable loadtime weaving been changed?

      I can see that in jboss-aop-jdk50.deployer\META-INF\jboss-service.xml there are a new property "include" should I use that?

        • 1. Re: injboss example in JBoss 4.0.3RC1
          kabirkhan

          Update the jboss-aop-jdk50.deployer to use the AspectManagerServiceJDK5 since this is what recognises the -javaagent stuff.

          The Include/Exclude attributes have been added to help speed up the weaving. Anything in "Exclude" that is not expilcitly allowed in "Include" is not weaved. So basically anything under org.jboss is disallowed. If you modify your "Include" to contain org.jboss.injbossaop you should be OK (THe list is comma separated)

           <mbean code="org.jboss.aop.deployment.AspectManagerServiceJDK5"
           name="jboss.aop:service=AspectManager">
           <attribute name="EnableLoadtimeWeaving">false</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</attribute>
           <attribute name="Exclude">org.jboss.</attribute>
           <attribute name="Optimized">true</attribute>
           <attribute name="Verbose">false</attribute>
           </mbean>