Package org.jboss.test.security.interfaces

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


      login();
      Object obj = getInitialContext().lookup("spec.StatelessSession");
      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      StatelessSessionHome home = (StatelessSessionHome) obj;
      log.debug("Found StatelessSessionHome");
      StatelessSession bean = home.create();
      log.debug("Created spec.StatelessSession");
      Handle h = bean.getHandle();
      log.debug("Obtained handle: " + h);
      bean = (StatelessSession) h.getEJBObject();
      log.debug("Obtained bean from handle: " + bean);
View Full Code Here


               lc.login();
               Object obj = ctx.lookup("spec.StatelessSession");
               obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
               StatelessSessionHome home = (StatelessSessionHome) obj;
               log.debug("Found StatelessSessionHome");
               StatelessSession bean = home.create();
               log.debug("Created spec.StatelessSession");
               log.debug("Bean.echo('Hello') -> " + bean.echo("Hello"));
               bean.remove();
               log.debug("Removed bean");
               lc.logout();
View Full Code Here

        String echo = null;
        try
        {
            InitialContext ctx = new InitialContext();
            StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/Session");
            StatelessSession bean = home.create();
            echo = bean.echo(echoArg);
        }
        catch(Exception e)
        {
            log.debug("StatelessSession.echo failed", e);
View Full Code Here

      StatelessSessionHome home = (StatelessSessionHome) obj;
      log.debug("Found Unsecure StatelessSessionHome");
      StatelessSession bean = null;
      try
      {
         bean = home.create();
         log.debug("Created spec.UnsecureStatelessSession2");
         bean.echo("Hello from nobody?")
         fail("Should not be allowed");
      }
      catch(RemoteException re)
View Full Code Here

      login();
      obj = getInitialContext().lookup("DeploymentLevelRoleMappingBean");
      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      home = (StatelessSessionHome) obj;
      log.debug("Found spec.StatelessSession2");
      bean = home.create();
      log.debug("Created spec.StatelessSession2");
      // Test that the Entity bean sees username as its principal
      String echo = bean.echo("jduke");
      log.debug("bean.echo(username) = "+echo);
      assertTrue("username == echo", echo.equals("jduke"));
View Full Code Here

      String echo = null;
      try
      {
         InitialContext ctx = new InitialContext();
         StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("java:comp/env/ejb/Session");
         StatelessSession bean = home.create();
         echo = bean.echo(echoArg);
      }
      catch(Exception e)
      {
         log.debug("failed", e);
View Full Code Here

      try
      {
         ctx = new InitialContext();
         StatelessSessionHome home = (StatelessSessionHome)
            ctx.lookup("java:comp/env/ejb/StatelessSession");
         StatelessSession bean = home.create();
         bean.echo("validateCallerContext");
         validatePolicyContextSubject("post stateless", callerPrincipals);
         validateSecurityAssociationSubject("post stateless", callerPrincipals);

         StatefulSessionHome home2 = (StatefulSessionHome)
View Full Code Here

      login("srp-test", username, password);
      Object obj = getInitialContext().lookup("srp-jce.StatelessSession");
      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      StatelessSessionHome home = (StatelessSessionHome) obj;
      log.debug("Found StatelessSessionHome");
      StatelessSession bean = home.create();
      log.debug("Created srp-jce.StatelessSession");
      try
      {
         log.debug("Bean.echo('Hello') -> "+bean.echo("Hello"));
      }
View Full Code Here

            log.info("waiting for notification");
            wait(1000);
         }
         semaphore = false;
         log.debug("Notified, Found StatelessSessionHome");
         StatelessSession bean = home.create();
         log.debug("Created srp.StatelessSession");
         log.debug("Bean.echo('Hello') -> "+bean.echo("Hello"));
         notifyAll();
         log.debug("Notified all, enter wait#2");
         while( semaphore == false )
View Full Code Here

      StatelessSessionHome home = (StatelessSessionHome) obj;
      log.debug("Found null.StatelessSession Home");
      StatelessSession bean = null;
      try
      {
         bean = home.create();
         fail("Invoking create() should fail");
      }
      catch (Exception e)
      {
         Throwable t = e.getCause();
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.