4 Replies Latest reply on Nov 21, 2005 8:23 AM by rmcdonough

    AOP and sun classes ..

    arnaud74130

      Hi all,

      Is it possible to add "introductions" to java.awt.Component ?
      I did a simple "introductions" example with mixin on a POJO class and I works, but when I try to add new methods to java.awt.Component in the same way (mixin) it doesn't work ?

      thanks for help

      arnaud

        • 1. Re: AOP and sun classes ..
          arnaud74130

          is it possible that jboss aop works at runtime ?, because it seems that it cannot add "introductions or mixin" to my java.awt.Component because the toolkit is already loaded ... so if there is a dynamic mode maybe it will be possible ?

          • 2. Re: AOP and sun classes ..
            kabirkhan

            Hi,

            We do not allow for instrumentation of system classes, i.e. stuff under

            javax.*
            java.*
            sun.*
            com.sun.*

            etc.

            • 3. Re: AOP and sun classes ..
              arnaud74130

              thanks for answer,

              Do you know if it is possible with other Aspect toolkit ?

              arnaud

              • 4. Re: AOP and sun classes ..
                rmcdonough

                AspectJ does not seem to explicitly prevent you from doing this, but it doesn't seem to work either. But even if you could get this to work, you're going to run into some serious deployment problems. You're messing with the JDK classes, whose byte-code must be reachable by the aspect compiler or weaver, and then deployed on the client side. If you're compiling your aspects, this sounds like it would get messy. There maybe other ways doing what you want however.