Hello everyone- I can't seem to find an answer anywhere in the mailing list
archives, so at the risk of sounding idiotic, I'll ask the question anyway.
We are booting up Apache James (version 3.0 HEAD) from within a Tomcat
Servlet Context configured by Spring.
Since James utilizes Avalon this is not done completely cleanly.
1. We define a Spring bean for JamesApplicationContext
<bean id="jamesContext"
class="org.apache.james.container.spring.beanfactory.JamesApplicationContext
">
<constructor-arg><null /></constructor-arg>
<constructor-arg>
<bean
class="org.springframework.core.io.FileSystemResource">
<constructor-arg type="java.lang.String">
<value>[[ path to file spring-beans
file]]</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg>
<bean
class="org.springframework.core.io.FileSystemResource">
<constructor-arg type="java.lang.String">
<value>[[ path to james config
file]] </value>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
2. Once Spring has initialized all of its configuration files, we execute
the following lines:
JamesApplicationContext ctx =
applicationContext.getBeansOfType(JamesApplicationContext.class)
Ctx.refresh()
This boots the James Server. And this works fine.
3. The problem is that when we shut tomcat down, we'd like to shutdown the
entire process, but the fact that James is hanging around, means that the
server cannot shutdown.
a. It seems that JamesApplicationContext.destroy() does not shutdown the
server (unless we are doing something wrong).
b. reading the code for the RemoteManager, the
RemoteManagerHandler.doSHUTDOWN() command seems to simply call
System.exit(). That is not acceptable.
Is there a way to cleanly shutdown a James server without having to rely on
an external kill process command? Ideally, what I'd like to do is in our
servlet destroy method, be able to call something like James.stop()
Thanks
Shan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]