This content has been marked as final. Show 1 reply
Bingo, I have found simple solution.
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory"); props.put(Context.SECURITY_PRINCIPAL, "username"); props.put(Context.SECURITY_CREDENTIALS, "password");
these properties to the InitialContext. Then when configured inital context in embeddable bootstrap version there is no problem with getting principal.
Hope there is no problem with different context factory, as for embeddable it is recommended to use LocalOnlyContextFactory. So far works ok.