Package org.jboss.cache.aop.test

Examples of org.jboss.cache.aop.test.NonSerializableObject


   public void testNonSeriazable1() throws Exception
   {
      log_.info("testNonSerializable1() ....");
      // First the flag is set to false
      NonSerializableObject nso = new NonSerializableObject();
      nso.setId("2");
      try {
         cache_.putObject("/test", nso);
         fail("should fail becuase vo is not Serializable");
      }
      catch (RuntimeException e) {
      }

      // Then we set the flag
      cache_.setMarshallNonSerializable(true);
      cache1_.setMarshallNonSerializable(true);
      cache_.putObject("/test", nso);
      NonSerializableObject nso1 = (NonSerializableObject)cache1_.getObject("/test");
      assertNotNull("nso on remote cache should not be null", nso1);
      assertEquals("VO should be the same", nso, nso1);

   }
View Full Code Here


   public void testNonSeriazable2() throws Exception
   {
      log_.info("testNonSerializable2() ....");
      // First the flag is set to false
      NonSerializableObject nso = new NonSerializableObject();
      nso.setId("2");

      // Then we set the flag
      cache_.setMarshallNonSerializable(true);
      cache1_.setMarshallNonSerializable(true);
      cache_.putObject("/test", nso);
      NonSerializableObject nso1 = (NonSerializableObject)cache1_.getObject("/test");
      assertNotNull("nso on remote cache should not be null", nso1);
      assertEquals("VO should be the same", nso, nso1);

      nso1 = new NonSerializableObject();
      nso1.setId("4");
      cache1_.putObject("/test", nso1);
      nso = (NonSerializableObject)cache_.getObject("/test");
      assertNotNull("nso on remote cache should not be null", nso);
      assertEquals("VO should be the same", nso, nso1);
View Full Code Here

TOP

Related Classes of org.jboss.cache.aop.test.NonSerializableObject

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.