Where is @AroundInvoke interceptor invoked? <p>I'm doing some test examples with java, and I come up with an example that uses @AroundInvoke. The question is that I don't know exactly where is the method invoked.</p> <p>This test makes an invocation where it calls post() method, but I don't really know how that works (<a href="https://docs.oracle.com/javaee/6/tutorial/doc/gkedm.html" rel="nofollow">Using Interceptors explanation</a>).</p> <pre><code>@Test public void crudtest() { JsonObjectBuilder todoBuilder = Json.createObjectBuilder(); JsonObject todoToCreate = todoBuilder. add("caption", "implement"). add("priority", 10). build(); //The next post execute, invoke the method Response postResponse = this.provider.target().request(). post(Entity.json(todoToCreate)); } </code></pre> <p>The order of invocation is BoundaryLogger and then MonitorSink</p> <p><strong>BoundaryLogger.java</strong></p> <pre><code>... public class BoundaryLogger { @Inject Event&lt;CallEvent&gt; monitoring; @AroundInvoke public Object logCall(InvocationContext ic) throws Exception { long start = System.currentTimeMillis(); try { return ic.proceed(); } finally { long duration = System.currentTimeMillis() - start; monitoring.fire(new CallEvent(ic.getMethod().getName(), duration)); } } } </code></pre> <p><strong>MonitorSink</strong></p> <pre><code>@Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) public class MonitorSink { @Inject LogSink LOG; public void onCallEvent(@Observes CallEvent event){ LOG.log(event.toString()); } } </code></pre>