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?
 
objectsCommented:
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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.