[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-29 Thread [EMAIL PROTECTED]
Hello, JBoss AOP is a dynamic weaver because it allows you to weave in and out aspects at runtime. How it does this behind the scenes depends on the mode you run it: -no hotswap (regardless of whether you use aopc or loadtime weaving) it will add calls to empty invocations at the points you hav

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-29 Thread aquatr7
Hello, What is the difference between using a dynamic Weaver and an other static weaver since in both cases the application must be restarted to take account of changes made during the execution? For example, for an Internet application containing aspects woven with JBossAOP, is that the applica

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread [EMAIL PROTECTED]
Take a look at https://svn.jboss.org/repos/jbossas/projects/aop/branches/Branch_2_0/aop/src/test/org/jboss/test/aop/dynamicgenadvisor/DynamicTester.java It uses the aop xml found at https://svn.jboss.org/repos/jbossas/projects/aop/branches/Branch_2_0/aop/src/resources/test/dynamicgenadvisor/jbos

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread aquatr7
Hello, The main idea of my researches that I want to have an application where here security rules are implemented through aspects of JBossAOP, this application must to be always running and I want to be able to "add, change and delete aspects at runtime without having to stop the running and th

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread [EMAIL PROTECTED]
Well, if POJO is being intercepted by SimpleInterceptor, the jboss-aop.xml file is being loaded. What do you mean with modifying SimpleInterceptor by InstanceInterceptor? You can only modify something through the code, like below: public static void main(String[] args) throws Exception |{

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread aquatr7
Hi, I want to add that for anonymous wrote : I run the application and before the end of the "for" loop I modified "SimpleInterceptor" by "InstanceInterceptor". that it still intercepting "SimpleInterceptor" and don't take account of the modification to "InstanceInterceptor". Tanks a lot for th

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread aquatr7
Here is the content of the "jboss-aop.xml" file: | | | In "execute" method I have deleted Per instance interception | Advised advised = (Advised)pojo; | advised._getInstanceAdvisor().insertInterceptor(new InstanceInterceptor()); | System.out.println("-

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread [EMAIL PROTECTED]
Hi! Now something else occurred to me. Have you added the jboss-aop.xml file at the classpath? If it did, this is the problem. Instead, you must configure the property jboss.aop.path, pointing it to the location of the jboss-aop.xml file in your system. Or, you can add to your classpath a direc

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread aquatr7
Hello, I have added all the files of the classes and the file "jboss-aop.xml" before starting the application (they are compiled). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185193#4185193 Reply to the post : http://www.jboss.com/index.html?module=bb&op

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread [EMAIL PROTECTED]
anonymous wrote : Adding a jboss-aop.xml file at runtime won't take effect. I mean that adding a jboss-aop.xml file to classpath at runtime won't take effect. You can, however, load the xml file with org.jboss.aop.AspectXMLLoader.deployXML(URL). View the original post : http://www.jboss.com/in

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread [EMAIL PROTECTED]
Just to confirm that we are on the same page. Have you compiled your java files after editing them? And restarted your application? Notice that there is no such thing as hot deployment on standalone applications. Adding a jboss-aop.xml file at runtime won't take effect. View the original post :

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-28 Thread aquatr7
Hello, I want to add that I have copied "java" files in the "src" folder: - ConstructorInterceptor.java - Driver.java - InstanceInterceptor.java - POJO.java - SimpleInterceptor.java and I added in the classpath the file "jboss-aop.xml". Then I have made the modifications t

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-27 Thread aquatr7
Hello, I tried the example below, but the HotSwapping doesn't work, even the example "dynamic aop" where I change it by adding the loop "for" for the first call to "execute", then I changed "SimpleInterceptor" by an other interceptor before the end of the loop "for": |public static void m

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-27 Thread [EMAIL PROTECTED]
Yes, that's the idea, as long as you have "prepared" BuyerMAg.imprimer(). However, you will end up with 1 instances of the interceptor at the end of the loop. To see any interceptions you need to call the method as well. View the original post : http://www.jboss.com/index.html?module=bb&op=

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-27 Thread aquatr7
Hello, I mean that when the application is running in the "for" loop and before the end of this loop, I change in the code "InterceptorInterdImp" by "InterceptorInterdImp2", the method "affichage" that call "imprimer" will be able or not to run "InterceptorInterdImp2" without to have to re-run

[jboss-user] [JBoss AOP] - Re: The use of Hotswapping

2008-10-27 Thread [EMAIL PROTECTED]
I don't understand the question? The changes will only take effect when the application is running. Try it out View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184838#4184838 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p