This content has been marked as final.
Show 4 replies
-
1. Re: Annotation Interception Question
monkeyden Feb 7, 2008 5:59 PM (in response to kasim)You mean @AroundInvoke? The example uses it on a method:
http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#d0e4342 -
2. Re: Annotation Interception Question
monkeyden Feb 7, 2008 6:01 PM (in response to kasim)Ah, I see what you mean. I was looking at the EJB3 example.
@Target(TYPE)
@Retention(RUNTIME)
@Interceptors(LoggedInInterceptor.class)
public @interface LoggedIn {} -
3. Re: Annotation Interception Question
kasim Feb 8, 2008 8:54 AM (in response to kasim)"monkeyden" wrote:
Ah, I see what you mean. I was looking at the EJB3 example.
@Target(TYPE)
@Retention(RUNTIME)
@Interceptors(LoggedInInterceptor.class)
public @interface LoggedIn {}
Yeah ... when you do that if you look at the doco its only at the class level.
That parts not TOOO big of a deal since i just force the user to have two annotations. One at hte class level that the implementation does all the work. Then a marker on the method so i just check.
The lack of being able to inject other Seam components though does kind of suck.
There are ways around it since all i am essentially doing is packing it into a message and sending to a queue, but still sucks. Especially if i wanted to do somemthing more complicated. hmmm ... -
4. Re: Annotation Interception Question
pmuir Feb 17, 2008 2:13 PM (in response to kasim)1) Its classlevel only - we have an ancient open issue for this, but with Web Beans on the way, I don't think this will see light before then. Your approach is the best workaround I know of.
2) You should be able inject other components using Component.getInstance/Contexts lookup. What is the lifecycle of this request? JSF? Post your code.