Just a thought, but you could have the colocfeature set the conduitselector as well. Also, as per my last email on the conduitselector where I tried to set straight my position on the getConduit()/ConduitSelector, I think we could simplify so a custom selector isn't even needed.
- Dan On 4/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: ajaypaibir Date: Fri Apr 27 10:31:29 2007 New Revision: 533174 URL: http://svn.apache.org/viewvc?view=rev&rev=533174 Log: Using custom BeanDefintionParser along with Feature to configure the coloc out interceptors on a client. Added: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java (with props) incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java (with props) incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/ incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/ incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/spring.handlers Modified: incubator/cxf/trunk/distribution/src/main/release/samples/colocated/coloc.xml incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml Modified: incubator/cxf/trunk/distribution/src/main/release/samples/colocated/coloc.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/colocated/coloc.xml?view=diff&rev=533174&r1=533173&r2=533174 ============================================================================== --- incubator/cxf/trunk/distribution/src/main/release/samples/colocated/coloc.xml (original) +++ incubator/cxf/trunk/distribution/src/main/release/samples/colocated/coloc.xml Fri Apr 27 10:31:29 2007 @@ -20,41 +20,15 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://cxf.apache.org/transports/http/configuration" - xmlns:jaxws="http://cxf.apache.org/jaxws" + xmlns:coloc="http://cxf.apache.org/binding/coloc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <!--Coloc Interceptors--> - <bean id="colocInbound" class=" org.apache.cxf.binding.coloc.ColocInInterceptor"/> - <bean id="colocOutbound" class=" org.apache.cxf.binding.coloc.ColocOutInterceptor"/> <bean id="faultOutbound" class=" demo.colocated.common.ThrowFaultInterceptor"/> - <!--Message Logging Interceptors--> - <bean id="logInbound" class=" org.apache.cxf.interceptor.LoggingInInterceptor"/> - <bean id="logOutbound" class=" org.apache.cxf.interceptor.LoggingOutInterceptor"/> - <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"> - <property name="inInterceptors"> - <list> - <ref bean="colocInbound"/> - <ref bean="logInbound"/> - </list> - </property> - <property name="inFaultInterceptors"> - <list> - <ref bean="logInbound"/> - </list> - </property> <property name="outInterceptors"> <list> - <ref bean="colocOutbound"/> <ref bean="faultOutbound"/> - <ref bean="logOutbound"/> - </list> - </property> - <property name="outFaultInterceptors"> - <list> - <ref bean="logOutbound"/> </list> </property> </bean> @@ -62,6 +36,9 @@ are not required in the coloc case --> <jaxws:client id="{http://apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true"> + <jaxws:features> + <coloc:enableColoc/> + </jaxws:features> <jaxws:conduitSelector> <bean class="org.apache.cxf.endpoint.DeferredConduitSelector "/> </jaxws:conduitSelector> Added: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java?view=auto&rev=533174 ============================================================================== --- incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java (added) +++ incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java Fri Apr 27 10:31:29 2007 @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.binding.coloc.spring; + +import org.w3c.dom.Element; + +import org.apache.cxf.binding.coloc.feature.ColocFeature; +import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser; + +public class ColocBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser { + + @Override + protected Class getBeanClass(Element arg0) { + return ColocFeature.class; + } + +} Propchange: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/ColocBeanDefinitionParser.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java?view=auto&rev=533174 ============================================================================== --- incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java (added) +++ incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java Fri Apr 27 10:31:29 2007 @@ -0,0 +1,27 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.binding.coloc.spring; + +import org.springframework.beans.factory.xml.NamespaceHandlerSupport; + +public class NamespaceHandler extends NamespaceHandlerSupport { + public void init() { + registerBeanDefinitionParser("enableColoc", new ColocBeanDefinitionParser()); + } +} Propchange: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/spring.handlers URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/spring.handlers?view=auto&rev=533174 ============================================================================== --- incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/spring.handlers (added) +++ incubator/cxf/trunk/rt/bindings/coloc/src/main/resources/META-INF/spring.handlers Fri Apr 27 10:31:29 2007 @@ -0,0 +1 @@ +http\://cxf.apache.org/binding/coloc= org.apache.cxf.binding.coloc.spring.NamespaceHandler \ No newline at end of file Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml?view=diff&rev=533174&r1=533173&r2=533174 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/coloc/coloc_rpc.xml Fri Apr 27 10:31:29 2007 @@ -21,6 +21,7 @@ xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" + xmlns:coloc="http://cxf.apache.org/binding/coloc" xsi:schemaLocation=" http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -53,7 +54,7 @@ <jaxws:client id="{http://apache.org/headers/rpc_lit}SoapPort" createdFromAPI="true"> <jaxws:features> - <bean class=" org.apache.cxf.binding.coloc.feature.ColocFeature"/> + <coloc:enableColoc/> </jaxws:features> <jaxws:conduitSelector> <bean class="org.apache.cxf.endpoint.DeferredConduitSelector "/>
-- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
