You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2017/12/02 07:14:20 UTC

UnitOfWorkFactory design flaw

So, Kent's questions around @Structure brought up the possibility that
UnitOfWorkFactory (which is a Service now) may be incorrectly implemented.

And YES, I think there is a design flaw. The "module" used for the
TypeLookup is currently the module of the UnitOfWorkFactory. This is ok,
PROVIDED that the UnitOfWorkFactory has Visibility.module. And that is
something we can not guarantee.

I think this is semi-serious. If everyone use module.defaultServices() for
all modules and nothing else, then things are under control. BUT, as soon
as anyone (like myself) start fiddling with the defaults, then things
deteriorate quite quickly.

Now, the answer is not really to go back and make UnitOfWorkFactory an
internal/permanent part of Core Runtime, but probably to define what does
@Structure really mean, and can we get this to be a custom thing, and put
UnitOfWorkFactory into that category?

Cheers
-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java