Perfect! Then blueprint will hold the strong reference for you and pass it back to the post call to either end or fail the coordination.
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
----- Original message -----
From: Christian Schneider <ch...@die-schneider.net>
Sent by: osgi-dev-boun...@mail.osgi.org
To: OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Cc:
Subject: Re: [osgi-dev] Valid coordinator scenario?
Date: Tue, Aug 4, 2015 3:22 AM
Actually after talking to Peter I just found a much simpler solution when I tried to explain the problem.
I am using the Aries blueprint interceptor interface:
https://github.com/apache/aries/blob/trunk/blueprint/blueprint-parser/src/main/java/org/apache/aries/blueprint/Interceptor.java
It allows to return an object in precall. So I can simply return the coordination there and I do not need to store it in a thread local.
Christian
On 03.08.2015 23:23, BJ Hargrave wrote:Yes, you need to do something to hold a strong reference to the coordination. But you also need to make sure you always clean up so there is no case where a strong reference is never cleaned up. I don't know anything about your use case.--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev