RTC 5.0 client API memory leak on tomcat
I am seeing the following messages on my tomcat log when using the RTC 5.0 client API, which eventually leads to a PermGen error after enough hot redeploys:
SEVERE: The web application [/myservice] appears to have started a thread named [Worker-JM] but has failed to stop it. This is very likely to create a memory leak.
May 26, 2015 3:30:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/myservice] appears to have started a thread named [Worker-0] but has failed to stop it. This is very likely to create a memory leak.
I have simplified my servlet down to the following code and still receive the errors:
ITeamRepository repo;
CG
public void contextInitialized(ServletContextEvent arg0){
TeamPlatform.startup();
repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(config.getRepositoryURI());
IWorkItemClient c = (IWorkItemClient) repo.getClientLibrary(IWorkItemClient.class);
}
public void contextDestroyed(ServletContextEvent arg0){
TeamPlatform.getTeamRepositoryService().removeTeamRepository(repo);
TeamPlatform.shutdown();
}
Note that I'm not even logging in at this point. If I remove the call to getClientLibrary, the errors disappear. These errors seem to appear no matter what client library I try to load. I have verified my contextDestroyed is being called on redeploy.
Any help would be appreciated.
Thank you.
CG