Package org.jboss.test.security.interfaces

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


      client.setSimple(username, password);
      client.login();
      try
      {
         bean = home.create();
         bean.echo("hi");
      }
      catch(Exception e)
      {
         fail(e.getLocalizedMessage());
      }
View Full Code Here


      client.setSimple("scott", "echoman");
      client.login();
      try
      {
         bean = home.create();
         bean.echo("hi");
      }
      catch (Exception e)
      {
         fail(e.getLocalizedMessage());
      }
View Full Code Here

      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

      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"));
      bean.remove();
      logout();
   }
View Full Code Here

            Class[] ifaces = obj.getClass().getInterfaces();
            StatelessSessionHome home = (StatelessSessionHome) obj;
            log.debug("Found StatelessSessionHome");
            StatelessSession bean = home.create();
            log.debug("Created StatelessSession");
            log.debug("Bean.echo('Hello') -> "+bean.echo("Hello"));
        }
        finally
        {
            if( lc != null && loggedIn )
                lc.logout();
View Full Code Here

      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"));

      try
      {
         // This should not be allowed
         bean.noop();
View Full Code Here

      log.debug("Created spec.UnsecureStatelessSession2");

      try
      {
         // This should fail because echo calls getCallerPrincipal()
         bean.echo("Hello from nobody?");
         fail("Was able to call StatelessSession.echo");
      }
      catch (RemoteException e)
      {
         log.debug("echo failed as expected");
View Full Code Here

      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(username);
      log.debug("bean.echo(username) = " + echo);
      assertTrue("username == echo", echo.equals(username));
      bean.remove();
   }
View Full Code Here

      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"));

      try
      {
         // This should not be allowed
         bean.noop();
View Full Code Here

      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      StatelessSessionHome home = (StatelessSessionHome) obj;
      log.debug("Found StatelessSessionInDomain home");
      StatelessSession bean = home.create();
      log.debug("Created spec.StatelessSessionInDomain");
      log.debug("Bean.echo('testDomainMethodAccess') -> " + bean.echo("testDomainMethodAccess"));

      try
      {
         // This should not be allowed
         bean.excluded();
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.