【发布时间】:2016-09-12 11:10:33
【问题描述】:
我正在使用 CXF 3.0.6
我正在使用 ProducerTemplate 调用路由
我的骆驼上下文中有一个如下的 cxf 端点..(TEST_ENDPOINT 是一个实际的端点)
<route id="invokePostRestService">
<from uri="direct:invokeWS" />
<log message=" ${body}" />
<to uri="cxf://{{TEST_ENDPOINT}}?dataFormat=payload&loggingFeatureEnabled=true" />
<log message=" ${body}" />
</route>
<http-conf:conduit name="*.http-conduit">
<http-conf:client ConnectionTimeout="30000"
ReceiveTimeout="30000" MaxRetransmits="1"
AllowChunking="false" />
</http-conf:conduit>
<bean id="systemProps"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
<property name="arguments">
<util:properties>
<prop key="http.maxConnections">11</prop>
</util:properties>
</property>
</bean>
我认为 CXF 日志记录以某种方式干扰了 Jetty/resources/log4j.xml 中的 log4j.xml,当我在 log4j.xml 中将日志记录级别设置为 ERROR 时,我看到 CLOSE_WAIT 堆积并且 http.maxConnections 超过 100+ (事实上它只有 11 个,已配置)
当我在 log4j.xml 中将日志记录模式设置为 INFO 时,一切都按预期工作,并且 http.maxConnections 为 11!这是预期的,没有 close_waits !
调试后,我看到“org.apache.camel.processor.interceptor.BacklogDebugger”中的日志记录级别为 INFO,尽管 log4j.xml 中有错误,这可能是导致此问题的原因吗?
感谢任何帮助...
【问题讨论】:
标签: java web-services logging apache-camel cxf