Results 1 to 2 of 2

Thread: No message logged for CustomTraceInterceptor

  1. #1
    Join Date
    Sep 2005
    Posts
    6

    Default No message logged for CustomTraceInterceptor

    I have included a custom MethodInterceptor and CustomTraceInterceptor in my servlet.xml. The custom MethodInterceptor extends the MethodInterceptor.

    The custom MethodInterceptor is working fine but the CustomTraceInterceptor does not. I am not sure what is missing.

    My configuration is as follows:

    <bean id="customTraceInterceptor" class="org.springframework.aop.interceptor.Customi zableTraceInterceptor">
    <property name="useDynamicLogger" value="true" />
    </bean>

    <bean id="customInterceptor" class="base.aop.interceptor.CustomMethodIntercepto r"></bean>


    <bean id="txProxyTemplate_JDBC" abstract="true" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
    <property name="transactionManager"><ref bean="jdbcTransactionManager"/></property>
    <property name="transactionAttributes">
    <props>
    <prop key="*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>

    <bean id="bizManagerTarget" parent="txProxyTemplate_JDBC">
    <property name="target">
    <bean class="service.impl.BizManagerImpl">
    <property name="bizDAO"><ref bean="bizDAO"/></property>
    </bean>
    </property>
    <property name="transactionAttributes">
    <props>
    <prop key="*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>


    <bean id="bizManager" class="org.springframework.aop.framework.ProxyFact oryBean">
    <property name="proxyInterfaces">
    <value>service.BizManager</value>
    </property>
    <property name="target">
    <ref local="bizManagerTarget"/>
    </property>
    <property name="interceptorNames">
    <list>
    <value>customInterceptor</value>
    <value>customTraceInterceptor</value>
    </list>
    </property>
    </bean>

  2. #2
    Join Date
    Sep 2005
    Posts
    26

    Default

    In order to see something in the log CustomizableTraceInterceptor checks if logging is enabled. In your case useDynamicLogger is set to true meaning that the logger name used is the name of the class that contains the method being invoked. In your case the class on which the CustomizableTraceInterceptor is looking is actualy the proxy class created by TransactionProxyFactoryBean not the class service.impl.BizManagerImpl and for this class tracing is not enabled.
    To validate the facts above first set useDynamicLogger to false (or remove the property from configuration) and enable tracing for org.springframework.aop.interceptor.CustomizableTr aceInterceptor. In this case CustomizableTraceInterceptor.

Similar Threads

  1. Message Bundle - No Message Found exception
    By arumugamkasi in forum Web
    Replies: 18
    Last Post: Jun 20th, 2011, 04:24 AM
  2. UpgradeAcegi Security System from 0.6.1 to 0.8.3
    By mannobug in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 07:00 PM
  3. How to display message about last action?
    By pir8ped in forum Architecture
    Replies: 8
    Last Post: Jun 6th, 2005, 11:01 AM
  4. Channel and message transformation question
    By Alarmnummer in forum Architecture
    Replies: 12
    Last Post: May 11th, 2005, 05:06 PM
  5. Displaying Error from message resource
    By qtipz4ever in forum Web
    Replies: 3
    Last Post: Mar 16th, 2005, 04:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •