cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
541
Views
0
Helpful
2
Replies

How the Context Service SDK Extension JAR Auto-Upgrades

ccosenti
Beginner
Beginner

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:

  1. 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.
  2. 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.
  3. 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.

2 Replies 2

ptindall
Cisco Employee
Cisco Employee

I see the version test and update happening with no management connector and just the client connection active.  This doesn't quite match your description.  Is this not behaving as intended?

Hi Paul,

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers