It's probably better if you modify JBossMetaData that adds an interceptor. This might require some transformation if interceptor-orders are used and such.
We already do this, but it looks like our interceptor doesn't get hit for @PrePassivate / @PostActivate, hence no proper context.
No idea why it doesn't get hit. Should it?
Adding an interceptor that modifies the actual type of InvocationContext will probably fail, because we use custom InvocationContext types.
Shouldn't this work as it is?
Since original invocation::proceed will eventually be invoked, which has no knowledge of temp in-lined impl.