This content has been marked as final.
Show 2 replies
-
1. Re: Is really a @Decorator an injectable managed bean?
mkouba Mar 3, 2014 7:38 AM (in response to lucasvc)Hi Lucas,
the sentence you are referencing (3.1.1 Which Java classes are managed beans?) implies that the decorator class may be abstract. I.e. the decorator is not required to implement every method of every decorated type. However a decorator is always a dependent object of the object it decorates. So it's not possible to inject into any other bean. Actually it does not make much sense. The purpose of decorators (similar to interceptors) is to intercept business method invocations and do some business-logic-aware operations. See also 5.1.4 Inter-module injection: "A bean is available for injection in a certain module if the bean is not an interceptor or decorator..."
-
2. Re: Is really a @Decorator an injectable managed bean?
mkouba Mar 3, 2014 7:39 AM (in response to lucasvc)And the short version of the answer: No, it is not.