Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To get started with Java DAS, follow the downloads link and pick up either a binary or source distribution. If you are working from a source distribution, you can follow the general instructions for building the whole of the Tuscany java projects, or you can follow the intructions within the DAS Java overview to build and explore just DAS java.

DAS Java Overview

Currently, the project's code base includes an implementation of a DAS RDB (relational database) with following key features :

DAS Java Project Structure

This needs to be updated to reflect the new DAS structure which will include LDAP and XQuery

The DAS RDB project is divided into three parts:

das.rdb contains the DAS interfaces and the RDB (Relational Database) runtime implementation.

samples.das provides sample applications based on DAS.

distribution.das provides DAS binaries distribution with required dependencies.

distribution.das-samples provides DAS samples distribution as a ready-to-deploy war file.

DAS high level class diagram

Image Removed

Build Environment Setup

Tuscany Build Environment Setup

DAS is a subproject of the Tuscany Java project subtree. If you check out and build the whole Tuscany Java project, you will have also built the DAS subproject. If you want to work with the DAS project, without the rest of Tuscany, skip to the next section.

To build the whole Tuscany project follow these instructions.

Build Environment Setup

...


Show how this can be done

Build DAS subproject

Set up your environment using the instructions for building the whole of Tuscany, but only download and install Java 5, Maven and Svn

...

Run "mvn" under <local tuscany dir>/java directory to install POM files from the root project to the local repository

Commands:

cd <local tuscany dir>/java/das
mvn

Notes:

If the mvn command completed successfully, you will see BUILD SUCCESSFUL in the output and tuscany-das-rdb-1.0-SNAPSHOP.jar is created under <local tuscany dir>/java/das/rdb/target directory.

[Note: External resources are at times unavailable. It may be necessary to run "mvn" again at a later time.If you are taking time to reply to firewall prompts, this can cause some requests to
Use of Firewall can cause time out. Set up the firewall to permit the action without prompting.]

Building Javadoc for DAS

In order to build DAS Javadocs, you will need to build the a specific maven profile called "javadoc"Commands:

cd <local tuscany dir>/java/das
mvn -P javadoc

Note: Javadoc will be become available at <local tuscany dir>/java/das/rdb/target/apidocs/index.html.

Dependency Jars for DAS.RDB

The DAS.RDB project has a dependency on SDO and requires the following SDO runtime jars to build

sdo-api-r2.0.1-1.0-SNAPSHOT.jar - SDO 2.0 Interfaces
tuscany-sdo-impl-1.0-SNAPSHOT.jar - SDO 2.0 implementation

...

common-2.2.1.jar - some common framework utility and base classes
ecore-2.2.1.jar - the EMF core runtime implementation classes (the Ecore metamodel)
ecore-change-2.2.1.jar - the EMF change recorder and framework
ecore-xmi-2.2.1.jar - EMF's default XML (and XMI) serializer and loader
xsd-2.2.1.jar - the XML Schema model
log4j-1.2.12.jar - log4j logging framework

Running DAS Samples

DAS provide sample a CompanyWeb scenario where it exposes some of the DAS Features integrated in a J2EE webapp.
Follow the steps below to be able to run the samples in a J2EE webserver (in our case Apache Tomcat)

...

checkout DAS Sample from SVN repository:
md 'local tuscany dir'
cd 'local tuscany dir'
svn co https://svn.apache.org/repos/asf/incubator/tuscany/java/dasImage Modified das

use maven to build the CompanyWeb war file:

cd das\samples
mvn

use maven to deploy the CompanyWeb war file to Tomcat

mvn tomcat:deploy

There are also some sample applications that use a mix of SCA, SDO and DAS. See "Running the Samples" on the Java project page for details.
Please check to make sure this is correct

From a DAS Sample distribution (starting with M2):

...

Extract the companyweb war file Follow and follow regular deployment procedures to deploy the war file

Running Tuscany DAS Unit Tests

DAS is currently providing two sets of unit tests

...

HTMLUnit tests integrated with Tomcat for DAS CompanyWeb sample applicationBelow we are going to describe how you can exercise these two sets of tests, and we recommend you running them after contributing code/patches for DAS to validate that your new changes are not introducing

any regressionsPlease run unit tests as a good practice before submitting your contribution.

Running DAS tests as part of the build

-cd 'local tuscany dir'/java/das_
mvn test

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.tuscany.das.rdb.test.suites.AllTestsDerby
Setting up for Derby run
Ending Derby run
Tests run: 137, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.468 sec

...

INFO ------------------------------------------------------------------------
INFO BUILD SUCCESSFUL
INFO ------------------------------------------------------------------------
INFO Total time: 57 seconds
INFO Finished at: Tue Oct 03 12:06:13 PDT 2006
INFO Final Memory: 5M/10M
INFO ------------------------------------------------------------------------

Running DAS CompanyWeb tests in tomcat

Download tomcat distribution into your local filesystem : http://tomcat.apache.org/

...

checkout DAS Sample from SVN repository:

md 'local tuscany dir'
cd 'local tuscany dir'
svn co https://svn.apache.org/repos/asf/incubator/tuscany/java/dasImage Modified das

use maven run the DAS CompanyWeb tests in Tomcat:

cd das/samples/testing/tomcat
mvn

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.tuscany.test.das.DasTestCase
Running:HomePage SUCCESS!!!
Running:AllCompanies SUCCESS!!!
Running:AllCompaniesDepartments SUCCESS!!!
Running:AddDepartmentToFirstCompany SUCCESS!!!
Running:ChangeCompanyDepartmentNames SUCCESS!!!
Running:DeleteCompanyOneDepartments SUCCESS!!!
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.911 sec

...

Note: Due to a current limitation, you must run mvn clean before you can run the tests a second time

...

DAS RDB Code Structure

Currently, the project's code base includes an implementation of a DAS RDB (relational database) and it is divided into three parts:

1. das.rdb contains the DAS interfaces and the RDB (Relational Database) runtime implementation.

2. samples.das provides sample applications based on DAS.

3. distribution.das provides DAS binaries distribution with required dependencies.

Please note that distribution.das-samples provides DAS samples distribution as a ready-to-deploy war file.

Following diagram shows the high level class diagram for RDB DAS.
Should the following be moved to architecture guide for RDB DAS?

Image Added

...