I created a POC for the Watson TTS service in Eclipse using the Java SDK 3.3.0. Application Server - Tomcat v8.0, working locally through Eclipse on a Win10 PC. Everything works fine, i.e. It can extract the audio stream, but when I stop Tomcat, I see warnings about memory leaks. Here are two posts:
The [testapp] web application seems to have started a thread named [OkHttp ConnectionPool], but could not stop it. This will likely lead to a memory leak. Trace flow stream:
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 looked through the SDK and cannot find anything about exiting the TextToSpeech connection gracefully. Is this a concern? If I add this service to the website, it will work in the Sun Solaris 10 environment with Tomcat8.
LWK69 source
share