Package org.jboss.test.iiop.interfaces

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


   // Public --------------------------------------------------------

   public void test_getString()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      String s = session.getString();
      assertEquals(Util.STRING, s);
      //----------------------------------------------------------------------
      session.remove();
View Full Code Here


   }

   public void test_PrimitiveTypes()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      String s;
      s = session.testPrimitiveTypes(false,
                                     'A',
                                     Byte.MIN_VALUE,
View Full Code Here

   }

   public void test_String()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      String original = "0123456789";
      String echoedBack = session.testString(original);
      assertEquals(Util.echo(original), echoedBack);
      //----------------------------------------------------------------------
View Full Code Here

   }

   public void test_StatelessSession()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      StatelessSession session2 =
         session.testStatelessSession("the quick brown fox", session);
      String s = session2.getString();
      assertEquals(Util.STRING, s);
View Full Code Here

   }
  
   public void test_Remote()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      Remote r = session.testRemote("jumps over the lazy dog", session);
      StatelessSession session2 =
         (StatelessSession)PortableRemoteObject.narrow(r,
                                                       StatelessSession.class);
View Full Code Here

   }
  
   public void test_Serializable()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      Foo original = new Foo(7, "foo test");
      Foo echoedBack = session.testSerializable(original);
      assertEquals(Util.echoFoo(original), echoedBack);
      //----------------------------------------------------------------------
View Full Code Here

   }
  
   public void test_intArray()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      int[] original= new int[10];
      for (int i = 0; i < original.length; i++)
         original[i] = 100 + i;
      int[] echoedBack = session.testIntArray(original);
View Full Code Here

   }
  
   public void test_valueArray()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      Foo[] original = new Foo[4];
      for (int i = 0; i < original.length; i++)
         original[i] = new Foo(100 + i, "foo array test");
      Foo[] echoedBack = session.testValueArray(original);
View Full Code Here

   }
  
   public void test_exception()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      assertEquals("#0", session.testException(0));
      assertEquals("#1", session.testException(1));
      assertEquals("#2", session.testException(2));
      try
View Full Code Here

   }
  
   public void test_FooValueToObject()
      throws Exception
   {
      StatelessSessionHome home =
         (StatelessSessionHome)PortableRemoteObject.narrow(
                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      Foo original = new Foo(9999, "foo test");
      java.lang.Object echoedBack = session.fooValueToObject(original);
      assertEquals(Util.echoFoo(original), echoedBack);
      //----------------------------------------------------------------------
View Full Code Here

TOP

Related Classes of org.jboss.test.iiop.interfaces.StatelessSessionHome

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.