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
[email protected]
http://dankulp.com/blog