Examples of StatelessSessionHome


Examples of org.jboss.test.invokers.interfaces.StatelessSessionHome

      bmp1.setName("burke");
      getLog().debug("bmp1 name: " + bmp1.getName());
      getLog().debug("bmp2 name: " + bmp2.getName());
      assertTrue("bmp1 " + bmp1.getName() + "  == bmp2 " + bmp2.getName(), bmp1.getName().equals(bmp2.getName()));

      StatelessSessionHome shome1 = (StatelessSessionHome)ctx.lookup("StatelessSession");
      StatelessSessionHome shome2 = (StatelessSessionHome)ctx.lookup("CompressionStatelessSession");
      StatelessSession ss1 = shome1.create();
      StatelessSession ss2 = shome2.create();

      ss1.getBMP(1);
      ss2.getBMP(1);
     
   }
View Full Code Here

Examples of org.jboss.test.invokers.interfaces.StatelessSessionHome

      bmp1.setName("burke");
      getLog().debug("bmp1 name: " + bmp1.getName());
      getLog().debug("bmp2 name: " + bmp2.getName());
      assertTrue("bmp1 " + bmp1.getName() + "  == bmp2 " + bmp2.getName(), bmp1.getName().equals(bmp2.getName()));

      StatelessSessionHome shome1 = (StatelessSessionHome)ctx.lookup("StatelessSession");
      StatelessSessionHome shome2 = (StatelessSessionHome)ctx.lookup("CompressionStatelessSession");
      StatelessSession ss1 = shome1.create();
      StatelessSession ss2 = shome2.create();

      ss1.getBMP(1);
      ss2.getBMP(1);
     
   }
View Full Code Here

Examples of org.jboss.test.jrmp.interfaces.StatelessSessionHome

   {
      log.info("+++ testCustomAccess");
      InitialContext jndiContext = new InitialContext();
      log.debug("Lookup StatelessSessionWithGZip");
      Object obj = jndiContext.lookup("StatelessSessionWithGZip");
      StatelessSessionHome home = (StatelessSessionHome)obj;
      log.debug("Found StatelessSessionWithGZip Home");
      StatelessSession bean = home.create();
      log.debug("Created StatelessSessionWithGZip");
      // Test that the Entity bean sees username as its principal
      String echo = bean.echo("jrmp-comp");
      log.debug("bean.echo(jrmp-comp) = " + echo);
      bean.remove();
View Full Code Here

Examples of org.jboss.test.jrmp.interfaces.StatelessSessionHome

   {
      log.info("+++ testAccess");
      InitialContext jndiContext = new InitialContext();
      log.debug("Lookup StatelessSessionWithGZip");
      Object obj = jndiContext.lookup("StatelessSessionWithGZip");
      StatelessSessionHome home = (StatelessSessionHome)obj;
      log.debug("Found StatelessSessionWithGZip Home");
      StatelessSession bean = home.create();
      log.debug("Created StatelessSessionWithGZip");
      // Test that the Entity bean sees username as its principal
      String echo = bean.echo("jrmp");
      log.debug("bean.echo(jrmp) = " + echo);
      bean.remove();
View Full Code Here

Examples of org.jboss.test.jrmp.interfaces.StatelessSessionHome

   public void testAccess() throws Exception
   {
      InitialContext jndiContext = new InitialContext();
      getLog().debug("Lookup StatefulSession");
      Object obj = jndiContext.lookup("StatefulSession");
      StatelessSessionHome home = (StatelessSessionHome)obj;
      getLog().debug("Found StatefulSession Home");
      StatelessSession bean = home.create();
      getLog().debug("Created StatefulSession");
      IString echo = bean.copy("jrmp-dl");
      getLog().debug("bean.copy(jrmp-dl) = " + echo);
      Class clazz = echo.getClass();
      CodeSource cs = clazz.getProtectionDomain().getCodeSource();
View Full Code Here

Examples of org.jboss.test.jrmp.interfaces.StatelessSessionHome

      System.setProperty("javax.net.ssl.trustStorePassword", "unit-tests-client");
      System.setProperty("javax.net.ssl.keyStorePassword", "unit-tests-client");
      InitialContext jndiContext = new InitialContext();
      log.debug("Lookup StatelessSessionWithSSL");
      Object obj = jndiContext.lookup("StatelessSessionWithSSL");
      StatelessSessionHome home = (StatelessSessionHome)obj;
      log.debug("Found StatelessSessionWithSSL Home");
      StatelessSession bean = home.create();
      log.debug("Created StatelessSessionWithSSL");
      // Test that the Entity bean sees username as its principal
      String echo = bean.echo("jrmp");
      log.debug("bean.echo(jrmp) = " + echo);
      bean.remove();
View Full Code Here

Examples of org.jboss.test.jrmp.interfaces.StatelessSessionHome

      System.getProperties().put(RMISSLClientSocketFactory.HANDSHAKE_COMPLETE_LISTENER, this);

      InitialContext jndiContext = new InitialContext();
      log.debug("Lookup StatelessSessionWithSSL");
      Object obj = jndiContext.lookup("StatelessSessionWithSSL");
      StatelessSessionHome home = (StatelessSessionHome)obj;
      log.debug("Found StatelessSessionWithSSL Home");
      StatelessSession bean = home.create();
      log.debug("Created StatelessSessionWithSSL");
      // Test that the Entity bean sees username as its principal
      String echo = bean.echo("jrmp");
      log.debug("bean.echo(jrmp) = " + echo);
      bean.remove();
View Full Code Here

Examples of org.jboss.test.pooled.interfaces.StatelessSessionHome

   InitialContext ctx;

   private StatelessSession getSession() throws Exception
   {
     
      StatelessSessionHome home = (StatelessSessionHome)new InitialContext().lookup("nextgen.StatelessSession");
      return home.create();
   }
View Full Code Here

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

   public void testEJB() throws Exception
   {
      log.debug("+++ testEJB");
      Object obj = getInitialContext().lookup("null.StatelessSession");
      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      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();
         if (t instanceof SecurityException)
         {
            log.debug("Invoking create() was correctly denied by a SecurityException:", e);
         }
         else
         {
            log.debug("Invoking create() failed by an unexpected reason:", e);
            fail("Unexpected exception");
         }
      }
      SecurityClient client = SecurityClientFactory.getSecurityClient();
      client.setSimple(username, password);
      client.login();
      try
      {
         bean = home.create();
         bean.echo("hi");
      }
      catch(Exception e)
      {
         fail(e.getLocalizedMessage());
View Full Code Here

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

   public void testEJBNullSecurityDomain() throws Exception
   {
      log.debug("+++ testEJBNullSecurityDomain");
      Object obj = getInitialContext().lookup("null.StatelessSession");
      obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
      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();
         if (t instanceof SecurityException)
         {
            log.debug("Invoking create() was correctly denied by a SecurityException:", e);
         }
         else
         {
            log.debug("Invoking create() failed by an unexpected reason:", e);
            fail("Unexpected exception");
         }
      }
      SecurityClient client = SecurityClientFactory.getSecurityClient();
      client.setSimple("scott", "echoman");
      client.login();
      try
      {
         bean = home.create();
         bean.echo("hi");
      }
      catch (Exception e)
      {
         fail(e.getLocalizedMessage());
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.