[ 
https://issues.apache.org/jira/browse/CXF-5422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13832606#comment-13832606
 ] 

Philipp Wimmer commented on CXF-5422:
-------------------------------------

1.
we now create the proxy for each request. 
RESULT: this reduced the exception, to 1, max 2.

2.
we marked our method which creates the proxy with "synchronized"
RESULT: first tests look good - no exception - load tests will follow...

> Problem creating proxy for multiple threads
> -------------------------------------------
>
>                 Key: CXF-5422
>                 URL: https://issues.apache.org/jira/browse/CXF-5422
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: JBoss 4.2.3.GA (jdk6-cxf stack 3.1.0) on AIX 6.1 
> CXF Jars on JBoss are Version 2.1.4
>            Reporter: Philipp Wimmer
>
> Hi,
> we're using CXF as client to call a webservice in our company network.
> In our current usecase we need to call the webservice around 12.000 times. To 
> improve performance we decided to use multiple threads which call the service.
> We are getting the following error on some (1-4) threads of 40 threads:
> java.lang.NullPointerException
>       at 
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:483)
>       at 
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>       at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
>       at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>       at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:89)
>       ... 10 more
> This is how we create the proxy, which we are using for all calls:
> final SearchService service = new SearchService(this.getWsdl());
> final SearchingInsuranceService searchPort = 
> service.getSearchingInsuranceServicePort();
> ((BindingProvider) 
> searchPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
>  this.properties.getEndpointAdress());
> this.port = searchPort;
> What is the problem? Have we done anything wrong?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to