I'm using ActiveMQ, 5.5.1, camel-2.7.0.  I'm trying to set up a CXF endpoint
that calls on a web service.  I couldn't find a conprehensive example, but
after piecing together what I could find, I came up with the following (this
example is distilled down, but I'm running it):

    <cxf:cxfEndpoint id="myRemoteServiceEndpoint"
            address="http://localhost:9997/wsservices/MYService";
            serviceClass="com.foo.myservice.ws.MYService"
            serviceName="s:MYService" 
            endpointName="s:MYServiceSOAP" 
            wsdlURL="META-INF/wsdl/MYService.wsdl"
            xmlns:s="http://foo.org/MYService/"; >
            <cxf:properties>
                <entry key="dataFormat" value="POJO" />
            </cxf:properties>
    </cxf:cxfEndpoint>


However, I kept getting NPEs in CxfProducer.getBindingOperationInfo at
different times.  I've traced these to the fact that the client, a
CxfEndpoint.CamelCxfClientImpl  is getting its destroy() method called when
the finalizer thread runs:

CxfEndpoint$CamelCxfClientImpl(ClientImpl).destroy() line: 200  
JaxWsClientProxy(ClientProxy).close() line: 51  
JaxWsClientProxy.close() line: 81       
JaxWsClientProxy(ClientProxy).finalize() line: 115      
Finalizer.invokeFinalizeMethod(Object) line: not available [native method]      
Finalizer.runFinalizer() line: 83       
Finalizer.access$100(Finalizer) line: 14        
Finalizer$FinalizerThread.run() line: 160       

However, its still in use by the CxfProducer.  So once the JaxWsClientProxy
is finalized, the client is no longer in a usable state.  

How do I prevent this?










--
View this message in context: 
http://camel.465427.n5.nabble.com/NPE-in-CxfProducer-due-to-client-prematurely-closed-tp5721135.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to