I have some interceptors that are used for debugging (performance, logging of method usage, etc) our JavaEE applications.
In production system I don't want those interceptors to be enabled by default but I want to have the possibility to enable them at runtime (=without a re-deploy). Is there any portable way to do this independet of the CDI implementation? If not, is there any WELD specific way to do this?
My only solution would be a global flag that must be used by those interceptors but that still has the overhead of entering the interceptor and evaluating the flag just for nothing.