Easy AOP deployments with AspectJ

Just the other day, I had to deploy some AspectJ code to an app server. I was prepared to go through the usual hoops to get the aspects to deploy properly. Like AspectWerkz and JBoss AOP, you would normally have to put the runtime libraries in the system class path, set some kind of property so that it could find the aspects, ect. With AspectJ, it’s very simple: compile your code with AJC, pack it all up in an EAR along with the aspectjrt.jar and your done. With AspectJ, there are no system classpath mods needed, no special properties, just nice and simple. I like that.

Advertisement

4 thoughts on “Easy AOP deployments with AspectJ

  1. hi,

    I’m trying to use aspectJ in jboss3.2. I know you recommend against this because JbossAOP is pre-integrated, but I greatly prefer the syntactical model of aspectJ.

    I’ve compiled my code with AJC, and packed it into an ear with aspectjrt.jar, and deployed this into jboss3.2. For some reason, the aspect code is never invoked — the objects run just fine, but never trigger the advice.

    I’d be grateful for a pointer.

    thanks,
    fawce

    Like

  2. hi,

    I’m trying to use aspectJ in jboss3.2. I know you recommend against this because JbossAOP is pre-integrated, but I greatly prefer the syntactical model of aspectJ.

    I’ve compiled my code with AJC, and packed it into an ear with aspectjrt.jar, and deployed this into jboss3.2. For some reason, the aspect code is never invoked — the objects run just fine, but never trigger the advice.

    I’d be grateful for a pointer.

    thanks,
    fawce

    Like

Comments are closed.