Hello
In a javax.servlet.ServletContextListener, each time the server is starting:
I start the com.jniwrapper.win32.jexcel.Application to get the Major Version Number of Excel
Application application = null;
try {
application = new Application();
if (application.getMajorVersionNumber() <= 9)
logger.error("The actual version of the library doesn't support MS Excel 2000");
} catch (com.jniwrapper.win32.jexcel.ExcelException e) {
logger.error(e);
} catch (UnsatisfiedLinkError e){
logger.error(e);
}
catch (Exception e) {
logger.error(e);
}
finally {
try {
if (application != null) {
application.close(true);
}
} catch (Exception e) {
logger.trace("Exception while closing excel", e);
}
}
This is starting 2 threads that doesn't close :
com.jniwrapper.NativeResourceCollector
Timer-2
When the server stop, it always display in catalina :
12:35:25 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoaderBase() - The web application appears to have started a thread named [com.jniwrapper.NativeResourceCollector] but has failed to stop it. This is very likely to create a memory leak.
12:35:25 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoaderBase() - The web application appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak.
When the server stop, I am able to stop manually the NativeResourceCollector thread :
com.jniwrapper.NativeResourceCollector.getInstance().stop();
But I can't find a way for the Timer-2 thread.
Is it something I should care ?
Thanks