InitialContext ctx = new InitialContext(env);
Object obj = ctx.lookup("jacc/Secured");
obj = PortableRemoteObject.narrow(obj, SecuredServiceRemoteHome.class);
SecuredServiceRemoteHome home = (SecuredServiceRemoteHome) obj;
log.debug("Found SecuredServiceRemoteHome");
SecuredServiceRemote bean = home.create();
log.debug("Created SecuredServiceRemote");
Principal callerIdentity = new SimplePrincipal("jduke");
Principal runAsIdentity = new SimplePrincipal("runAsUser");
HashSet expectedCallerRoles = new HashSet();
expectedCallerRoles.add("groupMemberCaller");
expectedCallerRoles.add("userCaller");
expectedCallerRoles.add("allAuthCaller");
expectedCallerRoles.add("webUser");
HashSet expectedRunAsRoles = new HashSet();
expectedRunAsRoles.add("identitySubstitutionCaller");
expectedRunAsRoles.add("extraRunAsRole");
CallerInfo info = new CallerInfo(callerIdentity, runAsIdentity,
expectedCallerRoles, expectedRunAsRoles);
bean.groupMemberMethod(info);
bean.remove();
}