The Correlation RA Getting Started guide walks step by step deploying the RA and running an example SLEE service that is included in the package. This service can trigger the Correlation RA to allocate a correlation ID for specified data and retrieve the data with the allocated correlation ID.
Download and Unpack the Correlation RA
The Correlation RA package can be downloaded from Correlation Resource Adaptor. The RA package includes:
-
Resource Adaptor
-
Java doc
-
HTTP-based SLEE service example
Unpack the Correlation resource adaptor distribution package into $RHINO_HOME
.
If unpacked elsewhere, adjust the client.home configuration property in the build.properties file.
|
An example on how this is done in Rhino SDK is shown below:
$ cd RhinoSDK $ unzip correlation.zip $ cd correlation-XX/examples $ ant -p
Refer to Rhino SDK Getting Started Guide for information on installing a RhinoSDK or Rhino Production Getting Started Guide for information on installing a Rhino cluster.
Deploy the Correlation RA and example service
The property http.bindaddresses
in build.properties
specifies the IP address and port that the HTTP RA will attempt to listen on when it is activated.
The default address is 0.0.0.0 (ie. all interfaces).
The default port for RhinoSDK is 8000
.
For Rhino Production the default for node 101 is 8000
and for node 102 is 8001
.
Edit these properties if necessary for your environment. See detailed configuration in Configuring the HTTP Resource Adaptor
To deploy the example, using Ant, execute the deploy
target.
Ensure that the Rhino SDK or cluster is running. |
$ ant deploy
This will deploy the Correlation and HTTP resource adaptors, and the example service.
Use an HTTP client to test
The Correlation RA can be tested by using the example HTTP SLEE service.
The service is triggered by sending GET requests i.e. via curl with specified action
and data
in the request URL.
Here are some examples:
Command | Output | Description | ||
---|---|---|---|---|
|
12101 CorrelationResultEvent [correlationData=[109, 121, 100, 97, 116, 97], correlationId=12101] |
Allocate a correlation ID for test data The second action returns the test data associated with the correlation ID |
||
|
12102 CorrelationResultEvent [correlationData=[109, 121, 100, 97, 116, 97], correlationId=12102] |
Allocate a correlation ID for test data The second action creates an activity and then uses it for the async request. |
||
|
12102 CorrelationResult [async=true, data=[109, 121, 100, 97, 116, 97], id=12102] |
Allocate a correlation ID for test data The second action uses |