I have the following configuration setup for my service:

<!-- for the instance service web service -->
<simple:server id="InstanceService"
serviceClass="com.rrd.xspace.service.instance.Inst anceService"
address="http://localhost:8808/InstanceService">
<simple:serviceBean>
<ref bean="instanceService" />
</simple:serviceBean>
</simple:server>

And I have some code that looks at the applicationContext.xml file periodically for a change and if it finds it, I invoke in code:

applicationContext.refresh();

The context starts to reload all the beans until it hits the CXF definitions, then I get the following error:

Exception in thread "Timer-3" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'InstanceService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Soap 1.1 endpoint already registered on address http://localhost:8808/InstanceService
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.context.support.AbstractApplic ationContext.getBean(AbstractApplicationContext.ja va:1075)



It looks like somehow I need to manually close these endpoints on shutdown? Any one have any clue or code snippet on what I need to do?

Any help GREATLY appreciated.