Announcement Announcement Module
No announcement yet.
destroy-method not called / WebApp Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • destroy-method not called / WebApp

    Hi all!

    Letīs say I have three xml files:
    - app-servlet.xml
    - appContext.xml
    - dataContext.xml

    appContext.xml and dataContext.xml are listed in the context-param "contextConfigLocation" in my web.xml and ContextLoaderListener is configured.

    My problem is, that a destroy-method is only called if the corresponding bean is defined in my app-servlet.xml, not in the other two xml files. Everthing else is working fine. I can access the beans in app- and dataContext.xml. Iīve tried the XML attribute "destroy-method" and the interface DisposableBean.

    Thatīs really a big problem! For dbcp.BasicDataSource I need the "destroy-method" attribute and LocalSessionFactoryBean is using the interface DisposableBean.

    Any ideas? Perhaps a bug?

    Best regards,


  • #2
    What servlet container do you use? What container event do you expect to produce the destroy event (undeploy, redeploy?)