Package org.jboss.test.security.interfaces

Examples of org.jboss.test.security.interfaces.StatefulSession.echo()


      StatefulSessionHome home = (StatefulSessionHome) obj;
      log.debug("Found StatefulSessionHome");
      // The create should be allowed to call getCallerPrincipal
      StatefulSession bean = home.create("testStatefulCreateCaller");
      // Need to invoke a method to ensure an ejbCreate call
      bean.echo("testStatefulCreateCaller");
      log.debug("Bean.echo(), ok");

      logout();
   }
View Full Code Here


      log.debug("Created spec.StatelessSession");
      Handle h = bean.getHandle();
      log.debug("Obtained handle: " + h);
      bean = (StatefulSession) h.getEJBObject();
      log.debug("Obtained bean from handle: " + bean);
      log.debug("Bean.echo('Hello') -> " + bean.echo("Hello"));
      logout();

      /*
       * Attempting to obtain the EJB fron the handle without security association present should fail
       */
 
View Full Code Here

      h = bean.getHandle();
      login();
      // Now we should be able to obtain and use the secure bean
      bean = (StatefulSession) h.getEJBObject();
      log.debug("Obtained bean from handle: " + bean);
      log.debug("Bean.echo('Hello') -> " + bean.echo("Hello"));
      logout();
   }

   /**
    * Stress test declarative security.
View Full Code Here

         validateSecurityAssociationSubject("post stateless", callerPrincipals);

         StatefulSessionHome home2 = (StatefulSessionHome)
            ctx.lookup("java:comp/env/ejb/StatefulSession");
         StatefulSession bean2 = home2.create("validateCallerContext");
         bean2.echo("validateCallerContext");
         validatePolicyContextSubject("post stateful", callerPrincipals);
         validateSecurityAssociationSubject("post stateful", callerPrincipals);

         EntityHome home3 = (EntityHome)
            ctx.lookup("java:comp/env/ejb/Entity");
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.