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.

  1. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  2. 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

  1. The HTTPD BigBank sample requires the following extensions: Please follow the documentation to ensure you have these extensions built and installed on your system
  2. Ensure you have enabled Axis2/C to run Tuscany SCA services. Follow the instructions found here.
  3. Start the Apache HTTPD server:
    1. 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>
    2. cd <tuscany_sca_install_dir>/samples/HttpdBigBank/deploy/httpserver
    3. ./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
  4. Now run the Web Service client:
    1. 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>
    2. Run the sample with the following commands:
      • cd <tuscany_sca_install_dir>/samples/HttpdBigBank/deploy/bigbank.wsclient
      • ./runwsclient.sh
  5. 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.

Getting Help

The first place to look is at the Tuscany SCA FAQ at http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+SCA+-+FAQ

Any problem with this release can be reported to the Tuscany mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.