
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
36 lines
2.3 KiB
Text
36 lines
2.3 KiB
Text
Tuscany implementation SDO
|
|
===============================
|
|
Persistence technology is a very part of enterprise level application system. Tuscany has provided
|
|
SDO implementation and a non standard but useful DAS infrastructure. This module leverages the SDO-
|
|
DAS integration to provide basic CRUD support for the SCA components' interaction with DataSource. The
|
|
current Tuscany DAS implementation is RDB DAS and so this module demonstrates CRUD support for Database
|
|
Operations.
|
|
|
|
This module is under the process of more improvement: Integration with policy-transaction is yet TBD.
|
|
|
|
For the time being, user of this module could configure a component as did by the *.composite file
|
|
in this module. It supports org.apache.tuscany.sca.implementation.data.collection.Collection interface.
|
|
It is a very generic interface supporting CRUD operations. User of this module could use all the method
|
|
provided by this interface. Also this module uses tuscany-data-engine-helper module for the common refactored
|
|
methods.
|
|
|
|
As this is exposing SDO as a way of data transfer, when referring to above interface parameterized APIs,
|
|
the user will see that in <K(ey), D(data)> parameters, K is a List of Primary Key column values and D is
|
|
a DataObject. K is supported as a List instead of a String to take care of compound PKs often encountered in
|
|
Data Sources. Also, when using put((K key, D item), D - DataObject is required to be DataGraph with ChangeSummary
|
|
to truly use the potential of SDO.
|
|
|
|
The data base working in this module is now Derby, it is for the ease of test running. MySQL could also work
|
|
with this module, but it need database deployment in before.
|
|
|
|
The test case uses RDB DAS utility tuscany-samples-dbconfig for database creation and initialization.
|
|
|
|
User could get start from looking at what is done by:
|
|
org.apache.tuscany.sca.implementation.openjpa.ImplSDOTestCase
|
|
and
|
|
sdo.composite
|
|
|
|
In sdo.composite, implementation.sdo supports two attributes - {"table" - name of table for which CRUD is required
|
|
and "key" - comma separated column names consisting of PKs of the table. If attribute "key" is omitted, "ID" is assumed
|
|
to be the PK column name as convention.} and one element connectionInfo supplying necessary information to connect to
|
|
the RDB data source.
|