• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

how to configure the cxf interceptor in the spring.xml file

Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a logging framework which will store each request in the db,the interceptor is developed using cxf. How can we configure the
them in the spring.xml

My interceptor files are

<!-- Service Conversation Persistence System -->
   <!-- This thing has a queue that holds conversations -->
   <bean id="requestConversationQueue" class="com.logging.RequestConversationContainer" />
   <!-- This thing gets called on each response and pushes the current conversation onto the queue -->
   <bean id="requestConversationHandler" class="com.logging.RequestConversationAccumulator">
       <constructor-arg index="0" ref="requestConversationQueue" />
   <!-- This thing is run on a scheduled basis and pulls conversations off the queue and stores them in the DB -->
   <bean id="requestConversationPersister" class="com.logging.RequestConversationPersister">
       <constructor-arg index="0" ref="baseDatasource" />
       <constructor-arg index="1" ref="requestConversationQueue" />
   <!-- Here we set up the schedule using Spring's ThreadPoolTaskScheduler -->
   <task:scheduled-tasks scheduler="requestConversationPersisterScheduler">
       <!-- Fixed delay determines how long after the end of the previous task to execute -->
       <task:scheduled ref="requestConversationPersister" method="persistConversations" fixed-delay="5000" />
   <!-- Configure Spring's ThreadPoolTaskScheduler to execute the schedule -->
   <task:scheduler id="requestConversationPersisterScheduler" pool-size="1" />

How to configure these beans here in spring-config.xml

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd

<context:component-scan base-package="com.example.*" />

<mvc:annotation-driven />

<!-- Configures Handler Interceptors -->
<mvc:mapping path="/**"/>


I don't want to use <jaxrs:server>, how can we confignure in the spring-config.xml
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic