Working with Preference File (JSON) for migration
When you want to migrate a TIBCO ActiveMatrix® Adapter for Tuxedo project created on TIBCO ActiveMatrix BusinessWorks™ 6.x to TIBCO ActiveMatrix BusinessWorks™ Plug-in for Oracle Tuxedo project and if you want to use the feature of preferences, then a adapter2plugin.json file would need to be created in the root folder of ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks™ 6.x
A template of the preference file would be installed in the tools folder of the plug-in in the following location:
$TIBCO_HOME/bw/palettes/tux/version/tools/adapter2plugin.json_template
- The JSON preference file template should be used for reference only and should not be modified or used as it is. The preference file should be edited with the necessary properties and their corresponding values.
- The file created under the root folder of the ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x will not just contain Tuxedo but also other plug-ins that supports adapter migration.
In terms of values, the values can either be literal's or references to module properties, which would pertain to module property from ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x
To configure as a Literal Value
To set the value of numberOfThread in TuxConnectionResource to 8 in JSON file, set the values as
"numberOfThread" : "8"
To configure as a Module Property:
To use a module property in JSON file, you need to have the same module property declared with a value in the corresponding ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x. Then you can add the module property in JSON file.
To set the value of userName in TuxConnectionResource to test using JSON file as a module property, add a module property in TIBCO ActiveMatrix BusinessWorks 6.x adapter project as userName and set the value as test. Now in the JSON file, set the value as
"userName" : "%%userName%%"
The following notes should be considered prior to using the JSON preference files for a ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x
- The location and filename of the adapter2plugin.json preference file is not configurable.
- The usage of the preference file does not support the creation of new module properties in migrated projects. For example, we should not specify a module property %%test%% in the preferences if it does not exist in the ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x
- The usage of preference file is applicable to all adapter configurations in the ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x during migration.
- Since the module properties in TIBCO ActiveMatrix BusinessWorks 6.x project are case sensitive, the module properties in the preference file should have the same case as the ActiveMatrix® Adapter for Tuxedo project created on ActiveMatrix BusinessWorks 6.x.
- When any value is applied from the preference file, the RefactoringReport.log contains logs with key in uppercase and value as is.
- The password used in the JSON file should be obfuscated. The bwobfuscator utility in the <TIBCO_HOME>/bw/version/bin folder should be used to obfuscate the password. Any other password obfuscators will not work. For more information about how to use the bwobfuscator, see TIBCO ActiveMatrix™ BusinessWorks Application Development guide.
- In adapter2plugin.json configuration, tuxedoPluginHeaderFilesPath key should contains valid path which has input and output header files for Oracle Tuxedo.
- In adapter2plugin.json configuration, adapterConfiguration key under headerFilesMapping key should have valid adapter configuration name for adapterConfigurationName key, should have valid service name for adapterServiceName key, should have valid header file name with .h extension for inputSchema key and for outputSchema key.
