You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2017/07/17 14:00:04 UTC

[1/9] polygene-java git commit: Merge branch 'release/3.0.0-RC2' into develop

Repository: polygene-java
Updated Branches:
  refs/heads/develop c33ef71f7 -> 1bdeea8bd
  refs/heads/master 6f4e6667a -> 464da13e6
Updated Tags:  refs/tags/3.0.0-RC3 [created] f68e236f2


Merge branch 'release/3.0.0-RC2' into develop


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/c8b40a21
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/c8b40a21
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/c8b40a21

Branch: refs/heads/master
Commit: c8b40a213379960de0703eef0fbdac47ec013b64
Parents: ae9506a 357eb4e
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 13:52:01 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 13:52:01 2017 +0200

----------------------------------------------------------------------
 extensions/indexing-sql/dev-status.xml  | 6 +++---
 tools/generator-polygene/dev-status.xml | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[5/9] polygene-java git commit: Remove SQL Support Sample as it depends on indexing-sql

Posted by pa...@apache.org.
Remove SQL Support Sample as it depends on indexing-sql

And Samples are not managed through the release specification.
This commit should be reverted on `develop` once the release is out.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/c33ef71f
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/c33ef71f
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/c33ef71f

Branch: refs/heads/master
Commit: c33ef71f7c3a3d08d15b3492f706d82876798454
Parents: 3168fdb
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:19:09 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:19:09 2017 +0200

----------------------------------------------------------------------
 .../entitystore-sqlkv/src/docs/es-sqlkv.txt     |   3 -
 extensions/indexing-sql/src/docs/index-sql.txt  |   3 -
 libraries/sql/src/docs/sql.txt                  |   3 -
 manual/src/docs/website/samples.txt             |  31 ----
 samples/sql-support/build.gradle                |  46 ------
 .../sample/sqlsupport/AppAssembler.java         | 111 -------------
 .../apache/polygene/sample/sqlsupport/Main.java | 160 -------------------
 .../sample/sqlsupport/PretextEntity.java        |  29 ----
 .../resources/entitystore-postgresql.properties |  22 ---
 .../src/main/resources/indexing-sql.properties  |  22 ---
 .../postgresql-es-datasource.properties         |  25 ---
 .../postgresql-index-datasource.properties      |  25 ---
 settings.gradle                                 |   1 -
 13 files changed, 481 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt b/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
index f36e39d..9e1cde5 100644
--- a/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
+++ b/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
@@ -32,9 +32,6 @@ get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integrat
 
 The database schema is managed using <<library-sql-liquibase>>.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
-<<extension-indexing-sql>>.
-
 The following SQL databases are supported:
 
 - http://www.postgresql.org/[PostgreSQL]

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/extensions/indexing-sql/src/docs/index-sql.txt
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/docs/index-sql.txt b/extensions/indexing-sql/src/docs/index-sql.txt
index aa9f56d..1bb1b3c 100644
--- a/extensions/indexing-sql/src/docs/index-sql.txt
+++ b/extensions/indexing-sql/src/docs/index-sql.txt
@@ -28,9 +28,6 @@ source=extensions/indexing-sql/dev-status.xml
 This extension fully leverage the <<library-sql>> meaning that you must use it to assemble your DataSource and that you
 get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integration for free.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
-<<extension-indexing-sql>>.
-
 The following SQL databases are supported:
 
 - http://www.postgresql.org/[PostgreSQL]

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/libraries/sql/src/docs/sql.txt
----------------------------------------------------------------------
diff --git a/libraries/sql/src/docs/sql.txt b/libraries/sql/src/docs/sql.txt
index 4ffea6b..08f9e75 100644
--- a/libraries/sql/src/docs/sql.txt
+++ b/libraries/sql/src/docs/sql.txt
@@ -31,9 +31,6 @@ The SQL Library provides facilities for working with SQL databases.
 The center piece is the DataSource support that comes with
 <<library-circuitbreaker>> and <<library-jmx>> support.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
-<<extension-indexing-sql>>.
-
 Moreover, supplementary libraries helps dealing with different connection pool implementations and schema migrations.
 None of theses libraries depends on an actual JDBC driver, you are free to use the one that suits your needs.
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/manual/src/docs/website/samples.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/website/samples.txt b/manual/src/docs/website/samples.txt
index 31232eb..18e672a 100644
--- a/manual/src/docs/website/samples.txt
+++ b/manual/src/docs/website/samples.txt
@@ -60,37 +60,6 @@ https://github.com/apache/polygene-java/tree/develop/samples/rental[Browse Sourc
 //
 // https://github.com/apache/polygene-java/tree/develop/samples/scala[Browse Source]
 
