Tuscany RDB DAS exposed as an SCA service

Introduction

This is a sample SCA service that exposes DAS functionality.

This service would allow you to utilize DAS in a language neutral fashion, consuming existent or adHoc commands.

Consuming the DAS service

You should add the dependency on your client project pom file

<!-- DAS Service -->
<dependency>
   <groupId>org.apache.tuscany.das.samples</groupId>
   <artifactId>sample-das-service</artifactId>
   <version>${pom.version}</version>
</dependency>


In order to consume the service, you would have to create a SCDL that references it, see sample below:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="DASServiceComposite">
  <component name="DASServiceComponent">
     <implementation.composite name="DASServiceComposite" jarLocation="lib/sample-das-service-1.0-incubator-SNAPSHOT.jar"/>
  </component>
</composite>

Sample Architecture

This service utilizes the following Interface as its definition:


public interface DASService {

    public void configureService(InputStream configStream) throws DASServiceException;

    public DataObject executeCommand(String commandName, Vector commandArguments) throws DASServiceException;

    public DataObject execute(String adHocQuery, Vector commandArguments) throws DASServiceException;

    public void applyChanges(DataObject graphRoot) throws DASServiceException;

}