How do extensions know about Thingworx webapp unload?
So that they can initiate necessary cleanup, e.g. shutdown an executor
So that they can initiate necessary cleanup, e.g. shutdown an executor
The platform doesn't provide any way for extensions to hook into the servlet unload event directly.
That being said, what you should do is have your cleanup code tied into the logic for stopThing() if defined in a thing template, or stopSubsystem() if defined in a subsystem (the cleanup methods work as well). When Thingworx is shut down it will attempt to stop all things and subsystems using those methods. This also supports the scenarios where the thing or subsystem are stopped individually by the user.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.