Tuscany SCA Native Samples - HTTPD BigBank Sample
This sample implements the "Simplified BigBank" scenario. A whitepaper describing
the scenario based on the SCA 0.9 Assembly specification can be found
here.
This is a more modular version of the original Bigbank app, with the account
service and the account data service are in different composites.
The HTTPD BigBank sample requires the following extensions:
Please follow the documentation to ensure you have these extensions built and installed
on your system
There are three sub-projects in this workspace:
- bigbank.account
This contains the source code and SCDL artifacts for the SCA HTTPD BigBank
composite implementing the account services.
- bigbank.accountdata
This contains the source code and SCDL artifacts for the SCA HTTPD BigBank
composite implementing the account data services.
- bigbank.wsclient
A sample client which uses an SCA Web Service reference to make a remote
call to the BigBank service.
Additionally, there is the bigbank.app.composite file. This
describes the configuration of the SCA BigBank composite deployed to the SCA
runtime.
Note that this sample does not run on Windows, due to threading incompatibilities
between Apache HTTPD and the Ruby runtime
Building the HTTPD BigBank sample on Linux and Mac OS X
If using the binary distribution the samples are built and installed in
<tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux and Mac OS X.
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- As the HTTPD BigBank sample is based on Ruby scripts, a specific compilation step is not necessary -
only deployment is required. Deploy the Ruby samples only with the following command sequence:
- cd <tuscany_sca_install_dir>/samples
- ./configure --enable-ruby --enable-cpp=no --prefix=$TUSCANY_SCACPP/samples
- make install
NOTE: If you don't provide the --prefix configure option, it will by default install into
/usr/local/tuscany/sca/samples/HttpdBigBank
Running the HTTPD BigBank sample on Linux and Mac OS X
- The HTTPD BigBank sample requires the following extensions:
Please follow the documentation to ensure you have these extensions built and installed
on your system
- Ensure you have enabled Axis2/C to run Tuscany SCA services. Follow the instructions
found here.
- Start the Apache HTTPD server:
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to Axis2/C version 0.96>
- cd <tuscany_sca_install_dir>/samples/HttpdBigBank/deploy/httpserver
- ./startserver.sh
NOTE: Depending on your installation of Apache HTTPD you may need to log in as root before following
these steps. If so, you may also need to uncomment the User and Group directives in the
<tuscany_sca_install_dir>/samples/HttpdBigBank/deploy/httpserver/conf/httpd.conf file
and set these to the appropriate username and group that the server should run as
- Now run the Web Service client:
- The following environment variables are required:
- TUSCANY_SCACPP=<path to installed Tuscany SCA>
- TUSCANY_SDOCPP=<path to installed Tuscany SDO>
- AXIS2C_HOME=<path to Axis2/C version 0.96>
- Run the sample with the following commands:
- cd <tuscany_sca_install_dir>/samples/HttpdBigBank/deploy/bigbank.wsclient
- ./runwsclient.sh
- The PHP web client detailed in the
CppBigBank sample can also be used
with the HTTPD BigBank service that is served by the HTTPD server started above.
The HTTPD BigBank sample on Windows
The HttpdBigBank sample does not currently run on Windows, due to the sample being based on Ruby
components running under Apache HTTPD. The Ruby runtime is single-threaded and, on Windows, HTTPD
is multi-threaded, which means that Ruby throws "cross-thread violation" errors when Tuscany
attempts to run a Ruby script under HTTPD.