[
https://issues.apache.org/jira/browse/CXF-2758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rolf Thunbo updated CXF-2758:
-----------------------------
Priority: Minor (was: Major)
> org.apache.cxf.frontend.ClientFactoryBean optimization
> ------------------------------------------------------
>
> Key: CXF-2758
> URL: https://issues.apache.org/jira/browse/CXF-2758
> Project: CXF
> Issue Type: Improvement
> Components: JAX-WS Runtime
> Affects Versions: 2.3
> Reporter: Rolf Thunbo
> Priority: Minor
>
> In the create method both the endpoint and client is created each time it is
> called. Is it really neccessary to build the endpoint each time, wouldn't it
> be good enough to just create a new client based on the endpoint? Doing so
> greatly improves the performance of the client factory on subsequent calls to
> the create method.
> I propose the existing code be replaced by the following code:
> public Client create() {
> if (ep == null) {
> getServiceFactory().reset();
> if (getServiceFactory().getProperties() == null) {
> getServiceFactory().setProperties(properties);
> } else if (properties != null) {
>
> getServiceFactory().getProperties().putAll(properties);
> }
> try {
> ep = createEndpoint();
> applyProperties(ep);
> initializeAnnotationInterceptors(ep,
> getServiceClass());
> } catch (EndpointException e) {
> throw new ServiceConstructionException(e);
> } catch (BusException e) {
> throw new ServiceConstructionException(e);
> }
> }
> Client client = null;
> client = createClient(ep);
> applyFeatures(client);
> return client;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.