cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Fail to deploy webservice with httpj:engine-factory config
Date Tue, 20 Dec 2011 14:00:31 GMT
On 20/12/11 13:52, Peter Nerg wrote:
> I'm using Felix + DOSGi 1.2.
> My goal is to configure the amount of threads in the Jetty HTTP service and
> from what I gather the only way to do so is to provide the configuration via
> a spring context.
> I have a bit difficulties following the provided examples as they are only
> fragments not providing a end-to-end example, starting with the code and how
> to configure my bundle to make it deploy.
>
> So I modified my spring context (META-INF/spring/beans.xml) that exposes a
> WS endpoint as follows:
> <?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:jaxws="http://cxf.apache.org/jaxws"
>   xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
>   xmlns:beans="http://www.springframework.org/schema/beans"
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>              http://www.springframework.org/schema/beans/spring-beans.xsd
>              http://cxf.apache.org/jaxws
> http://cxf.apache.org/schemas/jaxws.xsd
>              http://cxf.apache.org/transports/http/configuration
>              http://cxf.apache.org/schemas/configuration/http-conf.xsd
>              http://cxf.apache.org/transports/http-jetty/configuration
>              http://cxf.apache.org/schemas/configuration/http-jetty.xsd">
>
>     <httpj:engine-factory bus="cxf">
> 		<httpj:engine port="6969">
> 			<httpj:threadingParameters minThreads="5"
> 				maxThreads="100" />
> 			<httpj:connector>
> 				<beans:bean class="org.mortbay.jetty.bio.SocketConnector">
> 					<beans:property name="port" value="6969" />
> 				</beans:bean>
> 			</httpj:connector>
> 			<httpj:handlers>
> 				<beans:bean class="org.mortbay.jetty.handler.DefaultHandler" />
> 			</httpj:handlers>
> 			<httpj:sessionSupport>true</httpj:sessionSupport>
> 		</httpj:engine>
> 	</httpj:engine-factory>
>

making DOSGI recognize the context configuration such as 
<httpj:engine-factory> has been on the map for a long time but it's a 
big enough effort that no one has found the time to look into yet. 
Consider binding the DOSGI endpoints to HttpService which may help with 
picking up container-specific HTTP configs

>
>   <jaxws:endpoint
>    id="test"
>    implementor="xxxx"
>    address="yyyy"/>
> </beans>
>

jaxws:endpoint bypasses the DOSGI runtime

Cheers, Sergey

> However this fails with an error stating that there is no bean called "cxf".
> Searching for this error message I find that I must import a number of
> context files.
>
>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>
>
> Having added these I now get an error stating :
> java.io.FileNotFoundException: OSGi resource[classpath:META-INF/cxf/cxf.xml
>
> I only assume that the imported files are provided somehow by the DOSGi
> bundles.
> For some reason I fail to import them.
>
> Is there something that should be added to the manifest file of my bundle to
> import these?
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Fail-to-deploy-webservice-with-httpj-engine-factory-config-tp5088923p5088923.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message