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

Nicklas Karlsson nickarls at gmail.com
Tue Apr 6 02:38:04 EDT 2010


In the Good Old Days, say late 2008, when the spec was a draft for WebBeans,
it said

"If any class-level interceptor binding type is specified in XML, the
interceptor binding annotations appearing on the implementation
class are ignored. The class-level interceptor bindings for the Web Bean
include all interceptor bindings declared
using XML, together with all interceptor bindings of all stereotypes
declared by the Web Bean.

Otherwise, if no class-level interceptor binding types are specified in XML,
the interceptor binding annotations that appear
on the implementation class are used. The class-level interceptor bindings
for the Web Bean include all interceptor bindings
declared by annotating the implementation class, together with all
interceptor bindings of all stereotypes declared by
the Web Bean.

If any method-level interceptor binding type is specified in XML, the
interceptor binding annotations appearing on that
method are ignored. The method-level interceptor bindings for that method
include only the interceptor bindings declared
using XML.

Otherwise, if no method-level interceptor binding types are specified in
XML, the interceptor binding annotations that appear
on that method are used. The method-level interceptor bindings for that
method include all the interceptor bindings
declared by annotating the method."



On Tue, Apr 6, 2010 at 7:56 AM, Stuart Douglas
<stuart at baileyroberts.com.au>wrote:

> I can't see any way to get information about the actual Bean that an
> interceptor is bound to.
>
> For example say I have a class:
>
> @Security("#{true}")
> class SomeClass
> {
>   ...
> }
>
> Another bean with the same class is wired up with XML:
>
> <t:SomeClass>
>  <se:Security>#{false}</se:Security>
>  ....
> </t:SomeClass>
>
> I cannot see any way for a security interceptor to know which Bean it is
> intercepting, and therefore figure out which annotation to use. Is there
> something I am missing here?
>
> Stuart
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>



-- 
---
Nik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100406/663503a1/attachment-0001.html 


More information about the seam-dev mailing list