Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.21 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.21 KB

Lazy CXF

About

Deploy CXF clients faster (in development).

This library provides drop-in replacements for CXF's JAXRSClientFactoryBean and JaxWsProxyFactoryBean. Both have an additional lazy parameter which controls whether a proxied, uninitialized (lazy) client is created by the factory. A lazy client would delay all expensive initialization (data binding generation/introspection or what have you) until the first call to the client.

Note that lazy clients incur the cost of an additional reflective call for each call, so it's not advised to set lazy to true outside of the development environment.

Compatibility

Has been tested with CXF 3.0.1 but should be compatible with older 2.x versions. The CXF dependencies are marked as optional (assuming your project already depends on the CXF's JAX-RS and/or JAX-WS runtime if you're using this library).

Example

  <bean id="myServiceFactory" class="com.vecna.cxf.ws.JaxWsProxyFactoryBean"
    p:serviceClass="com.services.MyService"
    p:address="https://myserver/MyService"
    p:lazy="true"/>

  <bean id="myService" factory-bean="myServiceFactory" factory-method="get"/>