public void testLocalEJBMethodAccessWithJaasLogin() throws Exception
{
log.debug("+++ testLocalEJBMethodAccessWithJaasLogin");
String confName = System.getProperty("conf.name", "spec-test");
SecurityClient sc = SecurityClientFactory.getSecurityClient(JBossSecurityClient.class);
AppCallbackHandler acbh = new AppCallbackHandler("scott","echoman".toCharArray());
sc.setJAAS(confName, acbh);
sc.login();
InitialContext jndiContext = new InitialContext();
Object obj = jndiContext.lookup("spec.CallerBean");
obj = PortableRemoteObject.narrow(obj, CalledSessionHome.class);
CalledSessionHome home = (CalledSessionHome) obj;
log.debug("Found spec.CallerBean Home");
CalledSession bean = home.create();
log.debug("Created spec.CallerBean");
log.debug("Bean.invokeEcho('testLocalMethodAccess') -> "+bean.invokeEcho("testLocalMethodAccess"));
bean.remove();
sc.logout();
}