[seam-dev] Retrieving the Bean object for an interceptor

Pete Muir pmuir at redhat.com
Thu Apr 22 06:05:40 EDT 2010


On 22 Apr 2010, at 03:36, Stuart Douglas wrote:

> I have attempted to add a temporary fix for this issue to weld-extensions to allow interceptors to get at the AnnotatedType of the object being intercepted.
> 
> The extension wraps the InjectionTarget of Beans that need this functionality, and the inject method of the InjectionTarget stores a mapping from the instance to the AnnotatedType in a WeakHashMap. 
> 
> I have a few questions:
> 
> - Is InvocationContext.getTarget() guaranteed to return the instance of the bean or can it return a proxy? If it can return a proxy this technique is not going to work.
> - Can I add a dependency on google collections to weld-extensions? Currently it stores the references in a syncronized WeakHashMap, but really what I need is a Concurrent Weak Identity hashmap. 

Do we need anything else from google collections?




More information about the seam-dev mailing list