Package org.jboss.test.security.interfaces

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


      log.debug("+++ testStatefulCreateCaller");
      login();
      InitialContext jndiContext = new InitialContext();
      Object obj = jndiContext.lookup("spec.StatefulSession");
      obj = PortableRemoteObject.narrow(obj, StatefulSessionHome.class);
      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("+++ testStatefulHandle");
      login();
      Object obj = getInitialContext().lookup("spec.StatefulSession");
      obj = PortableRemoteObject.narrow(obj, StatefulSessionHome.class);
      StatefulSessionHome home = (StatefulSessionHome) obj;
      log.debug("Found StatefulSession");
      StatefulSession bean = home.create("testStatefulHandle");
      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);
View Full Code Here

         StatelessSession bean = home.create();
         bean.echo("validateCallerContext");
         validatePolicyContextSubject("post stateless", callerPrincipals);
         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)
View Full Code Here

TOP

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

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.