You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Nash <na...@apache.org> on 2009/05/13 01:17:55 UTC

Restructuring the travel sample code

I have started to restructure the travel sample code.  In the new
structure, all the contributions are grouped together under a
"contributions" folder and all the launchers are grouped together
under a "launchers" folder.  Each launcher uses a selection of
contributions from the "contributions" folder.

Instead of the chapter-xx names, the new structure uses names that
reflect the functionality of the contributions and launchers.

I have started to populate the new structure by copying files from
shared-contributions, chapter-02, and chapter-05 and making the
necessary adjustments to fit the new structure, as well as a few
other minor cleanups.  I have not made any changes to the current
chapter-based structure.

My next task is to copy the code from chapter-09 and chapter-06 to
the new structure and get it working there.  I will also create a
consistent set of build.xml files in the new structure so that all
the code can be built and run using ant as well as mvn.

The following list should help people find things in the new structure.
The format of each line is currentLocation --> newLocation.

  shared-contributions/*-contribution --> contributions/*-contribution
  chapter-02/*-contribution --> contributions/introduction-*-contribution
  chapter-05/*-contribution --> contributions/interaction-*-contribution
  chapter-02/node --> launchers/introduction-launcher
  chapter-02/node-jumpstart --> launchers/jumpstart-launcher
  chapter-05/node --> launchers/interaction-launcher

A few notes on issues I have found:

1. The pom.xml in chapter-02/node-jumpstart had 1.6-SNAPSHOT
    dependencies.  I got test case runtime errors trying to use this,
    so I changed the jumpstart-launcher version of this POM to use
    1.5-SNAPSHOT, which runs OK for me.

2. I commented out the use of maven-ant-generator in the pom.xml
    for interaction-launcher and interaction-ui-generator.  This
    was producing dependencies on "../../modules" and "../../lib",
    which only works from inside a Tuscany distribution.

3. Running launchers/interaction-launcher using "ant run" gives
    the following error:
    [java] 12-May-2009 23:30:36 org.apache.tuscany.sca.policy.xml.
      PolicySetProcessor
    [java] SEVERE: Provided Intent - {http://www.osoa.org/xmlns/sca/1.0}
      managedTransaction.global not found for PolicySet {http://www.osoa.
      org/xmlns/sca/1.0}ps2
    [java] 12-May-2009 23:30:37 org.apache.tuscany.sca.assembly.xml.
       CompositeProcessor
    [java] SEVERE: PolicyValidation exception when processing
       implementation of component CustomerRegistryComponent due to
       Policy Intent '{http://www.osoa.org/xmlns/sca/1.0}managedTransaction
       .global' is not defined in this domain  .
    [java] org.osoa.sca.ServiceRuntimeException: org.osoa.sca.
       ServiceRuntimeException: Provided Intent - {http://www.osoa.org/
       xmlns/sca/1.0}managedTransaction.global not found for PolicySet
       {http://www.osoa.org/xmlns/sca/1.0}ps2

   Simon