Examples of SimpleSession


Examples of org.jboss.test.security.ejb3.SimpleSession

      // login with a user that has the Guest role.
      this.login("UserC", "PassC".toCharArray());

      // get a reference to the remote protected stateless session bean.
      Object obj = getInitialContext().lookup("SimpleStatelessSessionBean/remote");
      SimpleSession session = (SimpleSession) PortableRemoteObject.narrow(obj, SimpleSession.class);

      // a guest user should have access to unprotected methods only.
      this.assertMethodAccessResults(session, false, false);

      // repeat the tests, this time calling a stateful session bean.
View Full Code Here

Examples of org.jboss.test.security.ejb3.SimpleSession

    */
   public void testUnauthenticatedMethodAccess() throws Exception
   {
      // get a reference to the remote protected stateless session bean.
      Object obj = getInitialContext().lookup("SimpleStatelessSessionBean/remote");
      SimpleSession session = (SimpleSession) PortableRemoteObject.narrow(obj, SimpleSession.class);

      // an unauthenticated user should have access to unprotected methods only.
      this.assertMethodAccessResults(session, false, false);

      // repeat the tests, this time calling a stateful session bean.
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.