Springframework shutdown in tomcat don't work

Hi everyone,

I'm using the <bean ... init-method="connect" destroy-method="disconnect"> feature in applicationcontext.xml.
While the init-method gets called the destroy method gets not touched if TOMCAT shuts down.
The framework works fine! Just this feature don't work.
Are there any other settings (except the web.xml       <listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener>  entry ) needed, to force the springframework to receive the shutdown event from tomcat?

Thanks for the help!

Frank

hefter1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
objectsConnect With a Mentor Commented:
That gets called when the context gets shutdown, is the context getting shut down when tomcat does?
0
 
hefter1Author Commented:
Hi objects,

I just get a
***This server has been successfully shutdown***
message, nothing else. I'm using Eclipse with MyEclipse plugin to control tomcat.
Maybe I should add a log.xml entry for the spring container?

Frank
0
 
hefter1Author Commented:
I can't see that the context shuts down in debug mode.
How else could I see that?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
hefter1Author Commented:
I tried to implement  DisposableBean - no effect! Even this method gets not called!! So the container has no control!?
The beans I'm using are singletons by default.
0
 
hefter1Author Commented:
Found the reason: If I call it as a service everything works fine. It seems that the MyEclipse plugin don't call the shutdown. Grrrrr.
0
 
hefter1Author Commented:
In the meantime I got response from MyEclipse. They will fix that in upcoming Version 5 in july 2006.
0
All Courses

From novice to tech pro — start learning today.