Use of Qi4j.dereference(T compositeOrUow)

9 views
Skip to first unread message

Tasos Parisinos

unread,
Apr 1, 2015, 3:56:29 PM4/1/15
to qi4j...@googlegroups.com
Hello all

We have implemented an application with a DCI design. There we have a Use Case (Context), with a single actor, a TransientComposite with several fragments, each with its own mixin implementation. Some of these fragments need to access the state of the composite type and even modify it. To achieve this we use the following injection in the abstract class mixin implementations:

@This
protected ActorComposite self;

This works out fine (at least so it seems) without the need to dereference. Can anyone shed some more light to the use of this API call?

Thanx in advance

Niclas Hedhman

unread,
Apr 2, 2015, 4:07:07 AM4/2/15
to Tasos Parisinos, qi4j...@googlegroups.com, dev

Do you mean the dereference() method in the Qi4j API ??  

That is only needed for Concerns and SideEffects when they need to hand over a "self" to something external. I don't remember off-hand why it was only needed in Concerns and SideEffects, and not Mixins. I think it was related to the way that the stateless part of the invocation stack is linked together. If you need to know, I will dig it up...

Niclas

--
You received this message because you are subscribed to the Google Groups "qi4j-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qi4j-dev+u...@googlegroups.com.
To post to this group, send email to qi4j...@googlegroups.com.
Visit this group at http://groups.google.com/group/qi4j-dev.
For more options, visit https://groups.google.com/d/optout.



--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
Reply all
Reply to author
Forward
0 new messages