Package org.jboss.test.iiop.interfaces

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


         (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);
      //----------------------------------------------------------------------
      session.remove();
   }
View Full Code Here


                    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);
      assertEquals(original.length, echoedBack.length);
      for (int i = 0; i < echoedBack.length; i++)
         assertEquals(Util.echoFoo(original[i]), echoedBack[i]);
      //----------------------------------------------------------------------
View Full Code Here

         (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);
      //----------------------------------------------------------------------
      session.remove();
   }
View Full Code Here

                    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 vector test");
      java.util.Vector v = session.valueArrayToVector(original);
      java.lang.Object[] echoedBack = v.toArray();
      assertEquals(original.length, echoedBack.length);
      for (int i = 0; i < echoedBack.length; i++)
         assertEquals(Util.echoFoo(original[i]), echoedBack[i]);
View Full Code Here

                    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 vector test");
      java.util.Vector v = session.valueArrayToVector(original);
      Foo[] echoedBack = session.vectorToValueArray(v);
      assertEquals(original.length, echoedBack.length);
      for (int i = 0; i < echoedBack.length; i++)
         assertEquals(Util.echoFoo(Util.echoFoo(original[i])),
View Full Code Here

      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      java.util.Collection original = new java.util.ArrayList();
      int n = 10;
      for (int i = 0; i < n; i++)
         original.add(new Foo(100 + i, "foo collection test"));
      java.util.Collection echoedBack =
         session.testReferenceSharingWithinCollection(original);
      assertEquals(2 * n, echoedBack.size());
      java.util.ArrayList originalList = (java.util.ArrayList)original;
      java.util.ArrayList echoedList = (java.util.ArrayList)echoedBack;
View Full Code Here

                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      Foo[] original = new Foo[256];
      for (int i = 0; i < original.length; i++)
         original[i] = new Foo(100 + i, "foo vector test");
      java.util.Vector v = session.valueArrayToVector(original);
      Foo[] echoedBack = session.vectorToValueArray(v);
      assertEquals(original.length, echoedBack.length);
      for (int i = 0; i < echoedBack.length; i++)
         assertEquals(Util.echoFoo(Util.echoFoo(original[i])),
View Full Code Here

      return s + " (echoed back)";
   }
  
   public static Foo echoFoo(Foo f)
   {
      Foo newFoo = new Foo(f.i, f.s);
      newFoo.i++;
      newFoo.s += " <";
      return newFoo;
   }
View Full Code Here

      return v;
   }
  
   public Foo[] vectorToValueArray(java.util.Vector v)
   {
      Foo a[] = new Foo[v.size()];
     
      for (int i = 0; i < a.length; i++)
         a[i] = Util.echoFoo((Foo)v.elementAt(i));
      return a;
   }
View Full Code Here

TOP

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

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.