I get error messages when I close Tomcat, which indicates that there is one thread and several thread locators that are not properly cleaned.
My web application is currently configured using the embedded H2 database and deployed to the Tomcat web application server. It was successfully deployed in production about a week ago.
System Information:
OS: Ubuntu 14.04 (dev), Ubuntu 12.04 (test), Solaris 5.11 (prod)
Tomcat: 7.0.53
Java: 1.7.0_55
Grails: 2.3.8
DataSource.groovy as follows:
dataSource {
pooled = true
driverClassName = "org.h2.Driver"
username = 'myDbUserName'
password = 'myDbPassword'
dbCreate = 'update'
url = "jdbc:h2:/h2db/myApp_test;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
Note that Tomcat usually stops despite these messages, without any apparent delay. Therefore, there is no need to kill the process (which I should have done so far, but this was due to improper cleaning of my own code, which is now resolved).
, . , , . hotdeploy . , - OutOfMemoryError? ? ?
( ):
: , - [/my-app] [ H2/home/steinar/h2db/myApp_test.lock.db], . , .
: - [/my-app] ThreadLocal [java.lang.ThreadLocal] ( [java.lang.ThreadLocal@15dd7182]) [org.apache.cxf.BusFactory.BusHolder] ( [org.apache.cxf.BusFactory$BusHolder@7d471904]) , - . , .
: - [/my-app] ThreadLocal [Org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor $1] ( [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$1@46bb95dd]) [java.util.HashMap] ( [{}]) , - . , .
: - [/my-app] ThreadLocal [Org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor $2] ( [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$2@456c0472]) [java.util.HashMap] ( [{DEFAULT = 0}]) , - . , .
/ :
H2 File Lock Watchdog thread. , - H2 . DB_CLOSE_ON_EXIT URL JDBC, (TRUE, FALSE ) . Grails
" " ThreadLocal CXF? ? CXF () -, . - -, ?
4. " " ThreadLocal , Grails Hibernate. - , ?
( ) , .