[seam-dev] Retrieving the Bean object for an interceptor
Dan Allen
dan.j.allen at gmail.com
Wed Apr 14 15:05:36 EDT 2010
On Tue, Apr 13, 2010 at 8:31 PM, Stuart Douglas <stuart at baileyroberts.com.au
> wrote:
> I think that the easiest way to address this would be to allow the
> interceptor to inject the Bean and AnnotatedType object for the intercepted
> object.
>
> e.g.
> @Inject @InterceptedMetadata Bean bean;
>
> @Inject @InterceptedMetadata AnnotatedType type;
>
> In theory the AnnotatedType could be null, but in practice custom beans
> don't support interceptors, so this should be fine.
>
> This allows the interceptor to read the annotation information from the
> AnnotatedType. We could also allow beans to inject this information as well,
> but I think that this can be implemented as a portable extension without any
> spec changes.
>
> The approach taken by decorators immediately comes to mind. I think the
availability of this information would really revolutionize the Java EE
approach to interception. I know if I showed this in a presentation I would
get some raised brows ;)
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100414/4a9c9a63/attachment-0001.html
More information about the seam-dev
mailing list