Closing Connections

Clean up connections from the generated database instance prior to application shutdown.

  1. To release an opened application connection, stop the messaging channel by invoking the application instance's stopConnection method.
    // wait the timeout value for the connection to stop
    // if it is not stopped within the timeout value an exception will be thrown
    app.stopConnection(<timeout_value>);
  2. Close all connections to device database by calling the closeConnection method in the generated package database class. If one application has multiple packages, invoke the closeConnection API in all the packages.