polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soelvs...@apache.org
Subject zest-java git commit: ZEST-132 removed ModuleAssembly#withDefaultUnitOfWorkFactory removed, since it is added automatically
Date Sun, 20 Dec 2015 22:47:41 GMT
Repository: zest-java
Updated Branches:
  refs/heads/ZEST-132 08b3a7d08 -> e291e7801


ZEST-132 removed ModuleAssembly#withDefaultUnitOfWorkFactory removed, since it is added automatically


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

Branch: refs/heads/ZEST-132
Commit: e291e7801f88c59adfabb9f4f56dc3e967833a21
Parents: 08b3a7d
Author: Kent Sølvsten <soelvsten@apache.org>
Authored: Sun Dec 20 23:47:27 2015 +0100
Committer: Kent Sølvsten <soelvsten@apache.org>
Committed: Sun Dec 20 23:47:27 2015 +0100

----------------------------------------------------------------------
 .../apache/zest/bootstrap/ModuleAssembly.java   | 34 --------------------
 .../runtime/bootstrap/ModuleAssemblyImpl.java   | 11 +------
 .../layered/assembly/AccountModule.java         |  1 -
 .../indexing/layered/assembly/ConfigModule.java |  1 -
 .../indexing/layered/assembly/FamilyModule.java |  1 -
 .../layered/assembly/PersistenceModule.java     |  1 -
 .../layered/assembly/TestExecutionModule.java   |  1 -
 .../layered/assembly/TestSuite1Module.java      |  1 -
 .../layered/assembly/TestSuite2Module.java      |  1 -
 .../layered/assembly/TestSuite3Module.java      |  1 -
 .../apache/zest/index/rdf/MultiLayeredTest.java |  1 -
 ...taSourceConfigurationManagerServiceTest.java |  4 +--
 .../sample_a/bootstrap/test/TestAssembler.java  | 25 ++++++--------
 .../sample_b/bootstrap/test/TestAssembler.java  | 18 +++++------
 .../moneytransfer/test/TransferMoneyTest.java   | 14 ++++----
 .../moneytransfer/test/TransferMoneyTest2.java  | 14 ++++----
 16 files changed, 34 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ModuleAssembly.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ModuleAssembly.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ModuleAssembly.java
index b77cf76..c81fca4 100755
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ModuleAssembly.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ModuleAssembly.java
@@ -23,7 +23,6 @@ import java.util.function.Predicate;
 import org.apache.zest.api.activation.Activator;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.type.HasTypes;
