Skip to content

Instantly share code, notes, and snippets.

@alexiuscrow
Last active October 16, 2017 17:09
Show Gist options
  • Save alexiuscrow/b5ceb2df7d652a77cd788454e0792211 to your computer and use it in GitHub Desktop.
Save alexiuscrow/b5ceb2df7d652a77cd788454e0792211 to your computer and use it in GitHub Desktop.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath:applicationContext-dataSource.xml"/>
<bean class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
<property name="locations">
<list>
<value>classpath:version.properties</value>
</list>
</property>
</bean>
<jaxws:endpoint id="myWebServiceCXFBasic" implementor="#myWebService" address="/basic" publishedEndpointUrl="${ws.my.url}">
<jaxws:outInterceptors>
<bean class="my.pkg.ws.cxf.http.MyOutInterceptor"/>
</jaxws:outInterceptors>
<jaxws:dataBinding>
<ref bean="aegisDatabinding"/>
</jaxws:dataBinding>
</jaxws:endpoint>
<bean id="aegisDatabinding" class="org.apache.cxf.aegis.databinding.AegisDatabinding">
<property name="configuration" ref="typeCreationOptions"/>
</bean>
<bean id="typeCreationOptions" class="org.apache.cxf.aegis.type.TypeCreationOptions"/>
<bean id="myWebService"
class="my.pkg.ws.cxf.MyWebServiceCXF" destroy-method="destroy" init-method="init">
</bean>
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<context:annotation-config/>
<aop:aspectj-autoproxy/>
<tx:annotation-driven transaction-manager="txManager"/>
<bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler">
<property name="managedMethods">
<list>
<value>getNumActive</value>
<value>getMaxActive</value>
<value>getNumIdle</value>
<value>getMaxIdle</value>
<value>getMaxWait</value>
<value>getInitialSize</value>
</list>
</property>
</bean>
</property>
<property name="beans">
<map>
<entry key="DBCP:name=jdbc/my.ws.cxf" value-ref="dataSource"/>
</map>
</property>
<property name="server" ref="mbeanServer" />
</bean>
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment