On Friday, November 11, 2011 10:20:41 AM Evangelina wrote: > Hi Dan, > > Thanks for the answer, I was getting the client from the proxy and setting > it in a new object to use later, and kept loosing it because of the > ClientProxy's finalize. Maybe this should be documented somewhere, I used it > this way in version 2.3.1 without a problem.
Which was actually a bug. This ended up causing locked resources and such. > > You say that if I want the client I should use the ClientFactoryBean instead > of the ClientProxyFactoryBean.. but what's the difference between them? > Don't they have a different purpose? > Fundamentally, a proxy in CXF is just a wrapper around a Client. However, the Clients can be used for other things. For example, a Dispatch object uses a client. JAX-RS uses a Client. Etc.... The ClientFactoryBean is what is used to create the client. (and the ClientProxyFactoryBean creates and uses a ClientFactoryBean internally for that purpose). The ClientProxyFactoryBean then handles wrapping that client object with the Proxy. If you don't need or plan to use the proxy, just create the Client. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
