What is the scope of an interceptor in CDI?
aka, is this legal? Would I get the same instance of this interceptor every place it's invoked?
@RequestScoped
public class SalesForceControllerInterceptor {
@Inject
private Logger log;
@AroundInvoke
public Object intercept(InvocationContext context) throws Exception {
...
}
@RequestScoped
interceptor into an@ApplicationScoped
interceptor on Apache TomEE. The requestscoped fired first, and stored a value. But when the appscoped interceptor fired, it got a new instance of the requestscoped interceptor injected into it. What gives? – Melena