You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2016/10/04 15:09:20 UTC
[jira] [Resolved] (TOMEE-1952)
openejb.ejbd.authenticate-with-request hides authentication exception
[ https://issues.apache.org/jira/browse/TOMEE-1952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau resolved TOMEE-1952.
---------------------------------------
Resolution: Fixed
> openejb.ejbd.authenticate-with-request hides authentication exception
> ---------------------------------------------------------------------
>
> Key: TOMEE-1952
> URL: https://issues.apache.org/jira/browse/TOMEE-1952
> Project: TomEE
> Issue Type: Bug
> Reporter: Romain Manni-Bucau
> Assignee: Romain Manni-Bucau
> Fix For: 7.0.2
>
>
> EJBException will wrap the actual exception still for runtime constraint, ex:
> {code}
> 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()));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)