| Products | Versions |
|---|---|
| TIBCO DataSynapse GridServer | - |
| Not Applicable | - |
Resolution:
GridServer supports the ability to distribute different versions of code to different Engines, not only based on platform, but on code version. You can replicate several versions of code to Engines, and have each Service specify what version of code it should use.
To use code versioning, you first distribute code in a subdirectory of the class and/or lib directory, where the directory name is the code version. After placing your code, you can specify a different code version by setting the CODE_VERSION option in a Job or Service, and it will use the alternate code.
By default, if a Service is run on an Engine not using the alternate code version, the Engine will restart and use the code version needed by the Service. While this enables any Engine to run any version of code from a Service, it also can cause many Engine restarts when running a Service with different code versions at the same time. To prevent this, you can enable Static Code Version Mode. When enabled, this causes Engines to only run a code version defined in the Engine's distribution. (If no code version is defined, the default codebase is run.)
Note that for C++, you must deploy the applicable DataSynapse bridge and util libraries, located in $GSManagerRoot/webapps/livecluster/WEB-INF/etc/cppbridges, in the code version LIB_DIR directory for each code version.
For example, here is how to set a group of Engines to use a different version of code:
1. In the Administration Tool, go to the Engines tab and select Engine Configuration.
2. Either select an existing distribution from the list, or enter a name and select a platform for a new distribution list. All Engines using a distribution will be affected, so if you want only a subset of Engines to use a different codebase, you'll need to create a new distribution instead of modifying the default one.
3. Find the CODE_VERSION section, and enter the name of the directory where you wish to keep code for your second codebase. For example, "v2-beta".
4. Click Save.
5. Place your code in CLASS_DIR/value or LIB_DIR/value, where value is the value set above. For example, deploy/resources/win32/lib/v2-beta.
6. Reassign Engine Daemons to the new distribution by going to the Engine Daemons page and selecting your new distribution from the list. Engines will log out and back in with the new values.