This page describes how to run your adapter from within the Eclipse IDE during development. The instructions can be easily adapted to other IDEs.
Integration adapters are designed to run witihin the context of a Deployment Framework (DFW), not an IDE. To run your adapter within an IDE requires some extra steps, but this will save you time and allow you to use your IDE's debugging tools.
Before you can run your adapter from within your IDE, you must package and deploy your adapter's configuration files to your Deployment Framework. Your adapter project includes configuration files for Liberator and Transformer that define your adapter as a DataSource peer and provide routing directives for the subjects your adapter serves (data services).
Follow the steps below:
This section describes how to export your adapter's configuration in a config-only Caplin Platform Blade and deploy the blade to your Deployment Framework (DFW).
A config-only Caplin Platfom Blade contains only an adapter's configuration files. In addition to use in development, Caplin Platform Blades that contain only configuration files are used in production too. Liberator and Transformer use configuration blades for convenient activation and deactivation of their built-in features.
Export your adapter's configuration
Follow the steps below to export your adapter's configuration in a config-only Caplin Platform Blade:
- Open a Bash shell
Create a directory to hold new blades:
From the root directory of your CIS installation, run the CIS export command to export your adapter's configuration as a config-only blade. For example, to export the configuration for a project in directory ~/src/PricingAdapter, execute one of the commands below:
On Linux and MacOS, use Bash file paths for the project directory and the output directory:
java -jar tools/cis-blade-toolkit-version.jar \ export ~/src/PricingAdapter \ -o ~/blades \ --config-only
On Cygwin, use Microsoft Windows file paths for the project directory and the output directory:
java -jar tools/cis-blade-toolkit-version.jar \ export 'C:\\cygwin64\\home\\username\\src\\PricingAdapter' \ -o 'C:\\cygwin64\\home\\username\\blades' \ --config-only
Deploy your adapter's configuration
Follow the steps below to deploy your adapter's configuration to your Deployment Framework:
From the root directory of your Deployment Framework, run the command below to stop all running Platform components:
Copy your project's config-only blade to your Deployment Framework's kits directory. For example, to copy the config-only blade created in the previous section, execute the command below:
cp ~/blades/PricingAdapter-version.zip ~/DeploymentFramework-version/kits
From the root directory of your DFW, run the command below to deploy your blade:
From the root directory of your DFW, run the command below to start all Platform components:
Follow the steps below to configure Eclipse to run your adapter:
- In Eclipse, click Run > Run Configurations. The Run Configurations dialog appears.
- From the list of configuration types, right-click Java Application and select New
- In the Name box, type a name for this Run Configuration. A good choice would be the name of your adapter's project in Eclipse.
- In the Project box, click Browse, and select your adapter's project in Eclipse.
- In the Main class box, enter the fully-qualified name of the main class of your adapter.
- Click the Arguments tab
In the Working directory box, select Other, click File System, and select the path to your adapter's DataSource directory in your Deployment Framework.
If you're running Linux or MacOS, which recognise Unix symbolic links, then select the logical path to your adapter's DataSource directory:
If you're running Microsoft Windows, which does not recognise Unix symbolic links, then select the physical path to your adapter's DataSource directory:
If you created your project using the CIS Toolkit argument -i trading, then your adapter needs an additional command-line argument supplying the path to the adapter's trading-provider.properties file in your Deployment Framework. In the Program arguments field, add the following argument:
- Click the Environment tab, click New, and set a new environment variable CONFIG_BASE to the absolute path to your DFW's global config directory.
- Click the Common tab, and in Display in favorites menu, select Run.
- At the bottom of the dialog, click the Run button.
To run your adapter on subsequent occasions, click Run > Run, or press Ctrl-F11.