[jboss-user] [JBoss Seam] - How to use Seam interceptor?

xinhua do-not-reply at jboss.com
Fri Nov 16 05:50:28 EST 2007


Hello everybody,

i want to create an annotation @JndiInject("java:/....") above an attribute for jndi lookup. I use java bean (no EJB3), so i created annotation like this:


  | @Target(FIELD)
  | @Documented
  | @Retention(RUNTIME)
  | @Interceptors(JndiInterceptor.class)
  | public @interface Jndi 
  | {
  | 	String value();
  | }
  | 


and i think interceptor class should be like this:

  | public class JndiInterceptor {
  | 
  | 	@AroundInvoke
  | 	public Object jndiLookup(InvocationContext invocation )throws Exception{
  |                 ....................
  | 		return invocation.proceed();
  | 	}
  | }
  | 


but it doesnt work,:...( can anyone help?

many thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105396#4105396

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105396



More information about the jboss-user mailing list