1 Reply Latest reply on Mar 27, 2004 10:00 AM by Bill Burke

    Dynamic AOP-logging

    tonig Newbie

      Hello,

      i have an J2EE Application where the software modules communicate via JMS. I need to log alle the JMS traffic. My idea was to write a MessageDriven Bean for every topic and give that information to the logger-bean. I choosed that way because i could easyli change the log-level, by hot-deploying the logger Bean (it has some rules in it).

      But at the CeBit i've heard that JBoss supports dynamic AOP.
      So i could write my some Interceptors (1 per log-level) and some pointcuts. And on that way i could change the log level or the pointcuts while the programm is running.

      Is that true? Is that at the moment with the JBoss 4.0 possible? Do i need to download AspectJ or is that already in JBoss? And did i understand that right that i have do define the pointcuts in the descriptor?

      Thank ya.

        • 1. Re: Dynamic AOP-logging
          Bill Burke Master

          There are multiple ways to do this.
          1) just use log4j filters and logging levels. You can change this at runtime by modifying log4j.xml in the conf directory and JBoss should pick up the changes
          2) Write an Message Drivent Bean interceptor. This is available in JBoss 3.2 or even JBoss 3.0.

          Sounds like you just want to log messages that are posted to the Topic, correct? What you are doing sounds like the right solution.

          Bill

          P.S. Sorry for the late response, I have been away from email and web for 10 days.