Issue #1189: Remove camel http header copy overhead

Change-Id: I00dcf2d41972359b36c7485425f61cb6fc74759a

Former-commit-id: dc724d0b01 [formerly 59b12a2eaa] [formerly bc28c38ef4] [formerly 85c2977c00 [formerly bc28c38ef4 [formerly 4818be92cdeb4bc9a4064f59d2c4a773aca5f1aa]]]
Former-commit-id: 85c2977c00
Former-commit-id: 1bc903727f196bf47440f4f26981da59cdf7f9d9 [formerly 210a8734f5]
Former-commit-id: 8141fe33fc
This commit is contained in:
Richard Peter 2012-09-19 10:04:30 -05:00
parent da13ee651a
commit 6f8f5690b0
2 changed files with 92 additions and 90 deletions

View file

@ -1,82 +1,85 @@
<beans <beans xmlns="http://www.springframework.org/schema/beans"
xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
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-2.5.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="uEngine" class="com.raytheon.edex.services.ProductSrv" /> <bean id="uEngine" class="com.raytheon.edex.services.ProductSrv" />
<!-- uEngineWeb --> <!-- uEngineWeb -->
<bean id="uengineWebServer" class="org.eclipse.jetty.server.Server" init-method="start" destroy-method="stop"> <bean id="uengineWebServer" class="org.eclipse.jetty.server.Server"
init-method="start" destroy-method="stop">
<property name="threadPool"> <property name="threadPool">
<bean id="ThreadPool" class="org.eclipse.jetty.util.thread.OldQueuedThreadPool"> <bean id="ThreadPool" class="org.eclipse.jetty.util.thread.OldQueuedThreadPool">
<property name="minThreads" value="25"/> <property name="minThreads" value="25" />
<property name="lowThreads" value="25"/> <property name="lowThreads" value="25" />
<property name="maxThreads" value="50"/> <property name="maxThreads" value="50" />
</bean> </bean>
</property> </property>
<property name="connectors"> <property name="connectors">
<list> <list>
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<property name="port" value="${web.port}"/> <property name="port" value="${web.port}" />
<property name="maxIdleTime" value="30000"/> <property name="maxIdleTime" value="30000" />
<property name="acceptors" value="2"/> <property name="acceptors" value="2" />
<property name="confidentialPort" value="${confidential.port}"/> <property name="confidentialPort" value="${confidential.port}" />
</bean> </bean>
</list> </list>
</property> </property>
<property name="handler"> <property name="handler">
<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> <bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<property name="handlers"> <property name="handlers">
<list> <list>
<bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"> <bean id="contexts"
<property name="handlers"> class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
<list> <property name="handlers">
<bean class="org.eclipse.jetty.webapp.WebAppContext"> <list>
<property name="contextPath" value="/uEngineWeb"/> <bean class="org.eclipse.jetty.webapp.WebAppContext">
<property name="war" value="file:///${edex.home}/webapps/uEngineWeb"/> <property name="contextPath" value="/uEngineWeb" />
</bean> <property name="war"
<bean class="org.eclipse.jetty.webapp.WebAppContext"> value="file:///${edex.home}/webapps/uEngineWeb" />
<property name="contextPath" value="/uEngineProducts"/> </bean>
<property name="war" value="file:///${edex.home}/data/uEngine"/> <bean class="org.eclipse.jetty.webapp.WebAppContext">
</bean> <property name="contextPath" value="/uEngineProducts" />
<bean class="org.eclipse.jetty.webapp.WebAppContext"> <property name="war" value="file:///${edex.home}/data/uEngine" />
<property name="contextPath" value="/activemqAdmin"/> </bean>
<property name="war" value="file:///${edex.home}/webapps/admin"/> <bean class="org.eclipse.jetty.webapp.WebAppContext">
</bean> <property name="contextPath" value="/activemqAdmin" />
</list> <property name="war" value="file:///${edex.home}/webapps/admin" />
</property> </bean>
</bean> </list>
<bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/> </property>
<bean id="requestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/> </bean>
</list> <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler" />
</property> <bean id="requestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler" />
</bean> </list>
</property> </property>
</bean> </bean>
</property>
</bean>
<camelContext id="uengine-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler"> <camelContext id="uengine-camel" xmlns="http://camel.apache.org/schema/spring"
<endpoint id="uEngineHttpThrift_from" errorHandlerRef="errorHandler">
uri="jetty:http://0.0.0.0:${http.port}/services/pyproductthrift?disableStreamCache=true&amp;chunked=false&amp;httpBindingRef=#binaryHttpBinding" /> <endpoint id="uEngineHttpThrift_from"
<endpoint id="uEngineHttpJaxb_from" uri="jetty:http://0.0.0.0:${http.port}/services/pyproductthrift?disableStreamCache=true&amp;chunked=false&amp;httpBindingRef=#binaryHttpBinding" />
uri="jetty:http://0.0.0.0:${http.port}/services/pyproductjaxb" /> <endpoint id="uEngineHttpJaxb_from"
uri="jetty:http://0.0.0.0:${http.port}/services/pyproductjaxb" />
<!-- UEngine routes --> <!-- UEngine routes -->
<route id="uEngineHttpThrift"> <route id="uEngineHttpThrift" streamCache="false">
<from uri="ref:uEngineHttpThrift_from" /> <from uri="ref:uEngineHttpThrift_from" />
<bean ref="uEngine" method="executePython" /> <removeHeaders pattern="CamelHttp*" />
<bean ref="serializationUtil" method="transformToThrift" /> <bean ref="uEngine" method="executePython" />
</route> <bean ref="serializationUtil" method="transformToThrift" />
<route id="uEngineHttpJaxb"> </route>
<from uri="ref:uEngineHttpJaxb_from" /> <route id="uEngineHttpJaxb" streamCache="false">
<bean ref="uEngine" method="executePython" /> <from uri="ref:uEngineHttpJaxb_from" />
<bean ref="serializationUtil" method="marshalToXml" /> <removeHeaders pattern="CamelHttp*" />
<bean ref="uEngine" method="executePython" />
<bean ref="serializationUtil" method="marshalToXml" />
</route> </route>
</camelContext> </camelContext>
</beans> </beans>

