Can you just use the lazy-init="true" stuff built into spring?
<bean id="accountService"
lazy-init="true"
class="my.web.service.AccountService"
factory-bean="accountProxyFactory" factory-method="create"/>
Dan
On Tuesday 12 February 2008, rsheldon wrote:
> I've just started using CXF with Spring. I'm only using it to create
> SOAP WS clients (code generated from WSDL using CXF maven tools).
>
> I'd like to be able to have the services not connect on startup, but
> wait until they are first used - ie. lazy instantiation. Can this be
> done in CXF? Here's my very simple client configuration:
>
> <bean id="accountProxyFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> <property name="serviceClass"
> value="my.web.service.AccountService"/> <property name="address"
> value="${account.service}"/>
> </bean>
>
> <bean id="accountService" class="my.web.service.AccountService"
> factory-bean="accountProxyFactory" factory-method="create"/>
>
> I can't see any attribute I can set on JaxWsProxyFactoryBean or it's
> parent ClientProxyFactoryBean that looks like it would work. There is
> a "properties" property, but I can't find a reference to the valid
> properties/values I can put into this map.
>
> Can anyone help?? Is there an attribute or property I can set to
> prevent immediate creation of the service?
>
> Many thanks,
> Richard
>
> Thanks
> Richard
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog