• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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" />
   </bean>
   <!-- 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" />
   </bean>
   <!-- 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" />
   </task:scheduled-tasks>
   <!-- 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"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:util="http://www.springframework.org/schema/util"
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
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">

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

<mvc:annotation-driven />

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

</mvc:interceptors>

I don't want to use <jaxrs:server>, how can we confignure in the spring-config.xml
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic