LOGGER.info("Testing EJB3 access.");
final Configuration tmpConfig = Configuration.getConfiguration();
Configuration
.setConfiguration(new Krb5LoginConfiguration("hnelson", Krb5ConfServerSetupTask.HNELSON_KEYTAB_FILE, false));
Context ctx = getRemoteContext();
SimpleSession session = (SimpleSession) ctx.lookup("ejb:/ejb-spnego//SimpleStatelessSessionBean!"
+ SimpleSession.class.getName());
Principal principal = session.invokeRegularMethod();
ctx.close();
assertEquals("User's principal name doesn't match.", "hnelson@JBOSS.ORG", principal.getName());
Configuration.setConfiguration(new Krb5LoginConfiguration("jduke", Krb5ConfServerSetupTask.JDUKE_KEYTAB_FILE, false));
ctx = getRemoteContext();
session = (SimpleSession) ctx.lookup("ejb:/ejb-spnego//SimpleStatelessSessionBean!" + SimpleSession.class.getName());
principal = session.invokeAdministrativeMethod();
ctx.close();
assertEquals("User's principal name doesn't match.", "jduke@JBOSS.ORG", principal.getName());