<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="localUserpointsPositionService"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" value="${userpoints.api.serviceUrl}" />
<property name="serviceInterface"
value="${userpoints.api.interface.service}" />
<property name="httpInvokerRequestExecutor">
<ref bean="httpInvokerRequestExecutor" />
</property>
</bean>
<bean id="httpInvokerRequestExecutor"
class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor">
<property name="httpClient">
<bean class="org.apache.commons.httpclient.HttpClient">
<property name="connectionTimeout" value="${commons.httpclient.connectionTimeout}" />
<property name="timeout" value="${commons.httpclient.timeout}" />
<property name="httpConnectionManager">
<ref bean="multiThreadedHttpConnectionManager" />
</property>
</bean>
</property>
</bean>
<bean id="multiThreadedHttpConnectionManager"
class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
<property name="params">
<bean
class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
<property name="maxTotalConnections" value="${httpclient.params.maxTotalConnections}" />
<property name="defaultMaxConnectionsPerHost" value="${httpclient.params.defaultMaxConnectionsPerHost}" />
</bean>
</property>
</bean>
</beans>
Spring中RPC远程调用配置
最新推荐文章于 2024-05-06 11:04:04 发布