I fixed the problems just by getting rid of the specific behaviour on behalf of 
the entitystates in prepare.
The tests run now but the behaviour seems a bit unspecified (which module is 
the injected one, which

Another question is the serialization of stuff thats transported to the server 
side.


When trying to do a bit what belongs where I tried to define the 
EntityComposites on both sides (client & server).

         super.assemble( module );
         module.setName( "Module 1" );
!!!        module.addEntities( TestEntity.class, TestValue.class ).visibleIn( 
Visibility.module );
         module.addServices( ClientRmiEntityStoreService.class );

         ModuleAssembly remote = module.getLayerAssembly().newModuleAssembly();
         remote.setName( "Server" );
!!!        remote.addEntities( TestEntity.class, TestValue.class).visibleIn( 
Visibility.module );

         remote.addEntities( RegistryConfiguration.class );
         remote.addServices( ServerRmiEntityStoreService.class,
                             RegistryService.class,
                             MemoryEntityStoreService.class 
).instantiateOnStartup();



When running the test I get an AmbigiousEntityException.

org.qi4j.composite.AmbiguousTypeException: More than one visible CompositeType 
implements MixinType: 
org.qi4j.test.entity.AbstractEntityStoreTest$TestEntity
        at 
org.qi4j.runtime.structure.EntitiesModel.getEntityModelFor(EntitiesModel.java:63)
        at 
org.qi4j.runtime.structure.ModuleInstance.findModuleForEntity(ModuleInstance.java:159)
        at 
org.qi4j.runtime.entity.UnitOfWorkInstance.newEntityBuilder(UnitOfWorkInstance.java:125)
        at 
org.qi4j.runtime.entity.UnitOfWorkInstance.newEntityBuilder(UnitOfWorkInstance.java:117)
        at 
org.qi4j.test.entity.AbstractEntityStoreTest.createEntity(AbstractEntityStoreTest.java:109)
        at 
org.qi4j.test.entity.AbstractEntityStoreTest.whenNewEntityThenCanFindEntity(AbstractEntityStoreTest.java:48)

I thought with the visibility rules in place I can add the same entities to 
different modules, e.g. for having differnt 
stores or whatever need.

Michael

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to