cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: CXF and JAMON integration?
Date Mon, 30 Mar 2009 16:08:20 GMT

Found the solution: Spring has a JamonPerformanceMonitorInteceptor you can easily wire into
your web services beans as follows.

This is an Aspect Oriented Programming (AOP) solution that works great. For every method call
in my bean we get stats like hits, execution time, min and max time, and etc.

This is a very good use of AOP and an easy implementation. Thanks Spring!!!

      <!-- BEANS -->
      <bean id="serviceBean" class="" />

      <!-- wire the Advice -->

      <bean id="jamonInterceptor"



      <!-- wire the PointCut -->

      <bean id="jamonPointcut"


            <property name="advice">

                  <ref local="jamonInterceptor" />


            <property name="patterns">






   <!-- wire the Bean and the PointCut together -->

      <bean id="jamonProxyCreator"


            <property name="beanNames">



            <property name="interceptorNames">






-----Original Message-----
From: []
Sent: Wednesday, March 25, 2009 2:29 PM
Subject: CXF and JAMON integration?

Has anyone integrated CXF and JAMon ( successfully? I would
like to track web service hits using JAMon but I don't know where to *centralize* the code.
We are converting an existing XML over HTTP app to SOAP using CXF. In the current app we have
a central point of control in our Servlet ( every call goes through this servlet ) so we trap
it there and log the hit in JAMon. We know which request handlers are hit and how long it
takes to respond. With SOAP and CXF the stack (CXFServlet) is the central point of control
and I don't know where to trap the calls and the duration. I am pretty sure it will be in
an *interceptor* but which one?

When I dump the inbound SOAP message I see the <Action> element in the log. But when
I try get at this <Action> element programmatically I only get "".

<Action xmlns=""></Action>

Any thought are greatly appreciated.

What I did:

I created a "StatisticsInterceptor" that extends SoapActionInInterceptor

In the handleMessage(SoapMessage message) method I tried to get a the SOAP_ACTION and I get
and empty string including the quotes.

StatisticsInterceptor:75 - SOAP_ACTION [""]

         Map<String, List<String>> headers =


               ( Map ) message.get( Message.PROTOCOL_HEADERS ) );

         List<String> sa =


         for ( String s : sa )


             logger.debug("SOAP_ACTION [" + s + "]");


Jeffrey M. Constantin | Cox Communications Inc.

Data Product Services (DPS) | Architecture & Systems Integration (ASI)

Desk: 404-269-3111 | Mobile: 678.643.6528

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message