View file

@ -1,28 +1,27 @@
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amq="http://activemq.apache.org/schema/core" 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-2.0.xsd xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="binaryHttpBinding" class="com.raytheon.uf.edex.esb.camel.http.BinaryHttpBinding"/> <bean id="binaryHttpBinding" class="com.raytheon.uf.edex.esb.camel.http.BinaryHttpBinding" />
<camelContext id="server-camel" <camelContext id="server-camel" xmlns="http://camel.apache.org/schema/spring"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"> errorHandlerRef="errorHandler">
<endpoint id="thriftService_from" <endpoint id="thriftService_from"
uri="jetty:http://0.0.0.0:${http.port}/services/thrift?disableStreamCache=true&amp;chunked=false&amp;httpBindingRef=#binaryHttpBinding" /> uri="jetty:http://0.0.0.0:${http.port}/services/thrift?disableStreamCache=true&amp;chunked=false&amp;httpBindingRef=#binaryHttpBinding" />
<route id="thriftService"> <route id="thriftService" streamCache="false">
<from uri="ref:thriftService_from" /> <from uri="ref:thriftService_from" />
<bean ref="routeWrapper" method="executeThrift"/> <removeHeaders pattern="CamelHttp*" />
<bean ref="routeWrapper" method="executeThrift" />
</route> </route>
</camelContext> </camelContext>
<bean id="webservice" class="com.raytheon.uf.edex.auth.RemoteServiceRequestHandler"/> <bean id="webservice" class="com.raytheon.uf.edex.auth.RemoteServiceRequestHandler" />
<bean factory-bean="handlerRegistry" factory-method="register"> <bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.serialization.comm.RemoteServiceRequest"/> <constructor-arg
<constructor-arg ref="webservice"/> value="com.raytheon.uf.common.serialization.comm.RemoteServiceRequest" />
</bean> <constructor-arg ref="webservice" />
</bean>
</beans> </beans>