-[[sample-sql-support,SQL Support Sample]]
-== SQL Support Sample ==
-
-NOTE: This sample use PostgreSQL and drop all of its data once run in order to be runnable multiple times.
-
-Sample of how to fully use Polygene™ SQL support : <<library-sql>>, <<extension-es-sqlkv>> and <<extension-indexing-sql>>.
-
-https://github.com/apache/polygene-java/tree/develop/samples/sql-support[Browse Source]
-
-Here are the steps needed to setup the database using the `psql` utility command:
-
-[source,bash]
-----
-user@host $ psql postgres
-postgres=# CREATE USER jdbc_test_login WITH PASSWORD 'password';
-CREATE ROLE
-postgres=# CREATE DATABASE jdbc_test_db;
-CREATE DATABASE
-postgres=# GRANT ALL PRIVILEGES ON DATABASE jdbc_test_db TO jdbc_test_login;
-GRANT
-postgres=# \q
-user@host $  psql -d jdbc_test_db</strong>
-postgres=# CREATE EXTENSION ltree;
-CREATE EXTENSION
-postgres=# \q
-user@host $
-----
-
-From the sources you can run the `runSqlSupportSample` Gradle task to run the example.
-See <<build-system>> if you need some guidance.
-
 [[sample-swing,Swing Bindings Sample]]
 == Swing Bindings Sample ==
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/build.gradle
----------------------------------------------------------------------
diff --git a/samples/sql-support/build.gradle b/samples/sql-support/build.gradle
deleted file mode 100644
index 19acd12..0000000
--- a/samples/sql-support/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-import org.apache.polygene.gradle.TaskGroups
-
-apply plugin: 'polygene-sample'
-
-description = "SQL Support Sample."
-
-jar { manifest { name = "Apache Polygene™ Sample - SQL Support" } }
-
-dependencies {
-
-  implementation polygene.core.bootstrap
-  implementation polygene.library( 'sql-dbcp' )
-  implementation polygene.extension( 'entitystore-preferences' )
-  implementation polygene.extension( 'entitystore-sqlkv' )
-  implementation polygene.extension( 'indexing-sql' )
-
-  runtimeOnly polygene.core.runtime
-  runtimeOnly libraries.postgres
-  runtimeOnly libraries.logback
-}
-
-task( runSqlSupportSample, dependsOn: 'classes', type: JavaExec ) {
-  group = TaskGroups.SAMPLES
-  description = "Runs $project.name sample."
-  main = 'org.apache.polygene.sample.sqlsupport.Main'
-  classpath = sourceSets.main.runtimeClasspath
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
deleted file mode 100644
index 716c954..0000000
--- a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.sample.sqlsupport;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.ApplicationAssembler;
-import org.apache.polygene.bootstrap.ApplicationAssembly;
-import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
-import org.apache.polygene.bootstrap.LayerAssembly;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
-import org.apache.polygene.index.sql.assembly.PostgreSQLIndexQueryAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.datasource.DataSources;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-
-/**
- * Assemble the Application.
- *
- * Use SQL EntityStore and SQL Index/Query for Persistence using PostgreSQL.
- * EntityStore and Index/Query use different DataSource in order to allow splitting the two in two servers/databases.
- */
-public class AppAssembler
-    implements ApplicationAssembler
-{
-
-    @Override
-    public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
-    {
-        ApplicationAssembly appAss = applicationFactory.newApplicationAssembly();
-        appAss.setName( "SQL Support Sample" );
-
-        // Config
-        LayerAssembly configLayer = appAss.layer( "config" );
-        ModuleAssembly configModule = configLayer.module( "config" );
-        {
-            configModule.services( MemoryEntityStoreService.class ).
-                visibleIn( Visibility.module );
-            // Use a PreferenceEntityStore instead if you want the configuration to be persistent
-            // new PreferenceEntityStoreAssembler( Visibility.module ).assemble( configModule );
-        }
-
-        // Infra
-        LayerAssembly infraLayer = appAss.layer( "infra" );
-        ModuleAssembly persistenceModule = infraLayer.module( "persistence" );
-        {
-            // SQL DataSource Service
-            String dataSourceServiceIdentity = "postgresql-datasource-service";
-            new DBCPDataSourceServiceAssembler().
-                identifiedBy( dataSourceServiceIdentity ).
-                visibleIn( Visibility.module ).
-                withConfig( configModule, Visibility.application ).
-                assemble( persistenceModule );
-
-            // SQL EntityStore DataSource and Service
-            new DataSourceAssembler().
-                withDataSourceServiceIdentity( dataSourceServiceIdentity ).
-                identifiedBy( "postgresql-es-datasource" ).
-                visibleIn( Visibility.module ).
-                withCircuitBreaker( DataSources.newDataSourceCircuitBreaker() ).assemble( persistenceModule );
-            new PostgreSQLEntityStoreAssembler().
-                visibleIn( Visibility.application ).
-                withConfig( configModule, Visibility.application ).
-                assemble( persistenceModule );
-
-            // SQL Index/Query DataSource and Service
-            new DataSourceAssembler().
-                withDataSourceServiceIdentity( dataSourceServiceIdentity ).
-                identifiedBy( "postgresql-index-datasource" ).
-                visibleIn( Visibility.module ).
-                withCircuitBreaker().
-                assemble( persistenceModule );
-            new PostgreSQLIndexQueryAssembler().
-                visibleIn( Visibility.application ).
-                withConfig( configModule, Visibility.application ).
-                assemble( persistenceModule );
-        }
-
-        // App
-        LayerAssembly appLayer = appAss.layer( "app" );
-        ModuleAssembly domainModule = appLayer.module( "domain" );
-        {
-            domainModule.entities( PretextEntity.class );
-        }
-
-        // Uses
-        infraLayer.uses( configLayer );
-        appLayer.uses( infraLayer );
-
-        return appAss;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/Main.java
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/Main.java b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/Main.java
deleted file mode 100644
index 5a96f31..0000000
--- a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/Main.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.sample.sqlsupport;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.polygene.api.entity.EntityBuilder;
-import org.apache.polygene.api.query.Query;
-import org.apache.polygene.api.query.QueryBuilder;
-import org.apache.polygene.api.structure.Application;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.bootstrap.Energy4Java;
-import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
-import org.apache.polygene.index.sql.assembly.PostgreSQLIndexQueryAssembler;
-import org.apache.polygene.library.sql.common.SQLConfiguration;
-import org.apache.polygene.library.sql.common.SQLUtil;
-
-import static org.apache.polygene.api.query.QueryExpressions.eq;
-import static org.apache.polygene.api.query.QueryExpressions.templateFor;
-
-/**
- * SQL Support Sample Main Class.
- * <p><strong>psql postgres</strong></p>
- * <p>CREATE USER jdbc_test_login WITH PASSWORD 'password';</p>
- * <p>CREATE DATABASE jdbc_test_db;</p>
- * <p>GRANT ALL PRIVILEGES ON DATABASE jdbc_test_db TO jdbc_test_login;</p>
- * <p><strong>psql -d jdbc_test_db</strong></p>
- * <p>CREATE EXTENSION ltree;</p>
- */
-public class Main
-{
-
-    public static void main( String[] args )
-            throws Exception
-    {
-        final Application application = new Energy4Java().newApplication( new AppAssembler() );
-        application.activate();
-        Runtime.getRuntime().addShutdownHook( new Thread( new Runnable()
-        {
-            @Override
-            @SuppressWarnings( "CallToThreadDumpStack" )
-            public void run()
-            {
-                try {
-                    application.passivate();
-                } catch ( Exception ex ) {
-                    System.err.println( "Unable to passivate Polygene application!" );
-                    ex.printStackTrace();
-                }
-            }
-
-        } ) );
-        Module domainModule = application.findModule( "app", "domain" );
-
-        int exitStatus = 0;
-
-        try {
-
-            UnitOfWork uow = domainModule.unitOfWorkFactory().newUnitOfWork();
-            EntityBuilder<PretextEntity> builder = uow.newEntityBuilder( PretextEntity.class );
-            PretextEntity pretext = builder.instance();
-            pretext.reason().set( "Testing purpose" );
-            builder.newInstance();
-            uow.complete();
-
-            uow = domainModule.unitOfWorkFactory().newUnitOfWork();
-            QueryBuilder<PretextEntity> queryBuilder = domainModule.newQueryBuilder( PretextEntity.class );
-            queryBuilder = queryBuilder.where( eq( templateFor( PretextEntity.class ).reason(), "Testing purpose" ) );
-            Query<PretextEntity> query = uow.newQuery( queryBuilder );
-            pretext = query.find();
-            if ( pretext == null ) {
-                System.err.println( "ERROR: Unable to find pretext!" );
-                exitStatus = -1;
-            } else {
-                System.out.println( "SUCCESS: Found Pretext with reason: " + pretext.reason().get() );
-            }
-            uow.discard();
-
-        } finally {
-            deleteData( application.findModule( "infra", "persistence" ) );
-        }
-
-        System.exit( exitStatus );
-    }
-
-    /**
-     * Completely delete data so the sample can be run multiple times.
-     */
-    private static void deleteData( Module persistenceModule )
-            throws SQLException
-    {
-        // EntityStore Data
-        {
-            UnitOfWork uow = persistenceModule.unitOfWorkFactory().newUnitOfWork();
-            try {
-                SQLConfiguration config = uow.get( SQLConfiguration.class, PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY );
-                Connection connection = persistenceModule.findService( DataSource.class ).get().getConnection();
-                connection.setAutoCommit( false );
-                connection.setReadOnly( false );
-                String schemaName = config.schemaName().get();
-
-                Statement stmt = null;
-                try {
-                    stmt = connection.createStatement();
-                    stmt.execute( "DROP SCHEMA " + schemaName + " CASCADE" );
-                    connection.commit();
-                } finally {
-                    SQLUtil.closeQuietly( stmt );
-                }
-            } finally {
-                uow.discard();
-            }
-        }
-
-        // Indexing Data
-        {
-            UnitOfWork uow = persistenceModule.unitOfWorkFactory().newUnitOfWork();
-            try {
-                SQLConfiguration config = uow.get( SQLConfiguration.class, PostgreSQLIndexQueryAssembler.DEFAULT_IDENTITY  );
-                Connection connection = persistenceModule.findService( DataSource.class ).get().getConnection();
-                connection.setAutoCommit( false );
-                connection.setReadOnly( false );
-                String schemaName = config.schemaName().get();
-
-                Statement stmt = null;
-                try {
-                    stmt = connection.createStatement();
-                    stmt.execute( "DROP SCHEMA " + schemaName + " CASCADE" );
-                    connection.commit();
-                } finally {
-                    SQLUtil.closeQuietly( stmt );
-                    SQLUtil.closeQuietly( connection );
-                }
-            } finally {
-                uow.discard();
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/PretextEntity.java
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/PretextEntity.java b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/PretextEntity.java
deleted file mode 100644
index f487a57..0000000
--- a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/PretextEntity.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.sample.sqlsupport;
-
-import org.apache.polygene.api.property.Property;
-
-public interface PretextEntity
-{
-
-    Property<String> reason();
-
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/resources/entitystore-postgresql.properties
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/resources/entitystore-postgresql.properties b/samples/sql-support/src/main/resources/entitystore-postgresql.properties
deleted file mode 100644
index 48cd452..0000000
--- a/samples/sql-support/src/main/resources/entitystore-postgresql.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-
-schemaName=sql_sample_entitystore

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/resources/indexing-sql.properties
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/resources/indexing-sql.properties b/samples/sql-support/src/main/resources/indexing-sql.properties
deleted file mode 100644
index 700b84f..0000000
--- a/samples/sql-support/src/main/resources/indexing-sql.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-
-schemaName=sql_sample_indexing

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/resources/postgresql-es-datasource.properties
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/resources/postgresql-es-datasource.properties b/samples/sql-support/src/main/resources/postgresql-es-datasource.properties
deleted file mode 100644
index ea16c45..0000000
--- a/samples/sql-support/src/main/resources/postgresql-es-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-url=jdbc:postgresql://localhost:5432/jdbc_test_db
-driver=org.postgresql.Driver
-username=jdbc_test_login
-password=password

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/samples/sql-support/src/main/resources/postgresql-index-datasource.properties
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/resources/postgresql-index-datasource.properties b/samples/sql-support/src/main/resources/postgresql-index-datasource.properties
deleted file mode 100644
index ea16c45..0000000
--- a/samples/sql-support/src/main/resources/postgresql-index-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-url=jdbc:postgresql://localhost:5432/jdbc_test_db
-driver=org.postgresql.Driver
-username=jdbc_test_login
-password=password

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c33ef71f/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 92e3bf0..7cb671f 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -96,7 +96,6 @@ include 'core:api',
         'samples:dci',
         'samples:forum',
         'samples:rental',
-        'samples:sql-support',
         'samples:swing'
 
 include 'internals:testsupport-internal'


[3/9] polygene-java git commit: Rename entitystore-sql to entitystore-sqlkv

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
deleted file mode 100644
index 83e8a21..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.junit.BeforeClass;
-
-import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
-
-public class SQLiteEntityStoreTest extends AbstractEntityStoreTest
-{
-    @BeforeClass
-    public static void beforeClass_IBMJDK()
-    {
-        assumeNoIbmJdk();
-    }
-
-    @Override
-    // START SNIPPET: assembly
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        // END SNIPPET: assembly
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
-        // START SNIPPET: assembly
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "sqlite-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
-            .identifiedBy( "sqlite-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new SQLiteEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-    }
-    // END SNIPPET: assembly
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
deleted file mode 100644
index 6dc5fbe..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-import org.junit.BeforeClass;
-
-import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
-
-public class SQLiteEntityStoreTestSuite extends EntityStoreTestSuite
-{
-    @BeforeClass
-    public static void beforeClass_IBMJDK()
-    {
-        assumeNoIbmJdk();
-    }
-
-    @Override
-    protected void defineStorageModule( ModuleAssembly module )
-    {
-        module.defaultServices();
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "sqlite-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
-            .identifiedBy( "sqlite-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new SQLiteEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/derby-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/derby-datasource.properties b/extensions/entitystore-sql/src/test/resources/derby-datasource.properties
deleted file mode 100644
index 35261ab..0000000
--- a/extensions/entitystore-sql/src/test/resources/derby-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-url=jdbc:derby:memory:testdb;create=true
-driver=org.apache.derby.jdbc.EmbeddedDriver
-username=
-password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/h2-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/h2-datasource.properties b/extensions/entitystore-sql/src/test/resources/h2-datasource.properties
deleted file mode 100644
index 74abf51..0000000
--- a/extensions/entitystore-sql/src/test/resources/h2-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-url=jdbc:h2:mem:test
-driver=org.h2.Driver
-username=
-password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/logback.xml b/extensions/entitystore-sql/src/test/resources/logback.xml
deleted file mode 100644
index 03fb4dd..0000000
--- a/extensions/entitystore-sql/src/test/resources/logback.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-<configuration>
-
-    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
-        <layout class="ch.qos.logback.classic.PatternLayout">
-            <Pattern>[@%-10thread] %-5level %logger{42} - %msg%n</Pattern>
-        </layout>
-    </appender>
-
-    <root level="info">
-        <appender-ref ref="stdout" />
-    </root>
-
-    <logger name="org.apache.polygene.entitystore.sql" level="debug"/>
-
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/mysql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/mysql-datasource.properties b/extensions/entitystore-sql/src/test/resources/mysql-datasource.properties
deleted file mode 100644
index a2f4175..0000000
--- a/extensions/entitystore-sql/src/test/resources/mysql-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-#url=jdbc:mysql://localhost:3306/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
-driver=com.mysql.cj.jdbc.Driver
-username=root
-password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/postgresql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/postgresql-datasource.properties b/extensions/entitystore-sql/src/test/resources/postgresql-datasource.properties
deleted file mode 100644
index bdda284..0000000
--- a/extensions/entitystore-sql/src/test/resources/postgresql-datasource.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-driver=org.postgresql.Driver
-username=jdbc_test_login
-password=password

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/resources/sqlite-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/resources/sqlite-datasource.properties b/extensions/entitystore-sql/src/test/resources/sqlite-datasource.properties
deleted file mode 100644
index 17e52b5..0000000
--- a/extensions/entitystore-sql/src/test/resources/sqlite-datasource.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-#
-#
-
-enabled=true
-url=jdbc:sqlite::memory:
-driver=org.sqlite.JDBC
-username=
-password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/build.gradle b/extensions/entitystore-sqlkv/build.gradle
new file mode 100644
index 0000000..b13b95a
--- /dev/null
+++ b/extensions/entitystore-sqlkv/build.gradle
@@ -0,0 +1,46 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+
+apply plugin: 'polygene-extension'
+
+description = "Apache Polygene™ SQL Key/Value EntityStore Extension"
+
+jar { manifest { name = "Apache Polygene™ Extension - EntityStore - SQL Key/Value" } }
+
+dependencies {
+  api polygene.core.bootstrap
+  api polygene.library( 'sql' )
+  api libraries.jooq
+
+  implementation polygene.library( 'sql-liquibase' )
+
+  runtimeOnly polygene.core.runtime
+
+  testImplementation polygene.internals.testsupport
+  testImplementation polygene.library( 'sql-dbcp' )
+  testImplementation libraries.docker_junit
+
+  testRuntimeOnly libraries.logback
+  testRuntimeOnly libraries.derby
+  testRuntimeOnly libraries.h2
+  testRuntimeOnly libraries.mysql_connector
+  testRuntimeOnly libraries.postgres
+  testRuntimeOnly libraries.sqlite
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/dev-status.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/dev-status.xml b/extensions/entitystore-sqlkv/dev-status.xml
new file mode 100644
index 0000000..8d582e2
--- /dev/null
+++ b/extensions/entitystore-sqlkv/dev-status.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  ~
+  -->
+<module xmlns="http://polygene.apache.org/schemas/2008/dev-status/1"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://polygene.apache.org/schemas/2008/dev-status/1
+        http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
+  <status>
+        <!--none,early,beta,stable,mature-->
+        <codebase>stable</codebase>
+
+        <!-- none, brief, good, complete -->
+        <documentation>good</documentation>
+
+        <!-- none, some, good, complete -->
+        <unittests>good</unittests>
+    </status>
+    <licenses>
+        <license>ALv2</license>
+    </licenses>
+</module>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt b/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
new file mode 100644
index 0000000..f36e39d
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt
@@ -0,0 +1,166 @@
+///////////////////////////////////////////////////////////////
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+///////////////////////////////////////////////////////////////
+
+[[extension-es-sqlkv, SQL Key/Value EntityStore]]
+= SQL Key/Value EntityStore =
+
+[devstatus]
+--------------
+source=extensions/entitystore-sqlkv/dev-status.xml
+--------------
+
+EntityStore service backed by a SQL database with a simple schema where entities are stored in a key/value fashion.
+
+This extension fully leverage the <<library-sql>> meaning that you must use it to assemble your DataSource and that you
+get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integration for free.
+
+The database schema is managed using <<library-sql-liquibase>>.
+
+TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
+<<extension-indexing-sql>>.
+
+The following SQL databases are supported:
+
+- http://www.postgresql.org/[PostgreSQL]
+- http://www.mysql.com/[MySQL] and http://mariadb.org/[MariaDB]
+- http://www.sqlite.org/[SQLite]
+- http://www.h2database.com/[H2 Database Engine]
+- http://db.apache.org/derby/[Apache Derby] and http://www.oracle.com/technetwork/java/javadb/overview/index.htm[Oracle JavaDB]
+
+Each entity state is stored as a single row so maximum number of entities is the maximum number of rows per table
+supported by the underlying SQL database.
+
+include::../../build/docs/buildinfo/artifact.txt[]
+
+== Configuration ==
+
+Here are the available configuration properties:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java
+tag=config
+----
+
+The assembly snippets below show the DataSource assembly alongside the SQL EntityStore assembly. Remember to configure
+the DataSource properly, see <<library-sql>> and <<howto-configure-service>>.
+
+
+== PostgreSQL ==
+
+Maximum number of entities is unlimited.
+
+Assembly is done using the provided Assembler:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
+tag=assembly
+----
+
+Sample DataSource configuration defaults:
+
+[source,java]
+----
+include::../test/resources/postgresql-datasource.properties[]
+----
+
+
+== MySQL and MariaDB ==
+
+Maximum number of entities depends on the choosen storage engine.
+
+Assembly is done using the provided Assembler:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
+tag=assembly
+----
+
+Sample DataSource configuration defaults:
+
+[source,java]
+----
+include::../test/resources/mysql-datasource.properties[]
+----
+
+
+== SQLite ==
+
+Maximum number of entities is unlimited.
+
+The http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC[Xerial SQLite JDBC] driver is recommended.
+It provides native support on Linux, Windows and MaxOSX, pure Java on other OSes.
+
+Assembly is done using the provided Assembler:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
+tag=assembly
+----
+
+Sample DataSource configuration defaults:
+
+[source,java]
+----
+include::../test/resources/sqlite-datasource.properties[]
+----
+
+
+== H2 Database Engine ==
+
+Maximum number of entities is 2^64.
+
+Assembly is done using the provided Assembler:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
+tag=assembly
+----
+
+Sample DataSource configuration defaults:
+
+[source,java]
+----
+include::../test/resources/h2-datasource.properties[]
+----
+
+
+
+== Apache Derby and Oracle JavaDB ==
+
+Maximum number of entities is unlimited.
+
+Assembly is done using the provided Assembler:
+
+[snippet,java]
+----
+source=extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
+tag=assembly
+----
+
+Sample DataSource configuration defaults:
+
+[source,java]
+----
+include::../test/resources/derby-datasource.properties[]
+----

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
new file mode 100644
index 0000000..19658ea
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
@@ -0,0 +1,47 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.UseDefaults;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+
+// START SNIPPET: config
+public interface SQLEntityStoreConfiguration extends SQLConfiguration
+{
+    /**
+     * Name of the database schema to use.
+     * Ignored on SQL databases that don't support schemas.
+     */
+    @UseDefaults( "POLYGENE_ES" )
+    @Override
+    Property<String> schemaName();
+
+    /**
+     * Name of the entities table.
+     */
+    @UseDefaults( "POLYGENE_ENTITIES" )
+    Property<String> entityTableName();
+
+    /**
+     * Defines whether the database schema and table should be created if not already present.
+     */
+    @UseDefaults( "true" )
+    Property<Boolean> createIfMissing();
+}
+// END SNIPPET: config

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
new file mode 100644
index 0000000..293ce58
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
@@ -0,0 +1,244 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+import javax.sql.DataSource;
+import liquibase.Contexts;
+import liquibase.Liquibase;
+import liquibase.database.Database;
+import liquibase.database.ObjectQuotingStrategy;
+import liquibase.exception.LiquibaseException;
+import org.apache.polygene.api.configuration.Configuration;
+import org.apache.polygene.api.entity.EntityDescriptor;
+import org.apache.polygene.api.entity.EntityReference;
+import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.injection.scope.This;
+import org.apache.polygene.api.injection.scope.Uses;
+import org.apache.polygene.api.service.ServiceActivation;
+import org.apache.polygene.api.service.ServiceDescriptor;
+import org.apache.polygene.library.sql.liquibase.LiquibaseService;
+import org.apache.polygene.serialization.javaxjson.JavaxJsonFactories;
+import org.apache.polygene.spi.entitystore.EntityNotFoundException;
+import org.apache.polygene.spi.entitystore.helpers.JSONKeys;
+import org.apache.polygene.spi.entitystore.helpers.MapEntityStore;
+import org.jooq.DSLContext;
+import org.jooq.Field;
+import org.jooq.Query;
+import org.jooq.Record;
+import org.jooq.SQLDialect;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.conf.Settings;
+import org.jooq.impl.DSL;
+
+public class SQLEntityStoreMixin
+    implements ServiceActivation, MapEntityStore
+{
+    private static final String TABLE_NAME_LIQUIBASE_PARAMETER = "es-sql.table";
+    private static final String IDENTITY_COLUMN_NAME = "ENTITY_IDENTITY";
+    private static final String VERSION_COLUMN_NAME = "ENTITY_VERSION";
+    private static final String STATE_COLUMN_NAME = "ENTITY_STATE";
+
+    @Service
+    private DataSource dataSource;
+
+    @Service
+    private LiquibaseService liquibaseService;
+
+    @Service
+    private JavaxJsonFactories jsonFactories;
+
+    @Uses
+    private ServiceDescriptor descriptor;
+
+    @This
+    private Configuration<SQLEntityStoreConfiguration> configuration;
+
+    private Schema schema;
+    private Table<Record> table;
+    private Field<String> identityColumn;
+    private Field<String> versionColumn;
+    private Field<String> stateColumn;
+    private DSLContext dsl;
+
+    @Override
+    public void activateService() throws Exception
+    {
+        configuration.refresh();
+        SQLEntityStoreConfiguration config = configuration.get();
+
+        // Prepare jooq DSL
+        SQLDialect dialect = descriptor.metaInfo( SQLDialect.class );
+        Settings settings = descriptor.metaInfo( Settings.class );
+        String schemaName = config.schemaName().get();
+        String tableName = config.entityTableName().get();
+        schema = DSL.schema( DSL.name( schemaName ) );
+        table = DSL.table(
+            dialect.equals( SQLDialect.SQLITE )
+            ? DSL.name( tableName )
+            : DSL.name( schema.getName(), tableName )
+        );
+        identityColumn = DSL.field( DSL.name( IDENTITY_COLUMN_NAME ), String.class );
+        versionColumn = DSL.field( DSL.name( VERSION_COLUMN_NAME ), String.class );
+        stateColumn = DSL.field( DSL.name( STATE_COLUMN_NAME ), String.class );
+        dsl = DSL.using( dataSource, dialect, settings );
+
+        // Eventually create schema and apply Liquibase changelog
+        if( config.createIfMissing().get() )
+        {
+            if( !dialect.equals( SQLDialect.SQLITE )
+                && dsl.meta().getSchemas().stream().noneMatch( s -> schema.getName().equalsIgnoreCase( s.getName() ) ) )
+            {
+                dsl.createSchema( schema ).execute();
+            }
+
+            applyLiquibaseChangelog( dialect );
+        }
+    }
+
+    private void applyLiquibaseChangelog( SQLDialect dialect ) throws SQLException, LiquibaseException
+    {
+        Liquibase liquibase = liquibaseService.newConnectedLiquibase();
+        Database db = liquibase.getDatabase();
+        db.setObjectQuotingStrategy( ObjectQuotingStrategy.QUOTE_ALL_OBJECTS );
+        try
+        {
+            if( !dialect.equals( SQLDialect.SQLITE ) )
+            {
+                if( db.supportsSchemas() )
+                {
+                    db.setDefaultSchemaName( schema.getName() );
+                    db.setLiquibaseSchemaName( schema.getName() );
+                }
+                if( db.supportsCatalogs() )
+                {
+                    db.setDefaultCatalogName( schema.getName() );
+                    db.setLiquibaseCatalogName( schema.getName() );
+                }
+            }
+            liquibase.getChangeLogParameters().set( TABLE_NAME_LIQUIBASE_PARAMETER, table.getName() );
+            liquibase.update( new Contexts() );
+        }
+        finally
+        {
+            db.close();
+        }
+    }
+
+    @Override
+    public void passivateService() throws Exception
+    {
+        dsl = null;
+        schema = null;
+        table = null;
+        identityColumn = null;
+        versionColumn = null;
+        stateColumn = null;
+    }
+
+    @Override
+    public Reader get( EntityReference entityReference )
+    {
+        String state = dsl.select( stateColumn )
+                          .from( table )
+                          .where( identityColumn.equal( entityReference.identity().toString() ) )
+                          .fetchOptional( stateColumn )
+                          .orElseThrow( () -> new EntityNotFoundException( entityReference ) );
+        return new StringReader( state );
+    }
+
+    @Override
+    public Stream<Reader> entityStates()
+    {
+        return dsl.select( stateColumn )
+                  .from( table )
+                  .fetch( stateColumn )
+                  .stream()
+                  .map( StringReader::new );
+    }
+
+    @Override
+    public void applyChanges( MapChanges changes ) throws Exception
+    {
+        List<Query> operations = new ArrayList<>();
+        changes.visitMap( new MapChanger()
+        {
+            @Override
+            public Writer newEntity( EntityReference ref, EntityDescriptor entityDescriptor )
+            {
+                return new StringWriter( 1000 )
+                {
+                    @Override
+                    public void close() throws IOException
+                    {
+                        super.close();
+                        String state = toString();
+                        String version = jsonFactories.readerFactory().createReader( new StringReader( state ) )
+                                                      .readObject()
+                                                      .getString( JSONKeys.VERSION );
+                        operations.add(
+                            dsl.insertInto( table )
+                               .columns( identityColumn, versionColumn, stateColumn )
+                               .values( ref.identity().toString(), version, state )
+                        );
+                    }
+                };
+            }
+
+            @Override
+            public Writer updateEntity( MapChange mapChange )
+            {
+                return new StringWriter( 1000 )
+                {
+                    @Override
+                    public void close() throws IOException
+                    {
+                        super.close();
+                        String state = toString();
+                        operations.add(
+                            dsl.update( table )
+                               .set( versionColumn, mapChange.newVersion() )
+                               .set( stateColumn, state )
+                               .where( identityColumn.equal( mapChange.reference().identity().toString() ) )
+                               .and( versionColumn.equal( mapChange.previousVersion() ) )
+                        );
+                    }
+                };
+            }
+
+            @Override
+            public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
+            {
+                operations.add(
+                    dsl.deleteFrom( table )
+                       .where( identityColumn.equal( ref.identity().toString() ) )
+                );
+            }
+        } );
+        dsl.batch( operations ).execute();
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
new file mode 100644
index 0000000..9e4e0e7
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
@@ -0,0 +1,43 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.concern.Concerns;
+import org.apache.polygene.api.configuration.Configuration;
+import org.apache.polygene.api.mixin.Mixins;
+import org.apache.polygene.api.service.ServiceActivation;
+import org.apache.polygene.spi.entitystore.ConcurrentModificationCheckConcern;
+import org.apache.polygene.spi.entitystore.EntityStateVersions;
+import org.apache.polygene.spi.entitystore.EntityStore;
+import org.apache.polygene.spi.entitystore.StateChangeNotificationConcern;
+import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreActivation;
+import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreMixin;
+
+/**
+ * SQL EntityStore service.
+ */
+@Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
+@Mixins( { JSONMapEntityStoreMixin.class, SQLEntityStoreMixin.class } )
+public interface SQLEntityStoreService
+    extends ServiceActivation,
+    JSONMapEntityStoreActivation,
+    EntityStore,
+    EntityStateVersions,
+    Configuration
+{
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
new file mode 100644
index 0000000..24e8ec5
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
@@ -0,0 +1,98 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.apache.polygene.api.identity.Identity;
+import org.apache.polygene.api.identity.StringIdentity;
+import org.apache.polygene.bootstrap.Assemblers;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
+import org.apache.polygene.entitystore.sql.SQLEntityStoreService;
+import org.apache.polygene.library.sql.liquibase.LiquibaseAssembler;
+import org.apache.polygene.library.sql.liquibase.LiquibaseConfiguration;
+import org.jooq.SQLDialect;
+import org.jooq.conf.RenderNameStyle;
+import org.jooq.conf.Settings;
+
+/**
+ * Base SQL EntityStore assembly.
+ */
+public abstract class AbstractSQLEntityStoreAssembler<AssemblerType>
+    extends Assemblers.VisibilityIdentityConfig<AssemblerType>
+{
+    public static final Identity DEFAULT_ENTITYSTORE_IDENTITY = StringIdentity.identityOf( "entitystore-sqlkv" );
+    private static final String DEFAULT_CHANGELOG_PATH = "org/apache/polygene/entitystore/sql/changelog.xml";
+
+    private String changelogPath = DEFAULT_CHANGELOG_PATH;
+
+    @Override
+    public void assemble( ModuleAssembly module )
+    {
+        super.assemble( module );
+        SQLDialect dialect = getSQLDialect();
+        if( dialect == null )
+        {
+            throw new AssemblyException( "SQLDialect must not be null" );
+        }
+        Settings settings = getSettings();
+        if( settings == null )
+        {
+            throw new AssemblyException( "Settings must not be null" );
+        }
+
+        String identity = ( hasIdentity() ? identity() : DEFAULT_ENTITYSTORE_IDENTITY ).toString();
+
+        LiquibaseAssembler liquibase = new LiquibaseAssembler().identifiedBy( identity + "-liquibase" );
+        if( hasConfig() )
+        {
+            liquibase.withConfig( configModule(), configVisibility() );
+            LiquibaseConfiguration liquibaseconfig = configModule().forMixin( LiquibaseConfiguration.class )
+                                                                   .declareDefaults();
+            liquibaseconfig.changeLog().set( changelogPath );
+        }
+        liquibase.assemble( module );
+
+        module.services( SQLEntityStoreService.class )
+              .identifiedBy( identity )
+              .visibleIn( visibility() )
+              .setMetaInfo( dialect )
+              .setMetaInfo( settings );
+
+        if( hasConfig() )
+        {
+            configModule().entities( SQLEntityStoreConfiguration.class ).visibleIn( configVisibility() );
+        }
+    }
+
+    public AssemblerType withLiquibaseChangelog( String changelogPath )
+    {
+        this.changelogPath = changelogPath;
+        return (AssemblerType) this;
+    }
+
+    protected Settings getSettings()
+    {
+        return new Settings().withRenderNameStyle( RenderNameStyle.QUOTED );
+    }
+
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.DEFAULT;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
new file mode 100644
index 0000000..4e88d01
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.jooq.SQLDialect;
+
+/**
+ * Derby EntityStore assembly.
+ */
+public class DerbySQLEntityStoreAssembler
+    extends AbstractSQLEntityStoreAssembler<DerbySQLEntityStoreAssembler>
+{
+    @Override
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.DERBY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
new file mode 100644
index 0000000..928e660
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.jooq.SQLDialect;
+
+/**
+ * H2 EntityStore assembly.
+ */
+public class H2SQLEntityStoreAssembler
+    extends AbstractSQLEntityStoreAssembler<H2SQLEntityStoreAssembler>
+{
+    @Override
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.H2;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
new file mode 100644
index 0000000..dec7be5
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.jooq.SQLDialect;
+
+/**
+ * MySQL EntityStore assembly.
+ */
+public class MySQLEntityStoreAssembler
+    extends AbstractSQLEntityStoreAssembler<MySQLEntityStoreAssembler>
+{
+    @Override
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.MYSQL;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
new file mode 100644
index 0000000..8e3e31f
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.jooq.SQLDialect;
+
+/**
+ * PostgreSQL EntityStore assembly.
+ */
+public class PostgreSQLEntityStoreAssembler
+    extends AbstractSQLEntityStoreAssembler<PostgreSQLEntityStoreAssembler>
+{
+    @Override
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.POSTGRES;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
new file mode 100644
index 0000000..1477c6b
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
@@ -0,0 +1,28 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+/**
+ * This is a dummy Assembler to support the Yeoman Polygene Generator, which require naming conventions for
+ * the systems that it supports.
+ */
+public class SQLEntityStoreAssembler extends H2SQLEntityStoreAssembler
+{}
+

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
new file mode 100644
index 0000000..2615316
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql.assembly;
+
+import org.jooq.SQLDialect;
+
+/**
+ * SQLite EntityStore assembly.
+ */
+public class SQLiteEntityStoreAssembler
+    extends AbstractSQLEntityStoreAssembler<SQLiteEntityStoreAssembler>
+{
+    @Override
+    protected SQLDialect getSQLDialect()
+    {
+        return SQLDialect.SQLITE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
new file mode 100644
index 0000000..a93cf6f
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
@@ -0,0 +1,24 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  ~
+  -->
+<html>
+    <body>
+        <h2>SQL EntityStore Assembly.</h2>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/package.html
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/package.html b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/package.html
new file mode 100644
index 0000000..a90af3e
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/java/org/apache/polygene/entitystore/sql/package.html
@@ -0,0 +1,24 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  ~
+  -->
+<html>
+    <body>
+        <h2>SQL EntityStore.</h2>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml b/extensions/entitystore-sqlkv/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
new file mode 100644
index 0000000..47ef554
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  -->
+<databaseChangeLog
+        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd"
+        objectQuotingStrategy="QUOTE_ALL_OBJECTS">
+    <changeSet id="0" author="paul">
+        <createTable tableName="${es-sql.table}">
+            <column name="ENTITY_IDENTITY" type="varchar(64)">
+                <constraints primaryKey="true" nullable="false"/>
+            </column>
+            <column name="ENTITY_VERSION" type="varchar(64)">
+                <constraints nullable="false"/>
+            </column>
+            <column name="ENTITY_STATE" type="varchar(10240)">
+                <constraints nullable="false"/>
+            </column>
+        </createTable>
+    </changeSet>
+</databaseChangeLog>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
new file mode 100644
index 0000000..4bd1578
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
@@ -0,0 +1,101 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+
+import static org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class DerbySQLEntityStoreTest
+    extends AbstractEntityStoreTest
+{
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "derby-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "derby-datasource-service" )
+            .identifiedBy( "derby-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new DerbySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase(
+            "Delete " + getClass().getSimpleName() + " test data" ) );
+        try
+        {
+            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
+                                                          DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DELETE FROM %s.%s",
+                                             config.schemaName().get(),
+                                             config.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..7fbfb2a
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
@@ -0,0 +1,94 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+import static org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class DerbySQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "derby-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "derby-datasource-service" )
+            .identifiedBy( "derby-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new DerbySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer","Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase(
+            "Delete " + getClass().getSimpleName() + " test data" ) );
+        try
+        {
+            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
+                                                          DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = storageModule.serviceFinder().findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DELETE FROM %s.%s",
+                                             config.schemaName().get(),
+                                             config.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
new file mode 100644
index 0000000..4b4b759
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.H2SQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+
+public class H2SQLEntityStoreTest
+    extends AbstractEntityStoreTest
+{
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "h2-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "h2-datasource-service" )
+            .identifiedBy( "h2-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new H2SQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+    }
+    // END SNIPPET: assembly
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..f763238
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.H2SQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+
+public class H2SQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "h2-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "h2-datasource-service" )
+            .identifiedBy( "h2-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new H2SQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
new file mode 100644
index 0000000..a940e95
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
@@ -0,0 +1,127 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.HashMap;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class MySQLEntityStoreTest
+    extends AbstractEntityStoreTest
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule(
+        "mysql",
+        new HashMap<String, String>()
+        {{
+            put( "MYSQL_ROOT_PASSWORD", "" );
+            put( "MYSQL_ALLOW_EMPTY_PASSWORD", "yes" );
+            put( "MYSQL_DATABASE", "jdbc_test_db" );
+            put( "MYSQL_ROOT_HOST", "172.17.0.1" );
+        }},
+        30000L
+//        , "mysqld: ready for connections"   TODO: add this after next release of tdomzal/junit-docker-rule
+    );
+
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "mysql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "mysql-datasource-service" )
+            .identifiedBy( "mysql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new MySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+        // END SNIPPET: assembly
+        String mysqlHost = DOCKER.getDockerHost();
+        int mysqlPort = DOCKER.getExposedContainerPort( "3306/tcp" );
+        config.forMixin( DataSourceConfiguration.class ).declareDefaults()
+              .url().set( "jdbc:mysql://" + mysqlHost + ":" + mysqlPort
+                          + "/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC"
+                          + "&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown() throws Exception
+    {
+        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+        );
+        try
+        {
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
+                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "TRUNCATE %s.%s",
+                                             configuration.schemaName().get(),
+                                             configuration.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..e2b0564
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
@@ -0,0 +1,122 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.HashMap;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class MySQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule(
+        "mysql",
+        new HashMap<String, String>()
+        {{
+            put( "MYSQL_ROOT_PASSWORD", "" );
+            put( "MYSQL_ALLOW_EMPTY_PASSWORD", "yes" );
+            put( "MYSQL_DATABASE", "jdbc_test_db" );
+            put( "MYSQL_ROOT_HOST", "172.17.0.1" );
+        }},
+        30000L
+//        , "mysqld: ready for connections"   TODO: add this after next release of tdomzal/junit-docker-rule
+    );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "mysql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "mysql-datasource-service" )
+            .identifiedBy( "mysql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new MySQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        String mysqlHost = DOCKER.getDockerHost();
+        int mysqlPort = DOCKER.getExposedContainerPort( "3306/tcp" );
+        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
+                    .url().set( "jdbc:mysql://" + mysqlHost + ":" + mysqlPort
+                                + "/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC"
+                                + "&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true" );
+    }
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        ServiceFinder serviceFinder = storageModule.serviceFinder();
+        UnitOfWork uow = uowf.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+                                                             );
+        try
+        {
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
+                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
+            connection.setAutoCommit( false );
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "TRUNCATE %s.%s",
+                                             configuration.schemaName().get(),
+                                             configuration.entityTableName().get() ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}


[7/9] polygene-java git commit: Artificially remove sql-generator from the release

Posted by pa...@apache.org.
Artificially remove sql-generator from the release


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/bf9057f5
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/bf9057f5
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/bf9057f5

Branch: refs/heads/master
Commit: bf9057f595a7472d83773dbb71a3b00b51ca373d
Parents: c33ef71
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:22:56 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:22:56 2017 +0200

----------------------------------------------------------------------
 libraries/sql-generator/dev-status.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/bf9057f5/libraries/sql-generator/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/dev-status.xml b/libraries/sql-generator/dev-status.xml
index f279e24..d02e6f0 100644
--- a/libraries/sql-generator/dev-status.xml
+++ b/libraries/sql-generator/dev-status.xml
@@ -24,13 +24,13 @@
         http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <!--none,early,beta,stable,mature-->
-    <codebase>stable</codebase>
+    <codebase>none</codebase>
 
     <!-- none, brief, good, complete -->
-    <documentation>brief</documentation>
+    <documentation>none</documentation>
 
     <!-- none, some, good, complete -->
-    <unittests>good</unittests>
+    <unittests>none</unittests>
   </status>
   <licenses>
     <license>ALv2</license>


[6/9] polygene-java git commit: Artificially remove sql-generator from the release

Posted by pa...@apache.org.
Artificially remove sql-generator from the release


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/bf9057f5
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/bf9057f5
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/bf9057f5

Branch: refs/heads/develop
Commit: bf9057f595a7472d83773dbb71a3b00b51ca373d
Parents: c33ef71
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:22:56 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:22:56 2017 +0200

----------------------------------------------------------------------
 libraries/sql-generator/dev-status.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/bf9057f5/libraries/sql-generator/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/sql-generator/dev-status.xml b/libraries/sql-generator/dev-status.xml
index f279e24..d02e6f0 100644
--- a/libraries/sql-generator/dev-status.xml
+++ b/libraries/sql-generator/dev-status.xml
@@ -24,13 +24,13 @@
         http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <!--none,early,beta,stable,mature-->
-    <codebase>stable</codebase>
+    <codebase>none</codebase>
 
     <!-- none, brief, good, complete -->
-    <documentation>brief</documentation>
+    <documentation>none</documentation>
 
     <!-- none, some, good, complete -->
-    <unittests>good</unittests>
+    <unittests>none</unittests>
   </status>
   <licenses>
     <license>ALv2</license>


[8/9] polygene-java git commit: Merge branch 'release/3.0.0-RC3'

Posted by pa...@apache.org.
Merge branch 'release/3.0.0-RC3'


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/464da13e
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/464da13e
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/464da13e

Branch: refs/heads/master
Commit: 464da13e671ef31448d42885b5366c2d0d11c669
Parents: 6f4e666 bf9057f
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:23:01 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:23:01 2017 +0200

----------------------------------------------------------------------
 extensions/entitystore-sql/build.gradle         |  46 ----
 extensions/entitystore-sql/dev-status.xml       |  38 ---
 extensions/entitystore-sql/src/docs/es-sql.txt  | 167 -------------
 .../sql/SQLEntityStoreConfiguration.java        |  47 ----
 .../entitystore/sql/SQLEntityStoreMixin.java    | 244 -------------------
 .../entitystore/sql/SQLEntityStoreService.java  |  43 ----
 .../AbstractSQLEntityStoreAssembler.java        |  98 --------
 .../assembly/DerbySQLEntityStoreAssembler.java  |  35 ---
 .../sql/assembly/H2SQLEntityStoreAssembler.java |  35 ---
 .../sql/assembly/MySQLEntityStoreAssembler.java |  35 ---
 .../PostgreSQLEntityStoreAssembler.java         |  35 ---
 .../sql/assembly/SQLEntityStoreAssembler.java   |  28 ---
 .../assembly/SQLiteEntityStoreAssembler.java    |  35 ---
 .../entitystore/sql/assembly/package.html       |  24 --
 .../polygene/entitystore/sql/package.html       |  24 --
 .../polygene/entitystore/sql/changelog.xml      |  37 ---
 .../sql/DerbySQLEntityStoreTest.java            | 101 --------
 .../sql/DerbySQLEntityStoreTestSuite.java       |  94 -------
 .../entitystore/sql/H2SQLEntityStoreTest.java   |  67 -----
 .../sql/H2SQLEntityStoreTestSuite.java          |  56 -----
 .../entitystore/sql/MySQLEntityStoreTest.java   | 127 ----------
 .../sql/MySQLEntityStoreTestSuite.java          | 122 ----------
 .../sql/PostgreSQLEntityStoreTest.java          | 115 ---------
 .../sql/PostgreSQLEntityStoreTestSuite.java     | 111 ---------
 .../entitystore/sql/SQLiteEntityStoreTest.java  |  75 ------
 .../sql/SQLiteEntityStoreTestSuite.java         |  65 -----
 .../test/resources/derby-datasource.properties  |  25 --
 .../src/test/resources/h2-datasource.properties |  25 --
 .../src/test/resources/logback.xml              |  35 ---
 .../test/resources/mysql-datasource.properties  |  25 --
 .../resources/postgresql-datasource.properties  |  24 --
 .../test/resources/sqlite-datasource.properties |  25 --
 extensions/entitystore-sqlkv/build.gradle       |  46 ++++
 extensions/entitystore-sqlkv/dev-status.xml     |  38 +++
 .../entitystore-sqlkv/src/docs/es-sqlkv.txt     | 163 +++++++++++++
 .../sql/SQLEntityStoreConfiguration.java        |  47 ++++
 .../entitystore/sql/SQLEntityStoreMixin.java    | 244 +++++++++++++++++++
 .../entitystore/sql/SQLEntityStoreService.java  |  43 ++++
 .../AbstractSQLEntityStoreAssembler.java        |  98 ++++++++
 .../assembly/DerbySQLEntityStoreAssembler.java  |  35 +++
 .../sql/assembly/H2SQLEntityStoreAssembler.java |  35 +++
 .../sql/assembly/MySQLEntityStoreAssembler.java |  35 +++
 .../PostgreSQLEntityStoreAssembler.java         |  35 +++
 .../sql/assembly/SQLEntityStoreAssembler.java   |  28 +++
 .../assembly/SQLiteEntityStoreAssembler.java    |  35 +++
 .../entitystore/sql/assembly/package.html       |  24 ++
 .../polygene/entitystore/sql/package.html       |  24 ++
 .../polygene/entitystore/sql/changelog.xml      |  37 +++
 .../sql/DerbySQLEntityStoreTest.java            | 101 ++++++++
 .../sql/DerbySQLEntityStoreTestSuite.java       |  94 +++++++
 .../entitystore/sql/H2SQLEntityStoreTest.java   |  67 +++++
 .../sql/H2SQLEntityStoreTestSuite.java          |  56 +++++
 .../entitystore/sql/MySQLEntityStoreTest.java   | 127 ++++++++++
 .../sql/MySQLEntityStoreTestSuite.java          | 122 ++++++++++
 .../sql/PostgreSQLEntityStoreTest.java          | 115 +++++++++
 .../sql/PostgreSQLEntityStoreTestSuite.java     | 111 +++++++++
 .../entitystore/sql/SQLiteEntityStoreTest.java  |  75 ++++++
 .../sql/SQLiteEntityStoreTestSuite.java         |  65 +++++
 .../test/resources/derby-datasource.properties  |  25 ++
 .../src/test/resources/h2-datasource.properties |  25 ++
 .../src/test/resources/logback.xml              |  35 +++
 .../test/resources/mysql-datasource.properties  |  25 ++
 .../resources/postgresql-datasource.properties  |  24 ++
 .../test/resources/sqlite-datasource.properties |  25 ++
 extensions/indexing-sql/src/docs/index-sql.txt  |   3 -
 libraries/sql-generator/dev-status.xml          |   6 +-
 libraries/sql/src/docs/sql.txt                  |   3 -
 manual/src/docs/userguide/extensions.txt        |   2 +-
 manual/src/docs/website/samples.txt             |  31 ---
 samples/sql-support/build.gradle                |  46 ----
 .../sample/sqlsupport/AppAssembler.java         | 111 ---------
 .../apache/polygene/sample/sqlsupport/Main.java | 160 ------------
 .../sample/sqlsupport/PretextEntity.java        |  29 ---
 .../resources/entitystore-postgresql.properties |  22 --
 .../src/main/resources/indexing-sql.properties  |  22 --
 .../postgresql-es-datasource.properties         |  25 --
 .../postgresql-index-datasource.properties      |  25 --
 settings.gradle                                 |   3 +-
 tests/performance/build.gradle                  |   2 +-
 79 files changed, 2065 insertions(+), 2547 deletions(-)
----------------------------------------------------------------------



[9/9] polygene-java git commit: Merge branch 'release/3.0.0-RC3' into develop

Posted by pa...@apache.org.
Merge branch 'release/3.0.0-RC3' into develop


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/1bdeea8b
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/1bdeea8b
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/1bdeea8b

Branch: refs/heads/develop
Commit: 1bdeea8bd877558cf8ec30ae9c3cf54517d98423
Parents: c33ef71 bf9057f
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:23:07 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:23:07 2017 +0200

----------------------------------------------------------------------
 libraries/sql-generator/dev-status.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[2/9] polygene-java git commit: Rename entitystore-sql to entitystore-sqlkv

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
new file mode 100644
index 0000000..daa9949
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
@@ -0,0 +1,115 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class PostgreSQLEntityStoreTest
+    extends AbstractEntityStoreTest
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "postgres",
+                                                            3000L,
+                                                            "PostgreSQL init process complete; ready for start up." );
+
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgresql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+            .identifiedBy( "postgresql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new PostgreSQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+        // END SNIPPET: assembly
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
+        config.forMixin( DataSourceConfiguration.class ).declareDefaults()
+              .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+        );
+        try
+        {
+            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            String schemaName = config.schemaName().get();
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
new file mode 100644
index 0000000..d1dd952
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
@@ -0,0 +1,111 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import javax.sql.DataSource;
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.api.service.ServiceFinder;
+import org.apache.polygene.api.structure.Module;
+import org.apache.polygene.api.unitofwork.UnitOfWork;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
+import org.apache.polygene.api.usecase.UsecaseBuilder;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.common.SQLConfiguration;
+import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.docker.DockerRule;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.ClassRule;
+
+import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
+
+public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @ClassRule
+    public static final DockerRule DOCKER = new DockerRule( "postgres",
+                                                            3000L,
+                                                            "PostgreSQL init process complete; ready for start up." );
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "postgresql-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
+            .identifiedBy( "postgresql-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new PostgreSQLEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        String host = DOCKER.getDockerHost();
+        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
+        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
+                    .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
+        // START SNIPPET: assembly
+    }
+    // END SNIPPET: assembly
+
+    @Override
+    public void tearDown()
+        throws Exception
+    {
+        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
+        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
+        ServiceFinder serviceFinder = storageModule.serviceFinder();
+        UnitOfWork uow = uowf.newUnitOfWork(
+            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
+                                           );
+        try
+        {
+            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
+            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
+            connection.setAutoCommit( false );
+            String schemaName = config.schemaName().get();
+            try( Statement stmt = connection.createStatement() )
+            {
+                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
+                connection.commit();
+            }
+        }
+        finally
+        {
+            uow.discard();
+            super.tearDown();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
new file mode 100644
index 0000000..83e8a21
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
@@ -0,0 +1,75 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.EntityTestAssembler;
+import org.apache.polygene.test.entity.AbstractEntityStoreTest;
+import org.junit.BeforeClass;
+
+import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
+
+public class SQLiteEntityStoreTest extends AbstractEntityStoreTest
+{
+    @BeforeClass
+    public static void beforeClass_IBMJDK()
+    {
+        assumeNoIbmJdk();
+    }
+
+    @Override
+    // START SNIPPET: assembly
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        // END SNIPPET: assembly
+        super.assemble( module );
+        ModuleAssembly config = module.layer().module( "config" );
+        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
+
+        // START SNIPPET: assembly
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "sqlite-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+            .identifiedBy( "sqlite-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new SQLiteEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+    }
+    // END SNIPPET: assembly
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
new file mode 100644
index 0000000..6dc5fbe
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTestSuite.java
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *
+ */
+package org.apache.polygene.entitystore.sql;
+
+import org.apache.polygene.api.common.Visibility;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.entitystore.sql.assembly.SQLiteEntityStoreAssembler;
+import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
+import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
+import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
+import org.junit.BeforeClass;
+
+import static org.apache.polygene.test.util.Assume.assumeNoIbmJdk;
+
+public class SQLiteEntityStoreTestSuite extends EntityStoreTestSuite
+{
+    @BeforeClass
+    public static void beforeClass_IBMJDK()
+    {
+        assumeNoIbmJdk();
+    }
+
+    @Override
+    protected void defineStorageModule( ModuleAssembly module )
+    {
+        module.defaultServices();
+        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "sqlite-datasource-service" )
+            .visibleIn( Visibility.module )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "sqlite-datasource-service" )
+            .identifiedBy( "sqlite-datasource" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+
+        // SQL EntityStore
+        new SQLiteEntityStoreAssembler()
+            .visibleIn( Visibility.application )
+            .withConfig( configModule, Visibility.application )
+            .assemble( module );
+    }
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
new file mode 100644
index 0000000..35261ab
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/derby-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:derby:memory:testdb;create=true
+driver=org.apache.derby.jdbc.EmbeddedDriver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
new file mode 100644
index 0000000..74abf51
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/h2-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:h2:mem:test
+driver=org.h2.Driver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/logback.xml b/extensions/entitystore-sqlkv/src/test/resources/logback.xml
new file mode 100644
index 0000000..03fb4dd
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/logback.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~       http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing, software
+  ~  distributed under the License is distributed on an "AS IS" BASIS,
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~  See the License for the specific language governing permissions and
+  ~  limitations under the License.
+  ~
+  ~
+  -->
+<configuration>
+
+    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <Pattern>[@%-10thread] %-5level %logger{42} - %msg%n</Pattern>
+        </layout>
+    </appender>
+
+    <root level="info">
+        <appender-ref ref="stdout" />
+    </root>
+
+    <logger name="org.apache.polygene.entitystore.sql" level="debug"/>
+
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
new file mode 100644
index 0000000..a2f4175
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/mysql-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+#url=jdbc:mysql://localhost:3306/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
+driver=com.mysql.cj.jdbc.Driver
+username=root
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
new file mode 100644
index 0000000..bdda284
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/postgresql-datasource.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+driver=org.postgresql.Driver
+username=jdbc_test_login
+password=password

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties b/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
new file mode 100644
index 0000000..17e52b5
--- /dev/null
+++ b/extensions/entitystore-sqlkv/src/test/resources/sqlite-datasource.properties
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+
+enabled=true
+url=jdbc:sqlite::memory:
+driver=org.sqlite.JDBC
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/indexing-sql/src/docs/index-sql.txt
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/src/docs/index-sql.txt b/extensions/indexing-sql/src/docs/index-sql.txt
index 7de12dd..aa9f56d 100644
--- a/extensions/indexing-sql/src/docs/index-sql.txt
+++ b/extensions/indexing-sql/src/docs/index-sql.txt
@@ -28,7 +28,7 @@ source=extensions/indexing-sql/dev-status.xml
 This extension fully leverage the <<library-sql>> meaning that you must use it to assemble your DataSource and that you
 get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integration for free.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
+TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
 <<extension-indexing-sql>>.
 
 The following SQL databases are supported:

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/libraries/sql/src/docs/sql.txt
----------------------------------------------------------------------
diff --git a/libraries/sql/src/docs/sql.txt b/libraries/sql/src/docs/sql.txt
index 1021c6a..4ffea6b 100644
--- a/libraries/sql/src/docs/sql.txt
+++ b/libraries/sql/src/docs/sql.txt
@@ -31,7 +31,7 @@ The SQL Library provides facilities for working with SQL databases.
 The center piece is the DataSource support that comes with
 <<library-circuitbreaker>> and <<library-jmx>> support.
 
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
+TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sqlkv>> and
 <<extension-indexing-sql>>.
 
 Moreover, supplementary libraries helps dealing with different connection pool implementations and schema migrations.

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/manual/src/docs/userguide/extensions.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/userguide/extensions.txt b/manual/src/docs/userguide/extensions.txt
index 44bfd3f..928b90e 100644
--- a/manual/src/docs/userguide/extensions.txt
+++ b/manual/src/docs/userguide/extensions.txt
@@ -105,7 +105,7 @@ include::../../../../extensions/entitystore-riak/src/docs/es-riak.txt[]
 
 :leveloffset: 2
 
-include::../../../../extensions/entitystore-sql/src/docs/es-sql.txt[]
+include::../../../../extensions/entitystore-sqlkv/src/docs/es-sqlkv.txt[]
 
 :leveloffset: 2
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/manual/src/docs/website/samples.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/website/samples.txt b/manual/src/docs/website/samples.txt
index 191b00f..31232eb 100644
--- a/manual/src/docs/website/samples.txt
+++ b/manual/src/docs/website/samples.txt
@@ -65,7 +65,7 @@ https://github.com/apache/polygene-java/tree/develop/samples/rental[Browse Sourc
 
 NOTE: This sample use PostgreSQL and drop all of its data once run in order to be runnable multiple times.
 
-Sample of how to fully use Polygene™ SQL support : <<library-sql>>, <<extension-es-sql>> and <<extension-indexing-sql>>.
+Sample of how to fully use Polygene™ SQL support : <<library-sql>>, <<extension-es-sqlkv>> and <<extension-indexing-sql>>.
 
 https://github.com/apache/polygene-java/tree/develop/samples/sql-support[Browse Source]
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/samples/sql-support/build.gradle
----------------------------------------------------------------------
diff --git a/samples/sql-support/build.gradle b/samples/sql-support/build.gradle
index 1be908e..19acd12 100644
--- a/samples/sql-support/build.gradle
+++ b/samples/sql-support/build.gradle
@@ -30,7 +30,7 @@ dependencies {
   implementation polygene.core.bootstrap
   implementation polygene.library( 'sql-dbcp' )
   implementation polygene.extension( 'entitystore-preferences' )
-  implementation polygene.extension( 'entitystore-sql' )
+  implementation polygene.extension( 'entitystore-sqlkv' )
   implementation polygene.extension( 'indexing-sql' )
 
   runtimeOnly polygene.core.runtime

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 3c44077..92e3bf0 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -67,7 +67,7 @@ include 'core:api',
         'extensions:entitystore-preferences',
         'extensions:entitystore-redis',
         'extensions:entitystore-riak',
-        'extensions:entitystore-sql',
+        'extensions:entitystore-sqlkv',
         'extensions:indexing-elasticsearch',
         'extensions:indexing-rdf',
         'extensions:indexing-solr',

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/tests/performance/build.gradle
----------------------------------------------------------------------
diff --git a/tests/performance/build.gradle b/tests/performance/build.gradle
index 1ff9b45..c9da41d 100644
--- a/tests/performance/build.gradle
+++ b/tests/performance/build.gradle
@@ -34,7 +34,7 @@ dependencies {
   perfImplementation polygene.library( 'sql-dbcp' )
   perfImplementation polygene.extension( 'entitystore-memory' )
   perfImplementation polygene.extension( 'entitystore-jdbm' )
-  perfImplementation polygene.extension( 'entitystore-sql' )
+  perfImplementation polygene.extension( 'entitystore-sqlkv' )
   perfImplementation polygene.extension( 'cache-ehcache' )
   perfImplementation polygene.extension( 'indexing-rdf' )
   perfImplementation libraries.derby


[4/9] polygene-java git commit: Rename entitystore-sql to entitystore-sqlkv

Posted by pa...@apache.org.
Rename entitystore-sql to entitystore-sqlkv


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/3168fdb4
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/3168fdb4
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/3168fdb4

Branch: refs/heads/master
Commit: 3168fdb4803adda7cb3f93a4b11c99ea97225e58
Parents: c8b40a2
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:02:40 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:14:28 2017 +0200

----------------------------------------------------------------------
 extensions/entitystore-sql/build.gradle         |  46 ----
 extensions/entitystore-sql/dev-status.xml       |  38 ---
 extensions/entitystore-sql/src/docs/es-sql.txt  | 167 -------------
 .../sql/SQLEntityStoreConfiguration.java        |  47 ----
 .../entitystore/sql/SQLEntityStoreMixin.java    | 244 -------------------
 .../entitystore/sql/SQLEntityStoreService.java  |  43 ----
 .../AbstractSQLEntityStoreAssembler.java        |  98 --------
 .../assembly/DerbySQLEntityStoreAssembler.java  |  35 ---
 .../sql/assembly/H2SQLEntityStoreAssembler.java |  35 ---
 .../sql/assembly/MySQLEntityStoreAssembler.java |  35 ---
 .../PostgreSQLEntityStoreAssembler.java         |  35 ---
 .../sql/assembly/SQLEntityStoreAssembler.java   |  28 ---
 .../assembly/SQLiteEntityStoreAssembler.java    |  35 ---
 .../entitystore/sql/assembly/package.html       |  24 --
 .../polygene/entitystore/sql/package.html       |  24 --
 .../polygene/entitystore/sql/changelog.xml      |  37 ---
 .../sql/DerbySQLEntityStoreTest.java            | 101 --------
 .../sql/DerbySQLEntityStoreTestSuite.java       |  94 -------
 .../entitystore/sql/H2SQLEntityStoreTest.java   |  67 -----
 .../sql/H2SQLEntityStoreTestSuite.java          |  56 -----
 .../entitystore/sql/MySQLEntityStoreTest.java   | 127 ----------
 .../sql/MySQLEntityStoreTestSuite.java          | 122 ----------
 .../sql/PostgreSQLEntityStoreTest.java          | 115 ---------
 .../sql/PostgreSQLEntityStoreTestSuite.java     | 111 ---------
 .../entitystore/sql/SQLiteEntityStoreTest.java  |  75 ------
 .../sql/SQLiteEntityStoreTestSuite.java         |  65 -----
 .../test/resources/derby-datasource.properties  |  25 --
 .../src/test/resources/h2-datasource.properties |  25 --
 .../src/test/resources/logback.xml              |  35 ---
 .../test/resources/mysql-datasource.properties  |  25 --
 .../resources/postgresql-datasource.properties  |  24 --
 .../test/resources/sqlite-datasource.properties |  25 --
 extensions/entitystore-sqlkv/build.gradle       |  46 ++++
 extensions/entitystore-sqlkv/dev-status.xml     |  38 +++
 .../entitystore-sqlkv/src/docs/es-sqlkv.txt     | 166 +++++++++++++
 .../sql/SQLEntityStoreConfiguration.java        |  47 ++++
 .../entitystore/sql/SQLEntityStoreMixin.java    | 244 +++++++++++++++++++
 .../entitystore/sql/SQLEntityStoreService.java  |  43 ++++
 .../AbstractSQLEntityStoreAssembler.java        |  98 ++++++++
 .../assembly/DerbySQLEntityStoreAssembler.java  |  35 +++
 .../sql/assembly/H2SQLEntityStoreAssembler.java |  35 +++
 .../sql/assembly/MySQLEntityStoreAssembler.java |  35 +++
 .../PostgreSQLEntityStoreAssembler.java         |  35 +++
 .../sql/assembly/SQLEntityStoreAssembler.java   |  28 +++
 .../assembly/SQLiteEntityStoreAssembler.java    |  35 +++
 .../entitystore/sql/assembly/package.html       |  24 ++
 .../polygene/entitystore/sql/package.html       |  24 ++
 .../polygene/entitystore/sql/changelog.xml      |  37 +++
 .../sql/DerbySQLEntityStoreTest.java            | 101 ++++++++
 .../sql/DerbySQLEntityStoreTestSuite.java       |  94 +++++++
 .../entitystore/sql/H2SQLEntityStoreTest.java   |  67 +++++
 .../sql/H2SQLEntityStoreTestSuite.java          |  56 +++++
 .../entitystore/sql/MySQLEntityStoreTest.java   | 127 ++++++++++
 .../sql/MySQLEntityStoreTestSuite.java          | 122 ++++++++++
 .../sql/PostgreSQLEntityStoreTest.java          | 115 +++++++++
 .../sql/PostgreSQLEntityStoreTestSuite.java     | 111 +++++++++
 .../entitystore/sql/SQLiteEntityStoreTest.java  |  75 ++++++
 .../sql/SQLiteEntityStoreTestSuite.java         |  65 +++++
 .../test/resources/derby-datasource.properties  |  25 ++
 .../src/test/resources/h2-datasource.properties |  25 ++
 .../src/test/resources/logback.xml              |  35 +++
 .../test/resources/mysql-datasource.properties  |  25 ++
 .../resources/postgresql-datasource.properties  |  24 ++
 .../test/resources/sqlite-datasource.properties |  25 ++
 extensions/indexing-sql/src/docs/index-sql.txt  |   2 +-
 libraries/sql/src/docs/sql.txt                  |   2 +-
 manual/src/docs/userguide/extensions.txt        |   2 +-
 manual/src/docs/website/samples.txt             |   2 +-
 samples/sql-support/build.gradle                |   2 +-
 settings.gradle                                 |   2 +-
 tests/performance/build.gradle                  |   2 +-
 71 files changed, 2069 insertions(+), 2070 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/build.gradle b/extensions/entitystore-sql/build.gradle
deleted file mode 100644
index 223e85b..0000000
--- a/extensions/entitystore-sql/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-apply plugin: 'polygene-extension'
-
-description = "Apache Polygene™ SQL EntityStore Extension"
-
-jar { manifest { name = "Apache Polygene™ Extension - EntityStore - SQL" } }
-
-dependencies {
-  api polygene.core.bootstrap
-  api polygene.library( 'sql' )
-  api libraries.jooq
-
-  implementation polygene.library( 'sql-liquibase' )
-
-  runtimeOnly polygene.core.runtime
-
-  testImplementation polygene.internals.testsupport
-  testImplementation polygene.library( 'sql-dbcp' )
-  testImplementation libraries.docker_junit
-
-  testRuntimeOnly libraries.logback
-  testRuntimeOnly libraries.derby
-  testRuntimeOnly libraries.h2
-  testRuntimeOnly libraries.mysql_connector
-  testRuntimeOnly libraries.postgres
-  testRuntimeOnly libraries.sqlite
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/dev-status.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/dev-status.xml b/extensions/entitystore-sql/dev-status.xml
deleted file mode 100644
index 8d582e2..0000000
--- a/extensions/entitystore-sql/dev-status.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-<module xmlns="http://polygene.apache.org/schemas/2008/dev-status/1"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://polygene.apache.org/schemas/2008/dev-status/1
-        http://polygene.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
-  <status>
-        <!--none,early,beta,stable,mature-->
-        <codebase>stable</codebase>
-
-        <!-- none, brief, good, complete -->
-        <documentation>good</documentation>
-
-        <!-- none, some, good, complete -->
-        <unittests>good</unittests>
-    </status>
-    <licenses>
-        <license>ALv2</license>
-    </licenses>
-</module>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/docs/es-sql.txt
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/docs/es-sql.txt b/extensions/entitystore-sql/src/docs/es-sql.txt
deleted file mode 100644
index e0328a1..0000000
--- a/extensions/entitystore-sql/src/docs/es-sql.txt
+++ /dev/null
@@ -1,167 +0,0 @@
-///////////////////////////////////////////////////////////////
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-///////////////////////////////////////////////////////////////
-
-[[extension-es-sql, SQL EntityStore]]
-= SQL EntityStore =
-
-[devstatus]
---------------
-source=extensions/entitystore-sql/dev-status.xml
---------------
-
-EntityStore service backed by a SQL database.
-
-This extension fully leverage the <<library-sql>> meaning that you must use it to assemble your DataSource and that you
-get <<library-circuitbreaker,Circuit Breaker>> and <<library-jmx, JMX>> integration for free.
-
-The database schema is managed using <<library-sql-liquibase>>.
-
-TIP: See the <<sample-sql-support>> that demonstrate combined use of <<library-sql>>, <<extension-es-sql>> and
-<<extension-indexing-sql>>.
-
-The following SQL databases are supported:
-
-- http://www.postgresql.org/[PostgreSQL]
-- http://www.mysql.com/[MySQL] and http://mariadb.org/[MariaDB]
-- http://www.sqlite.org/[SQLite]
-- http://www.h2database.com/[H2 Database Engine]
-- http://db.apache.org/derby/[Apache Derby] and http://www.oracle.com/technetwork/java/javadb/overview/index.htm[Oracle JavaDB]
-
-Each entity state is stored as a single row so maximum number of entities is the maximum number of rows per table
-supported by the underlying SQL database.
-
-include::../../build/docs/buildinfo/artifact.txt[]
-
-== Configuration ==
-
-Here are the available configuration properties:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLMapEntityStoreConfiguration.java
-tag=config
-----
-
-The assembly snippets below show the DataSource assembly alongside the SQL EntityStore assembly. Remember to configure
-the DataSource properly, see <<library-sql>> and <<howto-configure-service>>.
-
-
-== PostgreSQL ==
-
-Maximum number of entities is unlimited.
-
-Assembly is done using the provided Assembler:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
-tag=assembly
-----
-
-Sample DataSource configuration defaults:
-
-[source,java]
-----
-include::../test/resources/postgresql-datasource.properties[]
-----
-
-
-== MySQL and MariaDB ==
-
-Maximum number of entities depends on the choosen storage engine.
-
-Assembly is done using the provided Assembler:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
-tag=assembly
-----
-
-Sample DataSource configuration defaults:
-
-[source,java]
-----
-include::../test/resources/mysql-datasource.properties[]
-----
-
-
-== SQLite ==
-
-Maximum number of entities is unlimited.
-
-The http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC[Xerial SQLite JDBC] driver is recommended.
-It provides native support on Linux, Windows and MaxOSX, pure Java on other OSes.
-
-Assembly is done using the provided Assembler:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/SQLiteEntityStoreTest.java
-tag=assembly
-----
-
-Sample DataSource configuration defaults:
-
-[source,java]
-----
-include::../test/resources/sqlite-datasource.properties[]
-----
-
-
-== H2 Database Engine ==
-
-Maximum number of entities is 2^64.
-
-Assembly is done using the provided Assembler:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
-tag=assembly
-----
-
-Sample DataSource configuration defaults:
-
-[source,java]
-----
-include::../test/resources/h2-datasource.properties[]
-----
-
-
-
-== Apache Derby and Oracle JavaDB ==
-
-Maximum number of entities is unlimited.
-
-Assembly is done using the provided Assembler:
-
-[snippet,java]
-----
-source=extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
-tag=assembly
-----
-
-Sample DataSource configuration defaults:
-
-[source,java]
-----
-include::../test/resources/derby-datasource.properties[]
-----
-

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
deleted file mode 100644
index 19658ea..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreConfiguration.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.common.UseDefaults;
-import org.apache.polygene.api.property.Property;
-import org.apache.polygene.library.sql.common.SQLConfiguration;
-
-// START SNIPPET: config
-public interface SQLEntityStoreConfiguration extends SQLConfiguration
-{
-    /**
-     * Name of the database schema to use.
-     * Ignored on SQL databases that don't support schemas.
-     */
-    @UseDefaults( "POLYGENE_ES" )
-    @Override
-    Property<String> schemaName();
-
-    /**
-     * Name of the entities table.
-     */
-    @UseDefaults( "POLYGENE_ENTITIES" )
-    Property<String> entityTableName();
-
-    /**
-     * Defines whether the database schema and table should be created if not already present.
-     */
-    @UseDefaults( "true" )
-    Property<Boolean> createIfMissing();
-}
-// END SNIPPET: config

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
deleted file mode 100644
index 293ce58..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreMixin.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Stream;
-import javax.sql.DataSource;
-import liquibase.Contexts;
-import liquibase.Liquibase;
-import liquibase.database.Database;
-import liquibase.database.ObjectQuotingStrategy;
-import liquibase.exception.LiquibaseException;
-import org.apache.polygene.api.configuration.Configuration;
-import org.apache.polygene.api.entity.EntityDescriptor;
-import org.apache.polygene.api.entity.EntityReference;
-import org.apache.polygene.api.injection.scope.Service;
-import org.apache.polygene.api.injection.scope.This;
-import org.apache.polygene.api.injection.scope.Uses;
-import org.apache.polygene.api.service.ServiceActivation;
-import org.apache.polygene.api.service.ServiceDescriptor;
-import org.apache.polygene.library.sql.liquibase.LiquibaseService;
-import org.apache.polygene.serialization.javaxjson.JavaxJsonFactories;
-import org.apache.polygene.spi.entitystore.EntityNotFoundException;
-import org.apache.polygene.spi.entitystore.helpers.JSONKeys;
-import org.apache.polygene.spi.entitystore.helpers.MapEntityStore;
-import org.jooq.DSLContext;
-import org.jooq.Field;
-import org.jooq.Query;
-import org.jooq.Record;
-import org.jooq.SQLDialect;
-import org.jooq.Schema;
-import org.jooq.Table;
-import org.jooq.conf.Settings;
-import org.jooq.impl.DSL;
-
-public class SQLEntityStoreMixin
-    implements ServiceActivation, MapEntityStore
-{
-    private static final String TABLE_NAME_LIQUIBASE_PARAMETER = "es-sql.table";
-    private static final String IDENTITY_COLUMN_NAME = "ENTITY_IDENTITY";
-    private static final String VERSION_COLUMN_NAME = "ENTITY_VERSION";
-    private static final String STATE_COLUMN_NAME = "ENTITY_STATE";
-
-    @Service
-    private DataSource dataSource;
-
-    @Service
-    private LiquibaseService liquibaseService;
-
-    @Service
-    private JavaxJsonFactories jsonFactories;
-
-    @Uses
-    private ServiceDescriptor descriptor;
-
-    @This
-    private Configuration<SQLEntityStoreConfiguration> configuration;
-
-    private Schema schema;
-    private Table<Record> table;
-    private Field<String> identityColumn;
-    private Field<String> versionColumn;
-    private Field<String> stateColumn;
-    private DSLContext dsl;
-
-    @Override
-    public void activateService() throws Exception
-    {
-        configuration.refresh();
-        SQLEntityStoreConfiguration config = configuration.get();
-
-        // Prepare jooq DSL
-        SQLDialect dialect = descriptor.metaInfo( SQLDialect.class );
-        Settings settings = descriptor.metaInfo( Settings.class );
-        String schemaName = config.schemaName().get();
-        String tableName = config.entityTableName().get();
-        schema = DSL.schema( DSL.name( schemaName ) );
-        table = DSL.table(
-            dialect.equals( SQLDialect.SQLITE )
-            ? DSL.name( tableName )
-            : DSL.name( schema.getName(), tableName )
-        );
-        identityColumn = DSL.field( DSL.name( IDENTITY_COLUMN_NAME ), String.class );
-        versionColumn = DSL.field( DSL.name( VERSION_COLUMN_NAME ), String.class );
-        stateColumn = DSL.field( DSL.name( STATE_COLUMN_NAME ), String.class );
-        dsl = DSL.using( dataSource, dialect, settings );
-
-        // Eventually create schema and apply Liquibase changelog
-        if( config.createIfMissing().get() )
-        {
-            if( !dialect.equals( SQLDialect.SQLITE )
-                && dsl.meta().getSchemas().stream().noneMatch( s -> schema.getName().equalsIgnoreCase( s.getName() ) ) )
-            {
-                dsl.createSchema( schema ).execute();
-            }
-
-            applyLiquibaseChangelog( dialect );
-        }
-    }
-
-    private void applyLiquibaseChangelog( SQLDialect dialect ) throws SQLException, LiquibaseException
-    {
-        Liquibase liquibase = liquibaseService.newConnectedLiquibase();
-        Database db = liquibase.getDatabase();
-        db.setObjectQuotingStrategy( ObjectQuotingStrategy.QUOTE_ALL_OBJECTS );
-        try
-        {
-            if( !dialect.equals( SQLDialect.SQLITE ) )
-            {
-                if( db.supportsSchemas() )
-                {
-                    db.setDefaultSchemaName( schema.getName() );
-                    db.setLiquibaseSchemaName( schema.getName() );
-                }
-                if( db.supportsCatalogs() )
-                {
-                    db.setDefaultCatalogName( schema.getName() );
-                    db.setLiquibaseCatalogName( schema.getName() );
-                }
-            }
-            liquibase.getChangeLogParameters().set( TABLE_NAME_LIQUIBASE_PARAMETER, table.getName() );
-            liquibase.update( new Contexts() );
-        }
-        finally
-        {
-            db.close();
-        }
-    }
-
-    @Override
-    public void passivateService() throws Exception
-    {
-        dsl = null;
-        schema = null;
-        table = null;
-        identityColumn = null;
-        versionColumn = null;
-        stateColumn = null;
-    }
-
-    @Override
-    public Reader get( EntityReference entityReference )
-    {
-        String state = dsl.select( stateColumn )
-                          .from( table )
-                          .where( identityColumn.equal( entityReference.identity().toString() ) )
-                          .fetchOptional( stateColumn )
-                          .orElseThrow( () -> new EntityNotFoundException( entityReference ) );
-        return new StringReader( state );
-    }
-
-    @Override
-    public Stream<Reader> entityStates()
-    {
-        return dsl.select( stateColumn )
-                  .from( table )
-                  .fetch( stateColumn )
-                  .stream()
-                  .map( StringReader::new );
-    }
-
-    @Override
-    public void applyChanges( MapChanges changes ) throws Exception
-    {
-        List<Query> operations = new ArrayList<>();
-        changes.visitMap( new MapChanger()
-        {
-            @Override
-            public Writer newEntity( EntityReference ref, EntityDescriptor entityDescriptor )
-            {
-                return new StringWriter( 1000 )
-                {
-                    @Override
-                    public void close() throws IOException
-                    {
-                        super.close();
-                        String state = toString();
-                        String version = jsonFactories.readerFactory().createReader( new StringReader( state ) )
-                                                      .readObject()
-                                                      .getString( JSONKeys.VERSION );
-                        operations.add(
-                            dsl.insertInto( table )
-                               .columns( identityColumn, versionColumn, stateColumn )
-                               .values( ref.identity().toString(), version, state )
-                        );
-                    }
-                };
-            }
-
-            @Override
-            public Writer updateEntity( MapChange mapChange )
-            {
-                return new StringWriter( 1000 )
-                {
-                    @Override
-                    public void close() throws IOException
-                    {
-                        super.close();
-                        String state = toString();
-                        operations.add(
-                            dsl.update( table )
-                               .set( versionColumn, mapChange.newVersion() )
-                               .set( stateColumn, state )
-                               .where( identityColumn.equal( mapChange.reference().identity().toString() ) )
-                               .and( versionColumn.equal( mapChange.previousVersion() ) )
-                        );
-                    }
-                };
-            }
-
-            @Override
-            public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
-            {
-                operations.add(
-                    dsl.deleteFrom( table )
-                       .where( identityColumn.equal( ref.identity().toString() ) )
-                );
-            }
-        } );
-        dsl.batch( operations ).execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
deleted file mode 100644
index 9e4e0e7..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/SQLEntityStoreService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.concern.Concerns;
-import org.apache.polygene.api.configuration.Configuration;
-import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.api.service.ServiceActivation;
-import org.apache.polygene.spi.entitystore.ConcurrentModificationCheckConcern;
-import org.apache.polygene.spi.entitystore.EntityStateVersions;
-import org.apache.polygene.spi.entitystore.EntityStore;
-import org.apache.polygene.spi.entitystore.StateChangeNotificationConcern;
-import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreActivation;
-import org.apache.polygene.spi.entitystore.helpers.JSONMapEntityStoreMixin;
-
-/**
- * SQL EntityStore service.
- */
-@Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { JSONMapEntityStoreMixin.class, SQLEntityStoreMixin.class } )
-public interface SQLEntityStoreService
-    extends ServiceActivation,
-    JSONMapEntityStoreActivation,
-    EntityStore,
-    EntityStateVersions,
-    Configuration
-{
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
deleted file mode 100644
index 0f86490..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/AbstractSQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.apache.polygene.api.identity.Identity;
-import org.apache.polygene.api.identity.StringIdentity;
-import org.apache.polygene.bootstrap.Assemblers;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.SQLEntityStoreConfiguration;
-import org.apache.polygene.entitystore.sql.SQLEntityStoreService;
-import org.apache.polygene.library.sql.liquibase.LiquibaseAssembler;
-import org.apache.polygene.library.sql.liquibase.LiquibaseConfiguration;
-import org.jooq.SQLDialect;
-import org.jooq.conf.RenderNameStyle;
-import org.jooq.conf.Settings;
-
-/**
- * Base SQL EntityStore assembly.
- */
-public abstract class AbstractSQLEntityStoreAssembler<AssemblerType>
-    extends Assemblers.VisibilityIdentityConfig<AssemblerType>
-{
-    public static final Identity DEFAULT_ENTITYSTORE_IDENTITY = StringIdentity.identityOf( "entitystore-sql" );
-    private static final String DEFAULT_CHANGELOG_PATH = "org/apache/polygene/entitystore/sql/changelog.xml";
-
-    private String changelogPath = DEFAULT_CHANGELOG_PATH;
-
-    @Override
-    public void assemble( ModuleAssembly module )
-    {
-        super.assemble( module );
-        SQLDialect dialect = getSQLDialect();
-        if( dialect == null )
-        {
-            throw new AssemblyException( "SQLDialect must not be null" );
-        }
-        Settings settings = getSettings();
-        if( settings == null )
-        {
-            throw new AssemblyException( "Settings must not be null" );
-        }
-
-        String identity = ( hasIdentity() ? identity() : DEFAULT_ENTITYSTORE_IDENTITY ).toString();
-
-        LiquibaseAssembler liquibase = new LiquibaseAssembler().identifiedBy( identity + "-liquibase" );
-        if( hasConfig() )
-        {
-            liquibase.withConfig( configModule(), configVisibility() );
-            LiquibaseConfiguration liquibaseconfig = configModule().forMixin( LiquibaseConfiguration.class )
-                                                                   .declareDefaults();
-            liquibaseconfig.changeLog().set( changelogPath );
-        }
-        liquibase.assemble( module );
-
-        module.services( SQLEntityStoreService.class )
-              .identifiedBy( identity )
-              .visibleIn( visibility() )
-              .setMetaInfo( dialect )
-              .setMetaInfo( settings );
-
-        if( hasConfig() )
-        {
-            configModule().entities( SQLEntityStoreConfiguration.class ).visibleIn( configVisibility() );
-        }
-    }
-
-    public AssemblerType withLiquibaseChangelog( String changelogPath )
-    {
-        this.changelogPath = changelogPath;
-        return (AssemblerType) this;
-    }
-
-    protected Settings getSettings()
-    {
-        return new Settings().withRenderNameStyle( RenderNameStyle.QUOTED );
-    }
-
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.DEFAULT;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
deleted file mode 100644
index 4e88d01..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/DerbySQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.jooq.SQLDialect;
-
-/**
- * Derby EntityStore assembly.
- */
-public class DerbySQLEntityStoreAssembler
-    extends AbstractSQLEntityStoreAssembler<DerbySQLEntityStoreAssembler>
-{
-    @Override
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.DERBY;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
deleted file mode 100644
index 928e660..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/H2SQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.jooq.SQLDialect;
-
-/**
- * H2 EntityStore assembly.
- */
-public class H2SQLEntityStoreAssembler
-    extends AbstractSQLEntityStoreAssembler<H2SQLEntityStoreAssembler>
-{
-    @Override
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.H2;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
deleted file mode 100644
index dec7be5..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/MySQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.jooq.SQLDialect;
-
-/**
- * MySQL EntityStore assembly.
- */
-public class MySQLEntityStoreAssembler
-    extends AbstractSQLEntityStoreAssembler<MySQLEntityStoreAssembler>
-{
-    @Override
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.MYSQL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
deleted file mode 100644
index 8e3e31f..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/PostgreSQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.jooq.SQLDialect;
-
-/**
- * PostgreSQL EntityStore assembly.
- */
-public class PostgreSQLEntityStoreAssembler
-    extends AbstractSQLEntityStoreAssembler<PostgreSQLEntityStoreAssembler>
-{
-    @Override
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.POSTGRES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
deleted file mode 100644
index 1477c6b..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLEntityStoreAssembler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-/**
- * This is a dummy Assembler to support the Yeoman Polygene Generator, which require naming conventions for
- * the systems that it supports.
- */
-public class SQLEntityStoreAssembler extends H2SQLEntityStoreAssembler
-{}
-

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
deleted file mode 100644
index 2615316..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/SQLiteEntityStoreAssembler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql.assembly;
-
-import org.jooq.SQLDialect;
-
-/**
- * SQLite EntityStore assembly.
- */
-public class SQLiteEntityStoreAssembler
-    extends AbstractSQLEntityStoreAssembler<SQLiteEntityStoreAssembler>
-{
-    @Override
-    protected SQLDialect getSQLDialect()
-    {
-        return SQLDialect.SQLITE;
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
deleted file mode 100644
index a93cf6f..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/assembly/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-<html>
-    <body>
-        <h2>SQL EntityStore Assembly.</h2>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/package.html
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/package.html b/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/package.html
deleted file mode 100644
index a90af3e..0000000
--- a/extensions/entitystore-sql/src/main/java/org/apache/polygene/entitystore/sql/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-<html>
-    <body>
-        <h2>SQL EntityStore.</h2>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml b/extensions/entitystore-sql/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
deleted file mode 100644
index 47ef554..0000000
--- a/extensions/entitystore-sql/src/main/resources/org/apache/polygene/entitystore/sql/changelog.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~       http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  -->
-<databaseChangeLog
-        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd"
-        objectQuotingStrategy="QUOTE_ALL_OBJECTS">
-    <changeSet id="0" author="paul">
-        <createTable tableName="${es-sql.table}">
-            <column name="ENTITY_IDENTITY" type="varchar(64)">
-                <constraints primaryKey="true" nullable="false"/>
-            </column>
-            <column name="ENTITY_VERSION" type="varchar(64)">
-                <constraints nullable="false"/>
-            </column>
-            <column name="ENTITY_STATE" type="varchar(10240)">
-                <constraints nullable="false"/>
-            </column>
-        </createTable>
-    </changeSet>
-</databaseChangeLog>

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
deleted file mode 100644
index 4bd1578..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-
-import static org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class DerbySQLEntityStoreTest
-    extends AbstractEntityStoreTest
-{
-    @Override
-    // START SNIPPET: assembly
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        // END SNIPPET: assembly
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
-        // START SNIPPET: assembly
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "derby-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "derby-datasource-service" )
-            .identifiedBy( "derby-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new DerbySQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-    }
-    // END SNIPPET: assembly
-
-    @Override
-    public void tearDown()
-        throws Exception
-    {
-        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork( UsecaseBuilder.newUsecase(
-            "Delete " + getClass().getSimpleName() + " test data" ) );
-        try
-        {
-            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
-                                                          DEFAULT_ENTITYSTORE_IDENTITY );
-            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            connection.setAutoCommit( false );
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "DELETE FROM %s.%s",
-                                             config.schemaName().get(),
-                                             config.entityTableName().get() ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
deleted file mode 100644
index 7fbfb2a..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/DerbySQLEntityStoreTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-
-import static org.apache.polygene.entitystore.sql.assembly.DerbySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class DerbySQLEntityStoreTestSuite extends EntityStoreTestSuite
-{
-    @Override
-    protected void defineStorageModule( ModuleAssembly module )
-    {
-        module.defaultServices();
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "derby-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "derby-datasource-service" )
-            .identifiedBy( "derby-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new DerbySQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-    }
-
-    @Override
-    public void tearDown()
-        throws Exception
-    {
-        Module storageModule = application.findModule( "Infrastructure Layer","Storage Module" );
-        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
-        UnitOfWork uow = uowf.newUnitOfWork( UsecaseBuilder.newUsecase(
-            "Delete " + getClass().getSimpleName() + " test data" ) );
-        try
-        {
-            SQLEntityStoreConfiguration config = uow.get( SQLEntityStoreConfiguration.class,
-                                                          DEFAULT_ENTITYSTORE_IDENTITY );
-            Connection connection = storageModule.serviceFinder().findService( DataSource.class ).get().getConnection();
-            connection.setAutoCommit( false );
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "DELETE FROM %s.%s",
-                                             config.schemaName().get(),
-                                             config.entityTableName().get() ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
deleted file mode 100644
index 4b4b759..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.H2SQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-
-public class H2SQLEntityStoreTest
-    extends AbstractEntityStoreTest
-{
-    @Override
-    // START SNIPPET: assembly
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        // END SNIPPET: assembly
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
-        // START SNIPPET: assembly
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "h2-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "h2-datasource-service" )
-            .identifiedBy( "h2-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new H2SQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-    }
-    // END SNIPPET: assembly
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
deleted file mode 100644
index f763238..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/H2SQLEntityStoreTestSuite.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.H2SQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-
-public class H2SQLEntityStoreTestSuite extends EntityStoreTestSuite
-{
-    @Override
-    protected void defineStorageModule( ModuleAssembly module )
-    {
-        module.defaultServices();
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "h2-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "h2-datasource-service" )
-            .identifiedBy( "h2-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new H2SQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
deleted file mode 100644
index a940e95..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTest.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.HashMap;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.docker.DockerRule;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.junit.ClassRule;
-
-import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class MySQLEntityStoreTest
-    extends AbstractEntityStoreTest
-{
-    @ClassRule
-    public static final DockerRule DOCKER = new DockerRule(
-        "mysql",
-        new HashMap<String, String>()
-        {{
-            put( "MYSQL_ROOT_PASSWORD", "" );
-            put( "MYSQL_ALLOW_EMPTY_PASSWORD", "yes" );
-            put( "MYSQL_DATABASE", "jdbc_test_db" );
-            put( "MYSQL_ROOT_HOST", "172.17.0.1" );
-        }},
-        30000L
-//        , "mysqld: ready for connections"   TODO: add this after next release of tdomzal/junit-docker-rule
-    );
-
-    @Override
-    // START SNIPPET: assembly
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        // END SNIPPET: assembly
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
-        // START SNIPPET: assembly
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "mysql-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "mysql-datasource-service" )
-            .identifiedBy( "mysql-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new MySQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-        // END SNIPPET: assembly
-        String mysqlHost = DOCKER.getDockerHost();
-        int mysqlPort = DOCKER.getExposedContainerPort( "3306/tcp" );
-        config.forMixin( DataSourceConfiguration.class ).declareDefaults()
-              .url().set( "jdbc:mysql://" + mysqlHost + ":" + mysqlPort
-                          + "/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC"
-                          + "&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true" );
-        // START SNIPPET: assembly
-    }
-    // END SNIPPET: assembly
-
-    @Override
-    public void tearDown() throws Exception
-    {
-        UnitOfWork uow = this.unitOfWorkFactory.newUnitOfWork(
-            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
-        );
-        try
-        {
-            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
-                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
-            connection.setAutoCommit( false );
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "TRUNCATE %s.%s",
-                                             configuration.schemaName().get(),
-                                             configuration.entityTableName().get() ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
deleted file mode 100644
index e2b0564..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/MySQLEntityStoreTestSuite.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.HashMap;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.service.ServiceFinder;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.docker.DockerRule;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-import org.junit.ClassRule;
-
-import static org.apache.polygene.entitystore.sql.assembly.MySQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class MySQLEntityStoreTestSuite extends EntityStoreTestSuite
-{
-    @ClassRule
-    public static final DockerRule DOCKER = new DockerRule(
-        "mysql",
-        new HashMap<String, String>()
-        {{
-            put( "MYSQL_ROOT_PASSWORD", "" );
-            put( "MYSQL_ALLOW_EMPTY_PASSWORD", "yes" );
-            put( "MYSQL_DATABASE", "jdbc_test_db" );
-            put( "MYSQL_ROOT_HOST", "172.17.0.1" );
-        }},
-        30000L
-//        , "mysqld: ready for connections"   TODO: add this after next release of tdomzal/junit-docker-rule
-    );
-
-    @Override
-    protected void defineStorageModule( ModuleAssembly module )
-    {
-        module.defaultServices();
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "mysql-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "mysql-datasource-service" )
-            .identifiedBy( "mysql-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new MySQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        String mysqlHost = DOCKER.getDockerHost();
-        int mysqlPort = DOCKER.getExposedContainerPort( "3306/tcp" );
-        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
-                    .url().set( "jdbc:mysql://" + mysqlHost + ":" + mysqlPort
-                                + "/jdbc_test_db?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC"
-                                + "&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true" );
-    }
-
-    @Override
-    public void tearDown()
-        throws Exception
-    {
-        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
-        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
-        ServiceFinder serviceFinder = storageModule.serviceFinder();
-        UnitOfWork uow = uowf.newUnitOfWork(
-            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
-                                                             );
-        try
-        {
-            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            SQLEntityStoreConfiguration configuration = uow.get( SQLEntityStoreConfiguration.class,
-                                                                 DEFAULT_ENTITYSTORE_IDENTITY );
-            connection.setAutoCommit( false );
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "TRUNCATE %s.%s",
-                                             configuration.schemaName().get(),
-                                             configuration.entityTableName().get() ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
deleted file mode 100644
index daa9949..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.common.SQLConfiguration;
-import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.docker.DockerRule;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.junit.ClassRule;
-
-import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class PostgreSQLEntityStoreTest
-    extends AbstractEntityStoreTest
-{
-    @ClassRule
-    public static final DockerRule DOCKER = new DockerRule( "postgres",
-                                                            3000L,
-                                                            "PostgreSQL init process complete; ready for start up." );
-
-    @Override
-    // START SNIPPET: assembly
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        // END SNIPPET: assembly
-        super.assemble( module );
-        ModuleAssembly config = module.layer().module( "config" );
-        new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
-        // START SNIPPET: assembly
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "postgresql-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
-            .identifiedBy( "postgresql-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new PostgreSQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( config, Visibility.layer )
-            .assemble( module );
-        // END SNIPPET: assembly
-        String host = DOCKER.getDockerHost();
-        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
-        config.forMixin( DataSourceConfiguration.class ).declareDefaults()
-              .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
-        // START SNIPPET: assembly
-    }
-    // END SNIPPET: assembly
-
-    @Override
-    public void tearDown()
-        throws Exception
-    {
-        UnitOfWork uow = unitOfWorkFactory.newUnitOfWork(
-            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
-        );
-        try
-        {
-            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
-            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            connection.setAutoCommit( false );
-            String schemaName = config.schemaName().get();
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/3168fdb4/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java b/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
deleted file mode 100644
index d1dd952..0000000
--- a/extensions/entitystore-sql/src/test/java/org/apache/polygene/entitystore/sql/PostgreSQLEntityStoreTestSuite.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-package org.apache.polygene.entitystore.sql;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.service.ServiceFinder;
-import org.apache.polygene.api.structure.Module;
-import org.apache.polygene.api.unitofwork.UnitOfWork;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler;
-import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.common.SQLConfiguration;
-import org.apache.polygene.library.sql.datasource.DataSourceConfiguration;
-import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.test.docker.DockerRule;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-import org.junit.ClassRule;
-
-import static org.apache.polygene.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler.DEFAULT_ENTITYSTORE_IDENTITY;
-
-public class PostgreSQLEntityStoreTestSuite extends EntityStoreTestSuite
-{
-    @ClassRule
-    public static final DockerRule DOCKER = new DockerRule( "postgres",
-                                                            3000L,
-                                                            "PostgreSQL init process complete; ready for start up." );
-
-    @Override
-    protected void defineStorageModule( ModuleAssembly module )
-    {
-        module.defaultServices();
-        // DataSourceService
-        new DBCPDataSourceServiceAssembler()
-            .identifiedBy( "postgresql-datasource-service" )
-            .visibleIn( Visibility.module )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        // DataSource
-        new DataSourceAssembler()
-            .withDataSourceServiceIdentity( "postgresql-datasource-service" )
-            .identifiedBy( "postgresql-datasource" )
-            .visibleIn( Visibility.module )
-            .withCircuitBreaker()
-            .assemble( module );
-
-        // SQL EntityStore
-        new PostgreSQLEntityStoreAssembler()
-            .visibleIn( Visibility.application )
-            .withConfig( configModule, Visibility.application )
-            .assemble( module );
-
-        String host = DOCKER.getDockerHost();
-        int port = DOCKER.getExposedContainerPort( "5432/tcp" );
-        configModule.forMixin( DataSourceConfiguration.class ).declareDefaults()
-                    .url().set( "jdbc:postgresql://" + host + ":" + port + "/jdbc_test_db" );
-        // START SNIPPET: assembly
-    }
-    // END SNIPPET: assembly
-
-    @Override
-    public void tearDown()
-        throws Exception
-    {
-        Module storageModule = application.findModule( "Infrastructure Layer", "Storage Module" );
-        UnitOfWorkFactory uowf = storageModule.unitOfWorkFactory();
-        ServiceFinder serviceFinder = storageModule.serviceFinder();
-        UnitOfWork uow = uowf.newUnitOfWork(
-            UsecaseBuilder.newUsecase( "Delete " + getClass().getSimpleName() + " test data" )
-                                           );
-        try
-        {
-            SQLConfiguration config = uow.get( SQLConfiguration.class, DEFAULT_ENTITYSTORE_IDENTITY );
-            Connection connection = serviceFinder.findService( DataSource.class ).get().getConnection();
-            connection.setAutoCommit( false );
-            String schemaName = config.schemaName().get();
-            try( Statement stmt = connection.createStatement() )
-            {
-                stmt.execute( String.format( "DROP SCHEMA \"%s\" CASCADE", schemaName ) );
-                connection.commit();
-            }
-        }
-        finally
-        {
-            uow.discard();
-            super.tearDown();
-        }
-    }
-}