cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rolf Thunbo (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2758) org.apache.cxf.frontend.ClientFactoryBean optimization
Date Wed, 07 Apr 2010 20:00:34 GMT
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


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.


Mime
View raw message