Package org.jboss.test.security.interfaces

Examples of org.jboss.test.security.interfaces.SecurityContextHome.create()


      log.debug("+++ testDomainInteraction()");
      Object obj = getInitialContext().lookup("spec.UserInRoleContextSession");
      obj = PortableRemoteObject.narrow(obj, SecurityContextHome.class);
      SecurityContextHome home = (SecurityContextHome) obj;
      log.debug("Found UserInRoleContextSession");
      SecurityContext bean = home.create();
      log.debug("Created spec.UserInRoleContextSession");
      HashSet roles = new HashSet();
      roles.add("Role1");
      roles.add("Role2");
      bean.testDomainInteraction(roles);
View Full Code Here


      // Access a bean from another security-domain
      try
      {
         InitialContext ctx = new InitialContext();
         SecurityContextHome home = (SecurityContextHome)ctx.lookup("java:comp/env/ejb/CalledBean");
         SecurityContext bean = home.create();
         SecurityContext thisBean = (SecurityContext) sessionContext.getEJBObject();
         bean.nestedInteraction(thisBean, expectedRoles);
      }
      catch(Exception e)
      {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.