Hi,
I'm running into a problem with dependency injection in entities, and
have located the problem to be this in EntityInstance:
public Object invoke( Object proxy, Method method, Object[] args )
throws Throwable
{
return entityModel.invoke( this, this.proxy, method, args,
uow.module() );
}
---
The call is being made with the UoW module, instead of the module of the
entity, and so the scope of DI is that of the one who created the UoW,
rather than the entitys "own" scope. Because what the entity needs is
not available to the caller the DI fails!
I can't really see why it works like this, and couldn't find any commit
messages that show it. Niclas, can you remember if there was any thought
to this, or if it's just a random bug? Would it be ok to change
"uow.module()" to "module", so that all DI in the entity is done from
the entity scope?
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev