Package org.jboss.test.security.interfaces

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


   {
      login("anil","opensource".toCharArray());
      Object obj = getInitialContext().lookup("bean1.UsefulStatelessSessionBean");
      obj = PortableRemoteObject.narrow(obj, UsefulStatelessSessionHome.class);
      UsefulStatelessSessionHome home = (UsefulStatelessSessionHome) obj;
      UsefulStatelessSession bean = home.create()
      assertEquals("NiceUser is true", "true", ""+bean.isCallerInRole("NiceUser") );
      assertEquals("BadRole is false", "false", ""+bean.isCallerInRole("BadRole") );
      bean.remove();
      logout();
   }
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.