cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: ClientLifeCycleListener not called
Date Mon, 17 Jan 2011 20:06:51 GMT

Looking at the code, nothing ever calls the destroy method on the ClientImpl 
except for in a few certain cases (relating to WS-RM).    Thus, it never would 
be called.    That probably could/should be considered a bug.

Most likely, we'll need to add a finalize method someplace to handle it.  :-(    
JAX-WS really doesn't have a way to say "I'm done with this proxy".   

Another option MAY (need to run the TCK to see if we can do this) is make the 
proxy also implement Closeable.    Thus, you could call proxy.close() when 
done to make sure everything gets cleaned up.

Dan

On Friday 14 January 2011 10:16:03 am Oliver Wulff wrote:
> Hi there
> 
> I've registered a ClientLifeCycleListener but it is not called when the
> application makes a web service call.
> 
> I see the the listener is registered at runtime but the basic log messages
> to the console are not logged from the listener.
> 
> ClientLifeCycleManager clm =
> bus.getExtension(ClientLifeCycleManager.class); if (null != clm) {
>    clm.registerListener(new MonitoringClientListener());
>    System.out.println("*********** MonitoringListener registered");
> }
> 
> and an implementation snippet of the listener:
> 
>  public void clientCreated(Client client) {
>   System.out.println("*********************************************
> clientCreated");
> System.out.println(client.getEndpoint().getEndpointInfo().getName().toStri
> ng()); }
> 
> 
> Are there any special circumstances where the listener is not called? Maybe
> depending on how the client/proxy is instantiated?
> 
> Thanks
> Oli

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message