10-06-2015 11:13 AM
I am developing a Web Application that will make use of Context Service. An interesting issue occurs during shutdown of the Context Service client-side environment. When my Web Application is finished using Context Service, it calls the "destroy" method on the Management Connector and it calls the "destroyAndDeleteConnector" method on the Context Service Client. When the application server (in this case I am using Tomcat) is told to shutdown the Web Application, or when the Web Application is reloaded, then the Application Server does not seem to be able to shutdown the Web Application successfully. It seems to act like there is at least one running thread left over, causing the application server to wait until all threads for that Web Application stop running.
A standalone Java Application that uses the Context Service SDK seems to exhibit a similar type of behavior. If the "main" Java Application simply calls the methods in the previous paragraph and returns, then the Java Application does not stop running. One needs to specifically call "System.exit()" in order to get the Java Application to terminate.
When using the Context Service client side SDK in an Application Server, if there a method I can call to ensure that all background threads are stopped specifically for Context Service?
Solved! Go to Solution.
10-06-2015 12:18 PM
Hi Joseph,
It looks like you've found an issue. The destroyAndDeleteConnector method is not killing all of its open connections. It looks like it is leaving a connection refresh open. If you left left a terminal open then you'd see the Context Service client start sending messages several minutes after you destory the connection. Then sleep for 15 minutes and send messages again until killed.
We've opened an issue on this. Thanks!
-Chris
10-06-2015 12:18 PM
Hi Joseph,
It looks like you've found an issue. The destroyAndDeleteConnector method is not killing all of its open connections. It looks like it is leaving a connection refresh open. If you left left a terminal open then you'd see the Context Service client start sending messages several minutes after you destory the connection. Then sleep for 15 minutes and send messages again until killed.
We've opened an issue on this. Thanks!
-Chris
05-06-2016 10:54 AM
Make sure you always have latest version of the Static SDK, currently at 1.0.7. Dynamic SDK Extension will get upgraded automatically. Some registration related issues were fixed in the last 1 month (April-May 2016).
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide