Tuscany Supply Chain Sample

Overview

The Tuscany Supply Chain sample illustrates a one-way invocation example in the context of a simple supply chain scenario. The scenario consists of the following components:
Customer, Retailer, Warehouse and Shipper. Request/response invocations flow down the chain from the Customer to the Shipper, and a one-way (asynchronous) invocation flows back from the Shipper to the Customer.

Location

This sample is located  in the samples\standalone\supplychain directory. All the following commands should be issued while working in the sample directory.

Prerequisites

Obtain the following prerequisites and install according to their documentation.

Building

To build the sample  issue :

mvn

The result after executing is in the target subdirectory the sample-supplychain.jar

Setup

Set up the Tuscany standalone runtime environment using the following command:

mvn dependency:unpack 

After completion there should be a target\distribution subdirectory created that has the Tuscany standalone runtime.

Running

Execute the following command: (cut and paste to command line)

java -jar target/distribution/bin/launcher.jar target/sample-supplychain.jar

Results

The sample when run should simply display to the standard output:

Main thread Thread[main,5,main]
Main thread sleeping ...
Work thread Thread[pool-1-thread-1,5,main] - Order, submitted, fulfilled, shipped