1 Reply Latest reply on Mar 31, 2004 5:48 PM by bill.burke

    Persistence of AspectManager modifications

    rkadayam

      Before posing my main questions.

      I noticed an "AdviceFactory" and "InterceptorFactory" in the api docs. My understanding would be advices are methods of aspects and interceptors are individual classes that pretty much do all of the advising, correct?

      I'm hoping the concept of "interceptor classes" will not disappear someday to be replaced by "aspect" classes, correct? Because AspectWerkz 0.10 RC1 did just that, they are more closer to attributes than declarative syntax of advices (or interceptors).

      Now to do some justice to the subject message.

      Has anyone given any thought to "persisting" the changes that are applied on the AspectManager during run-time? It would be really nice if I can generate the aop-xml file again. This could be done during the shutdown or something to either overwrite the existing xml or write back to a new file.

      Also is the xml file read once during startup or is it constantly monitored at run-time? Can I start without any aop-xml file and supply the xml contents at run-time? Can I have multiple aop-xml files?

      Sorry for being so inquisitive. Thanks for your time.
      Rajiv

        • 1. Re: Persistence of AspectManager modifications
          bill.burke

           

          "rkadayam" wrote:
          Before posing my main questions.

          I noticed an "AdviceFactory" and "InterceptorFactory" in the api docs. My understanding would be advices are methods of aspects and interceptors are individual classes that pretty much do all of the advising, correct?


          Correct.

          "rkadayam" wrote:

          I'm hoping the concept of "interceptor classes" will not disappear someday to be replaced by "aspect" classes, correct? Because AspectWerkz 0.10 RC1 did just that, they are more closer to attributes than declarative syntax of advices (or interceptors).


          No, it will not go away for a few reasons. One, the framework depends on it for things like CFlow and interceptors are a tiny bit faster than advices.

          "rkadayam" wrote:

          Now to do some justice to the subject message.

          Has anyone given any thought to "persisting" the changes that are applied on the AspectManager during run-time? It would be really nice if I can generate the aop-xml file again. This could be done during the shutdown or something to either overwrite the existing xml or write back to a new file.


          This is an ongoing issue with the entire JBoss application server. If you are familiar with our application server and JMX, you notice that changes you make at runtime cannot be reflected in the XML deployment descriptors. This would be hard to implement and change.

          What about writing your own deployer? The deployer could persist bindings and load them at runtime. Take a look at jboss-head/aspects/src/main/org/jboss/aop/deployer for an example.


          "rkadayam" wrote:

          Also is the xml file read once during startup or is it constantly monitored at run-time? Can I start without any aop-xml file and supply the xml contents at run-time? Can I have multiple aop-xml files?

          Sorry for being so inquisitive. Thanks for your time.
          Rajiv


          Inquisitive is good!

          Ok, hot deployment is only available when running inside the application server. You can run a stripped down version of the application server (this is our microkernel), but standalone JBoss AOP does not support hot deployment of XML files.

          So, running inside application server
          XML files put in the deploy directory are monitored at runtime. If you modify them, then they will hot deployed and advice/interceptors will be rebound. This should be a threadsafe operation. Also, if you package up your aspects within a foobar.aop jar file and put jboss-aop.xml in the META-INF directory, you can also hotdeploy these files.

          Sounds like you are building some tools? If you have anything interesting, send it to me offline (bill@jboss.org) and if it is any good, I'll give you CVS access.

          Bill