Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
EJBException will wrap the actual exception still for runtime constraint, ex:
final Context context = new InitialContext(new PropertiesBuilder() .p(Context.INITIAL_CONTEXT_FACTORY, RemoteInitialContextFactory.class.getName()) .p(Context.PROVIDER_URL, "xxxxx") .p(JNDIContext.AUTHENTICATE_WITH_THE_REQUEST, "true") .p("java.naming.security.principal", "wrong") .p("java.naming.security.credentials", "wrong") .p("openejb.authentication.realmName", "xxxx") .build()); final AnInterfaceRemote client = AnInterfaceRemote.class.cast(context.lookup("RemoteWithSecurityRemote")); try { client.call(); } catch (final EJBException e) { assertTrue(LoginException.class.isInstance(e.getCause())); }