从tomcat取消部署我的应用程序时,我在catalina.out中获取这些日志。它是tomcat 7上基于java的restlet服务。
SEVERE: The web application [/my-service] created a ThreadLocal with key of type [com.google.common.eventbus.EventBus$2] (value [com.google.common.eventbus.EventBus$2@f120fcf]) and a value of type [java.util.concurrent.ConcurrentLinkedQueue] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jul 29, 2015 3:49:52 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/my-service] created a ThreadLocal with key of type [com.google.common.eventbus.EventBus$3] (value [com.google.common.eventbus.EventBus$3@6acbe6c3]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
我正在我的restlet应用程序类中初始化EventBus -
private EventBus eventBus = new EventBus();
在应用程序启动时,我注册了所需的EventHandler类
@Override
public synchronized void start() throws Exception {
eventBus.register(new EvenHandlerClass());
...
}
此事件总线由不同的类用于发布事件。应用程序仅提供getter方法来访问此事件总线并发布事件。 我检查一下,但我无法找到是否需要关闭事件总线或关闭它。 我在这里错过了什么吗?