Package org.jboss.cache.marshall.data

Examples of org.jboss.cache.marshall.data.Person


      srtl.cache1 = createCache("TestCache");

      srtl.cache2 = createCache("TestCache");
      srtl.addr_ = new Address();
      srtl.addr_.setCity("San Jose");
      srtl.ben_ = new Person();
      srtl.ben_.setName("Ben");
      srtl.ben_.setAddress(srtl.addr_);

      // Pause to give caches time to see each other
      TestingUtil.blockUntilViewsReceived(new CacheSPI[]{srtl.cache1, srtl.cache2}, 60000);
View Full Code Here


   {
      SyncReplTestTL srtl = threadLocal.get();
      CacheSPI<Object, Object> cache1 = srtl.cache1;
      CacheSPI<Object, Object> cache2 = srtl.cache2;
      cache1.put(aop, "person", srtl.ben_);
      Person ben2 = (Person) cache2.get(aop, "person");
      assertNotNull("Person from 2nd cache should not be null ", ben2);
      assertEquals(srtl.ben_.toString(), ben2.toString());
   }
View Full Code Here

      if (useMarshalledValues) resetContextClassLoader();
      if (useMarshalledValues) Thread.currentThread().setContextClassLoader(getFailingClassLoader());
      try
      {
         if (useMarshalledValues) Thread.currentThread().setContextClassLoader(c2);
         @SuppressWarnings("unused")
         Person person = (Person) cache2.get(aop, "person");
      }
      catch (ClassCastException ex)
      {
         // That's ok.
View Full Code Here

      replListener1 = ReplicationListener.getReplicationListener(cache1);
      replListener2 = ReplicationListener.getReplicationListener(cache2);
      addr = new Address();
      addr.setCity("San Jose");
      ben = new Person();
      ben.setName("Ben");
      ben.setAddress(addr);

      // Pause to give caches time to see each other
      TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
View Full Code Here

      replListener2.expect(PutKeyValueCommand.class);
      beginTransaction();
      cache1.put(aop, "person", ben);
      commit();
      replListener2.waitForReplicationToOccur();
      Person ben2 = (Person) cache2.get(aop, "person");
      assertNotNull("Person from 2nd cache should not be null ", ben2);
      assertEquals(ben.toString(), ben2.toString());
   }
View Full Code Here

      log("creating cache2");

      srtl.cache2 = createCache("TestCache");
      srtl.addr_ = new Address();
      srtl.addr_.setCity("San Jose");
      srtl.ben_ = new Person();
      srtl.ben_.setName("Ben");
      srtl.ben_.setAddress(srtl.addr_);

      // Pause to give caches time to see each other
      TestingUtil.blockUntilViewsReceived(new CacheSPI[]{srtl.cache1, srtl.cache2}, 60000);
View Full Code Here

   {
      SyncReplTestTL srtl = threadLocal.get();
      CacheSPI<Object, Object> cache1 = srtl.cache1;
      CacheSPI<Object, Object> cache2 = srtl.cache2;
      cache1.put(aop, "person", srtl.ben_);
      Person ben2 = (Person) cache2.get(aop, "person");
      assertNotNull("Person from 2nd cache should not be null ", ben2);
      assertEquals(srtl.ben_.toString(), ben2.toString());
   }
View Full Code Here

      if (useMarshalledValues) resetContextClassLoader();
      if (useMarshalledValues) Thread.currentThread().setContextClassLoader(getFailingClassLoader());
      try
      {
         if (useMarshalledValues) Thread.currentThread().setContextClassLoader(c2);
         @SuppressWarnings("unused")
         Person person = (Person) cache2.get(aop, "person");
      }
      catch (ClassCastException ex)
      {
         // That's ok.
View Full Code Here

      replListener1 = new ReplicationListener(cache1);
      replListener2 = new ReplicationListener(cache2);
      addr = new Address();
      addr.setCity("San Jose");
      ben = new Person();
      ben.setName("Ben");
      ben.setAddress(addr);

      // Pause to give caches time to see each other
      TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
View Full Code Here

      replListener2.expectAny();
      beginTransaction();
      cache1.put(aop, "person", ben);
      commit();
      replListener2.waitForReplicationToOccur(1000);
      Person ben2 = (Person) cache2.get(aop, "person");
      assertNotNull("Person from 2nd cache should not be null ", ben2);
      assertEquals(ben.toString(), ben2.toString());
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.marshall.data.Person

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.