Package org.jboss.test.security.interfaces

Examples of org.jboss.test.security.interfaces.SecurityContext


      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);
      bean.remove();
   }
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)
      {
         SecurityException se = new SecurityException("DataSource connection failed");
View Full Code Here

TOP

Related Classes of org.jboss.test.security.interfaces.SecurityContext

Copyright © 2018 www.massapicom. 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.