A JeeUnit test that reproduces the problem in Java SE (2.1.0.Final)

@RunWith(JeeunitRunner.class)
public class InterceptorTest {

@Inject
Intercepted bean;

@Test
public void test() throws Exception

{ bean.method(); }

@InterceptorBinding
@Target(

{ElementType.METHOD, ElementType.TYPE}

)
@Retention(RetentionPolicy.RUNTIME)
static public @interface InterceptMe {}

@InterceptMe
@Interceptor @Priority(1)
static class AnInterceptor {

@Inject
ScopedBean delegate;

@AroundInvoke
public Object intercept(final InvocationContext ctx) throws Exception

{ return delegate.execute(ctx); }

}

@ApplicationScoped
static class ScopedBean {

public Object execute(InvocationContext ctx) throws Exception

{ return ctx.proceed(); }

}

@InterceptMe
static class Intercepted {

public void method()

{ System.out.println(this+" is doing it"); }

}
}

Change By: Fabio Simeoni (29/Oct/13 7:19 AM)
Summary: Interceptors delegating chain forwarding to scoped objects cause infinite  loope  loop
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira