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> <jaxws:endpoint id="test" implementor="xxxx" address="yyyy"/> </beans> 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.
