I just revisited
GLASSFISH-13513 and GLASSFISH-14831 to see if it is possible to plug in interceptors the CDI way around EJBs.
Indeed when deploying a prepared package as non-OSGi the interceptor gets invoked but not when using OSGi deployment.
Therefore I made up another test case which should be sufficient for a confirmation of this issue:
- maven reactor build with 4 modules
- build.sh script for test:
- "mvn clean install"
- copy resulting artifacts into .../autodeploy/bundles/ folder of a running glassfish domain
- wait for (re-)deployment
- using "curl" to call the web service
- search for a fault inside the returned XML
So basically for a test I issue a command like this:
$ GF_DOMAIN_DIR=/srv/servers/gf-3.1-b32/glassfish/domains/domain1/ ./build.sh
Well, I also can say that with the old @Interceptors(
) method the interceptor is being called so I suspect it is not injected at all.
This test throws a fault if the interceptor is being invoked. If no fault occurs and the response is valid there must be something wrong.