Niclas,

I have some free cycles to work on finishing QI-364 but I'd like to have feedback on the first activation refactoring I did on MemoryEntityStoreService and JdbmEntityStoreService before going down on all librairies and extensions.

Could you make a quick review of the two commits I mentionned and tell me what you think?

Thanks!

/Paul


Paul Merlin a écrit :
Niclas Hedhman a écrit :
I did not remove the Activatable interface yet because that imply a lot of tedious changes in libraries, extensions, tools and samples.

Yes, this will actually present some major challenge.

foreach( Library p )
   - Write unit test to capture Activatable functionality.
   - Remove Activatable.
   - Unit test should fail.
   - Introduce the activator replacement
   - Unit test should succeed.

This will take a lot of time. But the nice upside a strengthening of
the unittests in libraries, which at the moment is a bit weak.
The Activators mechanism handle Types activation in a predictible order,
but do not handle Mixins activation. That's because, and we already knew
that, Types order are guaranted but not Mixins order. This indeed prevent
private mixins activation and means that the @Activators annotation can be
added on Types only.Another side effect is that you can't use the same
activation method names on different mixins.

Much more restrictive than legacy Activatable support but strict and
predictible.

So we'd have to refactor all code that rely on Mixins activation and there
is a lot. As a first example let's take entitystore-jdbm.

JdbmEntityStoreMixin has activation and passivation needs.
JSONMapEntityStoreMixin too.
JSONMapEntityStoreMixin use @This MapEntityStore implemented by JdbmEntityStoreMixin.

For now I can't see how to proceed without adding a lot of other types
related to activation. In the end we won't be able to easily reuse a mixin
that has activation needs without a correct type (an interface with the
@Activators annotation).

So, more verbose too.


To support the discussion, here is a first commit that removes the
Activatable interface from MemoryEntityStoreService:

https://github.com/Qi4j/qi4j-sdk/commit/e501048736d0dd81fda1a530fff0ae0b3917044e


And another one that does the same thing on JdbmEntityStoreService:

https://github.com/Qi4j/qi4j-sdk/commit/001814e5f3eb5751c6de1a23574f21b87bba50dc

Note that JdbmEntityStoreService extends JdbmEntityStoreActivation
_and_ JSONMapEntityStoreActivation.


WDYT ?

/Paul


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

Reply via email to