[jboss-user] [JBoss Seam] - Seam Interceptors
Kragoth
do-not-reply at jboss.com
Wed Jan 9 03:07:17 EST 2008
Hey,
I am trying to make an Interceptor so I can do some injection of Spring beans by type.
However, for some reason my Interceptor never fires.
Here is my test code.
| package gekko.web.services;
|
| import org.jboss.seam.annotations.intercept.AroundInvoke;
| import org.jboss.seam.annotations.intercept.Interceptor;
| import org.jboss.seam.intercept.AbstractInterceptor;
| import org.jboss.seam.intercept.InvocationContext;
| import org.jboss.seam.log.LogProvider;
| import org.jboss.seam.log.Logging;
|
| @Interceptor
| public class GekkoSpringInjector extends AbstractInterceptor
| {
|
| private static final LogProvider log = Logging.getLogProvider(GekkoSpringInjector.class);
|
| @AroundInvoke
| public Object aroundInvoke(InvocationContext invocation) throws Exception
| {
| log.debug("********************************************");
| throw new Exception("THIS FIRED");
| // return null;
| }
|
| }
|
Now, obviously I'm missing something. Somehow I need to register this Interceptor, but where/how do I do this. Cause I don't want to have to add and @Interceptor annotation to EVERY class that will need this interceptor.
Could someone point me in the right direction. I've tried looking at the doco but nothing seems to make this work.
I know I've probly got some stupid mistake, but thanks for any help. :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118152#4118152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118152
More information about the jboss-user
mailing list