deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Schön <>
Subject DS SecurityInterceptor with DS ExceptionHandler in an ear deployment
Date Tue, 29 Jul 2014 12:58:02 GMT

I am using a DS SecurityInterceptor in both modules (ejb and war) and one DS ExceptionHandler
in the web module. Since [DELTASPIKE-449] is closed, security violations integrate with DS
exception handling. Now my problem: If a security violation in the ejb module is detected,
DS does not find the ExceptionHandler in the web module. Instead of an AccessDeniedException
I get an IllegalStateException in the web layer:

Could not find beans for Type=class xx.xxxxx.FacesExceptionHandler and qualifiers:[]  [1]

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... more

Within the web module, the exception handler works fine. Any regular CDI events thrown in
the ejb module are delivered to listeners in the web module without any problem.

My workaround for  the moment is an ExceptionHandler in the ejb module catching the AccessDeniedException,
mark the event as handled, extract the original event and throw it manually. Throwing it again
with any of the ExceptionEvent throwing methods results in the same error as described above.

The error is reproducible easily. My configuration is GF4 and DS 1.0.0.

Any better ideas?

Regards, Rainer

public class FacesExceptionHandler {

View raw message