Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

1. Running from Tomcat configured by the build
This sample application is deployed (along with the canned test database) to an instance of Tomcat as part of our automated sample testing. This means you can run the java/das/samples/testing/tomcat build (see java/das/samples/testing/tomcat/readme.htm ) and then access the application by pointing your browser to http://localhost:8080/sample-companyweb/Image Removed.

2. Deploying the CompanyWeb WAR into a Tomcat you configure yourself
Alternatively, you can deploy the sample to your own configured Tomcat installation by following the
instructions below. These instructions assume that you have either 1) downloaded the Tuscany sample distribution or 2) Downloaded the Tuscany source and run our maven build, see the following link to more details steps on how to build DAS Sample applications http://incubator.apache.org/tuscany/java_das_overview.htmlImage Removed .

Set Up

  1. Download and install the most recent stable version of Tomcat 5.5. You can find it here:
    http://tomcat.apache.org/download-55.cgiImage Removed
  2. Download the most recent official release of Derby from here: http://db.apache.org/derby/index.htmlImage Removed.
    The only file you'll need from this download is derby.jar
  3. Stop Tomcat
  4. Copy derby.jar (from the derby distribution) to Tomcat_Home/common/lib
  5. Add the sample war file to Tomcat_Home/webapps
    a.sample-companyweb-xxx.war (e.g. "sample-companyweb-1.0-incubator-M2.war")
  6. Install the canned Derby database to Tomcat:
    a.First, create a new directory named "Databases" to hold the sample database.Create
    Tomcat_Home / Databases
    b.Copy the dastest folder (and all its contents) from (_build directory root OR where samples
    were unzipped_/java/das/samples/companyweb) to Tomcat_Home/Databases . (NOTE:

...

  1. If you are running
    this from a sample distribution, the canned database is available in the

...

  1. distribution, inside
    the databases directory. )
  2. Define a DataSource by adding a datasource definition to Tomcat_Home/conf/server.xml.
    a.Find the end-of-section marker </GlobalNamingResources> and add the following lines just above
    it: (Requirement: You must include the absolute path to the "Databases" directory in the above url
    attribute. Fore example: url="jdbc:derby:c:\apache-tomcat-5.5.17\Databases/dastest"/>)
    No Format
    
            <!-- Global Datasource for Derby dastest database -->
             <Resource name="jdbc/dastest"
                  type="javax.sql.DataSource"  auth="Container"
                  description="Derby database for DAS Company sample"
                  maxActive="100" maxIdle="30" maxWait="10000"
                  username="" password="" 
                  driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
                  url="jdbc:derby:{absolute path}Databases/dastest"/>
    

Requirement: You must include the absolute path to the "Databases" directory in the above url
attribute. Fore example:

url="jdbc:derby:c:\apache-tomcat-5.5.17\Databases/dastest"/>

  1. Start tomcat and point your browser to: http://localhost:8080/sample-companyweb-Image Removed version tag/
    example: http://localhost:8080/sample-companyweb-1.0-incubator-M2/Image Removed

Sample Architecture

...