4 Replies Latest reply on Aug 8, 2007 2:37 PM by timfox

    persisting messages for audit

    lpiccoli

      hi all,

      i am attempting to persist messages for audit purposes. By audit i mean provide ability to resolve disputes over what has been sent and by whom.

      So far i have not seen a elegant mechanism to acheive this.
      I was hoping for a interceptor that could be added to persist the message in the audit format. I havnt found any docs to explain the interceptor framework in jboss messaging.

      Firstly is an interceptor is the correct mechanism for this task?
      If so a pointer to interceptor docs would be appreciated.
      If no then any advise would be welcome.


      thanks

      -lp

        • 1. Re: persisting messages for audit
          lpiccoli

          after further digging i have found the use of AOP within messaging.

          Particularly the following pointcut on the producer send. It looks like what i need.





          does seem to be the correct place to define custom audit functionality?


          -lp

          • 2. Re: persisting messages for audit
            timfox

            Yes you could add your own interceptor (aspecy) on the server aop stack.

            Take a look at the aspects that already exist e.g. SecurityAspect for an idea of how to do this.

            • 3. Re: persisting messages for audit
              lpiccoli

              ok so i can use the following conf to add an audit aspect.

              <bind pointcut="execution(* org.jboss.jms.server.endpoint.advised.SessionAdvised->send(..))">
               <advice name="auditMessage" aspect="org.jboss.jms.server.container.AuditAspect"/>
               </bind>
              


              now i guess this is system wide and not configurable to an individual queue basis.

              I would like some reassurance that this is indeed the most useful mechanism to audit the messageQ.

              thanks

              -lp


              • 4. Re: persisting messages for audit
                timfox

                But you can inspect the parameters to get the destination.