polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject UnitOfWorkFactory design flaw
Date Sat, 02 Dec 2017 07:14:20 GMT
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?

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message