cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: CXF 2.3.0: Shutdown a client which is connected with SOAPoverJMS
Date Wed, 08 Sep 2010 14:41:35 GMT
On Wednesday 08 September 2010 8:23:57 am tim yesno wrote:
> Hello
> 
> I have a client, the following source code:
>         ApplicationContext applicationContext = new
> ClassPathXmlApplicationContext(APPL_CONFIG);
>         JaxWsProxyFactoryBean factory =
> applicationContext.getBean(CLIENT_FACTORY, JaxWsProxyFactoryBean.class);
>         MyServiceInterface client = (MyServiceInterface)factory.create();
>         String reply = client.greetMeString("Hans");
>         LOGGER.info(reply);
>         reply = client.greetMeString("Ruedi");
>         LOGGER.info(reply);
> 
> How can I shutdown or disconnect from the broker without making an
> exception on the service side (not System.exit()!)?
> 
> Thanks for your help.

One of the issues with the jaxws spec is there isn't anything on the client to 
mark it as "finished".   For CXF, you can try:

org.apache.cxf.frontend.ClientProxy.getClient(client).destroy();

If that doesn't work, please log a bug.   That should call close() on the 
conduit which should completely cleanup it's connections and such. 


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

Mime
View raw message