Some users have noted that their local SDK extension JAR (the Jar in the plugin folder) is not getting auto-updated when we push out a release. This post describes the basics of how the auto-upgrade process works and how to ensure that your application correctly upgrades when a new extension JAR is available.
Cisco pushes new extension Jars to the cloud on a regular basis. These jars typically contain performance improvements, bug fixes, and occasionally new functionality. When your application starts:
it opens the connection.property file you specify with the ConnectorFactory.initializeFactory(configFilePath); call. There, it reads the settings for the "path" and "jar-name" for the extension JAR.
After you init either the management and/or client connector, the connector waits to hear a heartbeat from the server. This heartbeat starts the upgrade process. The heartbeat reports the current cloud version of the extension and the connector compares it to the local version. If the cloud version is higher then the local version, then the connector downloads the latest extension jar.
Once the new version of the extension jar is downloaded, the connector upgrades the jar, updates the "jar-name" property of the connection.property file with the name of the newly installed extension jar, then swaps the loaded extension versions.
It is important to note that if your application connects and then quickly exits (typically in less than 30 seconds) that a heartbeat receive never occurs and an upgrade does not take place because the first heartbeat can be up to 30 seconds after you init the connection. To ensure that your application downloads and installs the latest extension Jar, you should introduce a 30 second sleep after you init the management and client connectors to allow time for an extension upgrade.
You are correct, thanks! The upgrade occurs on both the client and the management connection. If you are running both connections in the same JVM then you'll only get a single upgrade process, but it will also upgrade if you are running only one or the other.