-import org.apache.zest.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 
 /**
  * The ModuleAssembly is used to register any information about * what the module should
contain, such as composites,
@@ -82,39 +81,6 @@ public interface ModuleAssembly
     ModuleAssembly withActivators( Class<? extends Activator<Module>>... activators
);
 
     /**
-     * Adds the default UnitOfWorkFactory to this Module.
-     * <p>
-     * In versions &lt;3.0, UnitOfWork was built into the Core Runtime, and couldn't
be custom made. In 3.0, the
-     * UnitOfWorkFactory is a regular Service that the Module instance will look up on demand.
-     * </p>
-     * <p>
-     * Typically, this method should be called, and it should be called first in the Assembler,
so that
-     * it is possible to add Concerns and SideEffects to the default implementation of either
the
-     * {@link org.apache.zest.api.unitofwork.UnitOfWorkFactory} or the
-     * {@link org.apache.zest.api.unitofwork.UnitOfWork}.
-     * </p>
-     * <p>
-     * Internally, this method is the equivalent of;
-     * </p>
-     * <pre><code>
-     *     new DefaultUnitOfWorkAssembler().assemble( module );
-     * </code>
-     * </pre>
-     * <p>
-     * and the {@link DefaultUnitOfWorkAssembler} does the equivalent of
-     * </p>
-     * <pre><code>
-     *     module.services( UnitOfWorkFactory.class ).withMixins( UnitOfWorkFactoryMixin.class
);
-     *     module.transients( UnitOfWork.class ).withMixins( ModuleUnitOfWork.class );
-     * </code></pre>
-     * albeit those Mixins are in the Core Runtime and since Core Runtime is not a direct
dependency of any
-     * other module, the classes are loaded with reflection. This may change in the future.
-     */
-    @Deprecated
-    ModuleAssembly withDefaultUnitOfWorkFactory()
-        throws AssemblyException;
-
-    /**
      * Declare a list of TransientComposites for this Module. Use the TransientDeclaration
that is returned to
      * declare further settings. Note that the TransientDeclaration works on all of the types
specified.
      *

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ModuleAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ModuleAssemblyImpl.java
b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ModuleAssemblyImpl.java
index c06a811..1acc2fc 100755
--- a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ModuleAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/ModuleAssemblyImpl.java
@@ -57,7 +57,6 @@ import org.apache.zest.bootstrap.TransientAssembly;
 import org.apache.zest.bootstrap.TransientDeclaration;
 import org.apache.zest.bootstrap.ValueAssembly;
 import org.apache.zest.bootstrap.ValueDeclaration;
-import org.apache.zest.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
 import org.apache.zest.functional.Iterables;
 import org.apache.zest.runtime.activation.ActivatorsModel;
 import org.apache.zest.runtime.composite.TransientModel;
@@ -74,7 +73,7 @@ import org.apache.zest.runtime.structure.ModuleModel;
 import org.apache.zest.runtime.value.ValueModel;
 import org.apache.zest.runtime.value.ValuesModel;
 
-import static org.apache.zest.functional.Iterables.iterable;
+import static org.apache.zest.functional.Iterables.*;
 
 /**
  * Assembly of a Module. This is where you register all objects, Composites,
@@ -146,14 +145,6 @@ public final class ModuleAssemblyImpl
     }
 
     @Override
-    public ModuleAssembly withDefaultUnitOfWorkFactory()
-        throws AssemblyException
-    {
-        new DefaultUnitOfWorkAssembler().assemble( this );
-        return this;
-    }
-
-    @Override
     @SuppressWarnings( { "raw", "unchecked" } )
     public ValueDeclaration values( Class<?>... valueTypes )
     {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/AccountModule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/AccountModule.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/AccountModule.java
old mode 100644
new mode 100755
index 567056a..d398e6f
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/AccountModule.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/AccountModule.java
@@ -43,7 +43,6 @@ class AccountModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         module.entities( Account.class, Domain.class ).visibleIn( Visibility.layer );
         module.values( File.class, Host.class, Port.class, Protocol.class, QueryParam.class,
URL.class )
             .visibleIn( Visibility.layer );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/ConfigModule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/ConfigModule.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/ConfigModule.java
old mode 100644
new mode 100755
index 66cc1c2..ecd4939
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/ConfigModule.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/ConfigModule.java
@@ -35,7 +35,6 @@ class ConfigModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application
);
         return module;
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/FamilyModule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/FamilyModule.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/FamilyModule.java
old mode 100644
new mode 100755
index 74562bf..9e24b3f
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/FamilyModule.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/FamilyModule.java
@@ -41,7 +41,6 @@ class FamilyModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         module.entities( Male.class,
                          Female.class,
                          City.class,

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/PersistenceModule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/PersistenceModule.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/PersistenceModule.java
old mode 100644
new mode 100755
index b6f785a..b6ae1e7
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/PersistenceModule.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/PersistenceModule.java
@@ -37,7 +37,6 @@ class PersistenceModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         module.services( OrgJsonValueSerializationService.class ).taggedWith( ValueSerialization.Formats.JSON
);
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application
);
         return module;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestExecutionModule.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestExecutionModule.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestExecutionModule.java
old mode 100644
new mode 100755
index a21b168..bf3fe2b
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestExecutionModule.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestExecutionModule.java
@@ -40,7 +40,6 @@ public class TestExecutionModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         module.objects( testClass ).visibleIn( Visibility.layer );
         return module;
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite1Module.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite1Module.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite1Module.java
old mode 100644
new mode 100755
index bd7b015..efcb64b
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite1Module.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite1Module.java
@@ -37,7 +37,6 @@ class TestSuite1Module
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         declareTestCase( module, Suite1Case1.class );
         declareTestCase( module, Suite1Case2.class );
         return module;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite2Module.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite2Module.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite2Module.java
old mode 100644
new mode 100755
index b7560b6..ac3f655
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite2Module.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite2Module.java
@@ -33,7 +33,6 @@ class TestSuite2Module
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         return module;
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite3Module.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite3Module.java
b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite3Module.java
old mode 100644
new mode 100755
index 163cbbb..f93ddf7
--- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite3Module.java
+++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/layered/assembly/TestSuite3Module.java
@@ -33,7 +33,6 @@ class TestSuite3Module
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        module.withDefaultUnitOfWorkFactory();
         return module;
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
old mode 100644
new mode 100755
index cd8aeae..5a23a7e
--- a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
@@ -42,7 +42,6 @@ public class MultiLayeredTest extends AbstractMultiLayeredIndexingTest
         public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
             throws AssemblyException
         {
-            module.withDefaultUnitOfWorkFactory();
             new RdfMemoryStoreAssembler( Visibility.application, Visibility.module ).assemble(
module );
             return module;
         }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/libraries/sql/src/test/java/org/apache/zest/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/test/java/org/apache/zest/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
b/libraries/sql/src/test/java/org/apache/zest/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
old mode 100644
new mode 100755
index e7a6f36..25eeb26
--- a/libraries/sql/src/test/java/org/apache/zest/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
+++ b/libraries/sql/src/test/java/org/apache/zest/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
@@ -86,7 +86,7 @@ public class DataSourceConfigurationManagerServiceTest
                 new DBCPDataSourceServiceAssembler().identifiedBy( "datasource-service" ).visibleIn(
Visibility.layer ).assemble( module );
 
                 {
-                    ModuleAssembly testModule = module.layer().module( "TestDS" ).withDefaultUnitOfWorkFactory();
+                    ModuleAssembly testModule = module.layer().module( "TestDS" );
 
                     // Create a specific DataSource that uses the "datasource" service to
do the main work
                     new DataSourceAssembler().
@@ -104,7 +104,7 @@ public class DataSourceConfigurationManagerServiceTest
                 }
 
                 {
-                    ModuleAssembly testModule2 = module.layer().module( "TestDS2" ).withDefaultUnitOfWorkFactory();
+                    ModuleAssembly testModule2 = module.layer().module( "TestDS2" );
 
                     // Create another specific DataSource that uses the "datasource" service
to do the main work
                     // Use DataSourceAssembler to assemble the DataSource.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
b/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
old mode 100644
new mode 100755
index 90ea8a0..315cb3f
--- a/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
+++ b/samples/dci-cargo/dcisample_a/src/test/java/org/apache/zest/sample/dcicargo/sample_a/bootstrap/test/TestAssembler.java
@@ -110,7 +110,7 @@ public class TestAssembler
     private void assembleBootstrapLayer( LayerAssembly bootstrapLayer )
         throws AssemblyException
     {
-        ModuleAssembly bootstrapModule = bootstrapLayer.module( "BOOTSTRAP-Bootstrap" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly bootstrapModule = bootstrapLayer.module( "BOOTSTRAP-Bootstrap" );
 
         // Load base data on startup
         bootstrapModule
@@ -124,7 +124,7 @@ public class TestAssembler
         throws AssemblyException
     {
         // Role-playing entities
-        ModuleAssembly entityRoleModule = contextLayer.module( "CONTEXT-EntityRole" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly entityRoleModule = contextLayer.module( "CONTEXT-EntityRole" );
         entityRoleModule
             .entities(
                 CargoRoleMap.class,
@@ -134,15 +134,14 @@ public class TestAssembler
             .visibleIn( application );
 
         // Role-playing values
-        ModuleAssembly valueRoleModule = contextLayer.module( "CONTEXT-ValueRole" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly valueRoleModule = contextLayer.module( "CONTEXT-ValueRole" );
         valueRoleModule
             .values(
                 ItineraryRoleMap.class,
                 RouteSpecificationRoleMap.class )
             .visibleIn( application );
 
-        ModuleAssembly contextSupportModule = contextLayer.module( "CONTEXT-ContextSupport"
)
-            .withDefaultUnitOfWorkFactory();
+        ModuleAssembly contextSupportModule = contextLayer.module( "CONTEXT-ContextSupport"
);
         contextSupportModule
             .addServices(
                 RoutingService.class,
@@ -159,7 +158,7 @@ public class TestAssembler
         throws AssemblyException
     {
         // Non-role-playing entities
-        ModuleAssembly entityModule = domainLayer.module( "DOMAIN-Entity" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly entityModule = domainLayer.module( "DOMAIN-Entity" );
         entityModule
             .entities(
                 LocationEntity.class,
@@ -167,7 +166,7 @@ public class TestAssembler
             .visibleIn( application );
 
         // Non-role-playing values
-        ModuleAssembly dataModule = domainLayer.module( "DOMAIN-Data" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly dataModule = domainLayer.module( "DOMAIN-Data" );
         dataModule
             .values(
                 TrackingId.class,
@@ -184,8 +183,7 @@ public class TestAssembler
     private void assembleInfrastructureLayer( LayerAssembly infrastructureLayer )
         throws AssemblyException
     {
-        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization"
)
-            .withDefaultUnitOfWorkFactory();
+        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization"
);
         serializationModule
             .services( OrgJsonValueSerializationService.class )
             .taggedWith( ValueSerialization.Formats.JSON )
@@ -199,8 +197,7 @@ public class TestAssembler
             } )
             .visibleIn( application );
 
-        ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing"
)
-            .withDefaultUnitOfWorkFactory();
+        ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing"
);
         indexingModule
             .objects(
                 EntityStateSerializer.class,
@@ -212,16 +209,14 @@ public class TestAssembler
                 RdfIndexingEngineService.class )
             .visibleIn( application );
 
-        ModuleAssembly entityStoreModule = infrastructureLayer.module( "INFRASTRUCTURE-EntityStore"
)
-            .withDefaultUnitOfWorkFactory();
+        ModuleAssembly entityStoreModule = infrastructureLayer.module( "INFRASTRUCTURE-EntityStore"
);
         entityStoreModule
             .addServices(
                 MemoryEntityStoreService.class,
                 UuidIdentityGeneratorService.class )
             .visibleIn( application );
 
-        ModuleAssembly externalServiceModule = infrastructureLayer.module( "INFRASTRUCTURE-ExternalService"
)
-            .withDefaultUnitOfWorkFactory();
+        ModuleAssembly externalServiceModule = infrastructureLayer.module( "INFRASTRUCTURE-ExternalService"
);
         externalServiceModule
             .importedServices(
                 GraphTraversalService.class )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
----------------------------------------------------------------------
diff --git a/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
b/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
old mode 100644
new mode 100755
index 42e7a04..1995a0b
--- a/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
+++ b/samples/dci-cargo/dcisample_b/src/test/java/org/apache/zest/sample/dcicargo/sample_b/bootstrap/test/TestAssembler.java
@@ -113,7 +113,7 @@ public class TestAssembler
     private void assembleBootstrapLayer( LayerAssembly bootstrapLayer )
         throws AssemblyException
     {
-        ModuleAssembly bootstrapModule = bootstrapLayer.module( "BOOTSTRAP-Bootstrap" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly bootstrapModule = bootstrapLayer.module( "BOOTSTRAP-Bootstrap" );
 
         // Load base data on startup
         bootstrapModule
@@ -125,7 +125,7 @@ public class TestAssembler
     private void assembleContextLayer( LayerAssembly contextLayer )
         throws AssemblyException
     {
-        ModuleAssembly roleMapModule = contextLayer.module( "CONTEXT-RoleMap" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly roleMapModule = contextLayer.module( "CONTEXT-RoleMap" );
 
         // Role-playing entities
         roleMapModule
@@ -143,13 +143,13 @@ public class TestAssembler
                 VoyageEntity.class )
             .visibleIn( application );
 
-        ModuleAssembly interactionModule = contextLayer.module( "CONTEXT-Interaction" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly interactionModule = contextLayer.module( "CONTEXT-Interaction" );
         interactionModule
             .transients(
                 ProcessHandlingEvent.class )
             .visibleIn( application );
 
-        ModuleAssembly contextServiceModule = contextLayer.module( "CONTEXT-Service" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly contextServiceModule = contextLayer.module( "CONTEXT-Service" );
         contextServiceModule
             .services(
                 ParseHandlingEventData.class,
@@ -167,7 +167,7 @@ public class TestAssembler
         throws AssemblyException
     {
         // Non-role-playing values
-        ModuleAssembly structureModule = dataLayer.module( "DATA-Structure" ).withDefaultUnitOfWorkFactory();
+        ModuleAssembly structureModule = dataLayer.module( "DATA-Structure" );
         structureModule
             .values(
                 TrackingId.class,
@@ -187,14 +187,14 @@ public class TestAssembler
     private void assembleInfrastructureLayer( LayerAssembly infrastructureLayer )
         throws AssemblyException
     {
-        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization"
).withDefaultUnitOfWorkFactory();
+        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization"
);
         serializationModule
             .services( OrgJsonValueSerializationService.class )
             .taggedWith( ValueSerialization.Formats.JSON )
             .setMetaInfo( (Function<Application, Module>) application -> application.findModule(
"CONTEXT", "CONTEXT-RoleMap" ) )
         .visibleIn( application );
 
-        ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing"
).withDefaultUnitOfWorkFactory();
+        ModuleAssembly indexingModule = infrastructureLayer.module( "INFRASTRUCTURE-Indexing"
);
         indexingModule
             .objects(
                 EntityStateSerializer.class,
@@ -207,14 +207,14 @@ public class TestAssembler
             .visibleIn( application )
             .instantiateOnStartup();
 
-        ModuleAssembly entityStoreModule = infrastructureLayer.module( "INFRASTRUCTURE-EntityStore"
).withDefaultUnitOfWorkFactory();
+        ModuleAssembly entityStoreModule = infrastructureLayer.module( "INFRASTRUCTURE-EntityStore"
);
         entityStoreModule
             .addServices(
                 MemoryEntityStoreService.class,
                 UuidIdentityGeneratorService.class )
             .visibleIn( application );
 
-        ModuleAssembly externalServiceModule = infrastructureLayer.module( "INFRASTRUCTURE-ExternalService"
).withDefaultUnitOfWorkFactory();
+        ModuleAssembly externalServiceModule = infrastructureLayer.module( "INFRASTRUCTURE-ExternalService"
);
         externalServiceModule
             .importedServices(
                 GraphTraversalService.class )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest.java
----------------------------------------------------------------------
diff --git a/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest.java
b/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest.java
old mode 100644
new mode 100755
index 78f470b..d172a22
--- a/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest.java
+++ b/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest.java
@@ -14,13 +14,8 @@
 
 package org.apache.zest.dci.moneytransfer.test;
 
-import org.apache.zest.api.unitofwork.UnitOfWorkFactory;
-import org.apache.zest.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.zest.api.unitofwork.UnitOfWork;
+import org.apache.zest.api.unitofwork.UnitOfWorkFactory;
 import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -34,8 +29,12 @@ import org.apache.zest.dci.moneytransfer.rolemap.CheckingAccountRolemap;
 import org.apache.zest.dci.moneytransfer.rolemap.CreditorRolemap;
 import org.apache.zest.dci.moneytransfer.rolemap.SavingsAccountRolemap;
 import org.apache.zest.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
-import static org.apache.zest.api.usecase.UsecaseBuilder.newUsecase;
+import static org.apache.zest.api.usecase.UsecaseBuilder.*;
 
 /**
  * Test of TransferMoneyContext
@@ -58,7 +57,6 @@ public class TransferMoneyTest
             public void assemble( ModuleAssembly module )
                 throws AssemblyException
             {
-                module.withDefaultUnitOfWorkFactory();
                 module.entities(
                     CheckingAccountRolemap.class,
                     SavingsAccountRolemap.class,

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e291e780/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest2.java
----------------------------------------------------------------------
diff --git a/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest2.java
b/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest2.java
old mode 100644
new mode 100755
index 7d4a11c..ab58b8b
--- a/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest2.java
+++ b/samples/dci/src/test/java/org/apache/zest/dci/moneytransfer/test/TransferMoneyTest2.java
@@ -14,14 +14,9 @@
 
 package org.apache.zest.dci.moneytransfer.test;
 
-import org.apache.zest.api.unitofwork.UnitOfWorkFactory;
-import org.apache.zest.bootstrap.unitofwork.DefaultUnitOfWorkAssembler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.zest.api.structure.Module;
 import org.apache.zest.api.unitofwork.UnitOfWork;
+import org.apache.zest.api.unitofwork.UnitOfWorkFactory;
 import org.apache.zest.api.usecase.UsecaseBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
@@ -33,8 +28,12 @@ import org.apache.zest.dci.moneytransfer.domain.entity.CheckingAccountEntity;
 import org.apache.zest.dci.moneytransfer.domain.entity.CreditorEntity;
 import org.apache.zest.dci.moneytransfer.domain.entity.SavingsAccountEntity;
 import org.apache.zest.test.EntityTestAssembler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
-import static org.apache.zest.api.usecase.UsecaseBuilder.newUsecase;
+import static org.apache.zest.api.usecase.UsecaseBuilder.*;
 
 /**
  * Test of TransferMoneyContext
@@ -57,7 +56,6 @@ public class TransferMoneyTest2
             public void assemble( ModuleAssembly module )
                 throws AssemblyException
             {
-                module.withDefaultUnitOfWorkFactory();
                 module.entities(
                     CheckingAccountEntity.class,
                     SavingsAccountEntity.class,


Mime
View raw message