Is it possible to add interceptors dynamically using any API? Say when my application is deployed, I will add a interceptor to the standard interceptor's stack. Thereafter, my interceptor should also be invoked while calls are made to the EJBs. When my application is undeployed, I will remove the interceptor from the stack using the API.
Is there any way to achieve this?
It's not possible at the moment. The interceptor stack is created at EJB deployment time and is static.