Mark DeSpain [http://community.jboss.org/people/markdespain] created the 
discussion

"Stuck trying to get HotSwap weaving going with JBoss AS 6"

To view the discussion, visit: http://community.jboss.org/message/614021#614021

--------------------------------------------------------------
I've been able to get loadtime weaving going, but not hotswap weaving.   I was 
wondering if anyone might be able to help me get over this hurdle.

To prepare the environment for HotSwap, I've tried going the following
1. In *$JBOSS_HOME/server/all/conf/bootstrap/aop.xml*, set 
*enableLoadtimeWeaving* to true.
2. Placed a copy of the *pluggable-instrumentor.jar* that comes with JBoss AS 6 
into *$JBOSS_HOME/bin*
3. Passed in *-javaagent:pluggable-instrumentor.jar=-hotSwap* as a argument to 
Java.  This was attemped both by passing it in via an Eclipse JVM parameter, 
and by editing *run.conf.bat*.
4. Placed my application's EAR file containing the class to be instrumented 
into the *$JBOSS_HOME/server/all/deploy* directory.
5. Placed a file called *prepare-aop.xml* within 
*$JBOSS_HOME/server/all/deploy*, for the purposes of preparing a class for 
HotSwap AOP.  It just contains the following:

<aop xmlns="urn:jboss:aop-beans:1.0">
 <prepare expr="all(mypackage.MyClass)" />
</aop>


Now, when I start the server, my application gets loaded, I can the URL for 
MyClass, just fine.  However, my hope is that when I place a file called 
*myaspects-aop.xml* into *$JBOSS_HOME/server/all/deploy*, then MyClass would 
automatically get instrumented with the aspect below, which just logs that it 
has been invoked.  However, that is not happening.

<aop xmlns="urn:jboss:aop-beans:1.0">    
          <aspect class="mypackage.MyAspect"  scope="PER_JOINPOINT"> 
          </aspect>
          <bind pointcut="execution( * mypackage.MyClass->*(..) )">
                              <advice aspect="mypackage.MyAspect" />
          </bind>
</aop>

Any insight would be most appreciated!
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/614021#614021]

Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to