On 28/03/2011 19:29, Mark Shifman wrote:
> I just started playing with tomcat 7.0.11 and I noticed this error on the 
> logs which
> occurs when I shutdown tomcat.
> 
> Mar 28, 2011 10:47:57 AM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextDestroyed()
> Mar 28, 2011 10:47:57 AM org.apache.catalina.core.StandardContext listenerStop
> SEVERE: Exception sending context destroyed event to listener instance of 
> class org.ycmi.listeners.contextListener
> java.lang.RuntimeException: java.sql.SQLException: Data source is closed
>         at org.ycmi.prot.ypresults.db.dbUtils.update(dbUtils.java:495)
>         at 
> org.ycmi.listeners.contextListener.contextDestroyed(contextListener.java:58)
> ...
> 
> In my ServletContextListener contextDestroyed method I do a database update 
> to clean up a table.
> 
> This looks like the DataSource is being closed before contextDestroyed is run 
> so I can't do the clean up. This wasn't
> a problem is tomcat 6.
> 
> Is there someplace else I should do this cleanup?  When is the DataSource 
> closed? Shouldn't/couldn't the DataSource
> be closed after contextDestroyed has run.

Sounds like you have run into the fix for this:
https://issues.apache.org/bugzilla/show_bug.cgi?id=25060

The DataSource is closed at the same time the namingResources are
stopped. Looking at the StandardContext code, the namingResources are
probably being stopped too early. Please raise a bug.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to