I've created a POC for the Watson TTS service in Eclipse using the Java SDK 3.3.0. The app server is Tomcat v8.0 running locally through Eclipse on a Win10 PC. Everything works fine, i.e., it is able to retrieve an audio stream, but when I stop Tomcat I'm seeing warnings about memory leaks. Here are two of the messages:
The web application [testapp] appears to have started a thread named [OkHttp ConnectionPool] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:461)
okhttp3.ConnectionPool$1.run(ConnectionPool.java:66)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:745)
There is a similar message for [Okio Watchdog].
I've looked through the SDK and can't find anything about exiting the TextToSpeech connection gracefully. Is this cause for concern? If I add this service to the production website it will be running in a Sun Solaris 10 environment also with Tomcat8.