[infinispan-commits] Infinispan SVN: r2101 - in trunk: tree and 1 other directories.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Tue Jul 27 04:10:55 EDT 2010


Author: galder.zamarreno at jboss.com
Date: 2010-07-27 04:10:54 -0400 (Tue, 27 Jul 2010)
New Revision: 2101

Added:
   trunk/tree/src/test/java/org/infinispan/api/tree/LazyDeserializationTreeCacheTest.java
Modified:
   trunk/core/src/main/java/org/infinispan/marshall/MarshalledValue.java
   trunk/tree/
Log:
[ISPN-552] (Tree facade caches cannot be configured with lazy deserialization) Fixed.

Modified: trunk/core/src/main/java/org/infinispan/marshall/MarshalledValue.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/marshall/MarshalledValue.java	2010-07-27 06:24:31 UTC (rev 2100)
+++ trunk/core/src/main/java/org/infinispan/marshall/MarshalledValue.java	2010-07-27 08:10:54 UTC (rev 2101)
@@ -61,10 +61,7 @@
    public MarshalledValue(Object instance, boolean equalityPreferenceForInstance, StreamingMarshaller marshaller) throws NotSerializableException {
       if (instance == null) throw new NullPointerException("Null values cannot be wrapped as MarshalledValues!");
 
-      if (instance instanceof Serializable)
-         this.instance = instance;
-      else
-         throw new NotSerializableException("Marshalled values can only wrap Objects that are serializable!  Instance of " + instance.getClass() + " won't Serialize.");
+      this.instance = instance;
       this.equalityPreferenceForInstance = equalityPreferenceForInstance;
       this.marshaller = marshaller;
    }


Property changes on: trunk/tree
___________________________________________________________________
Name: svn:ignore
   - target
.settings
eclipse-output
test-output
output
.classpath
.project
temp-testng-customsuite.xml

   + target
.settings
eclipse-output
test-output
output
.classpath
.project
temp-testng-customsuite.xml
*.iml
*.log


Added: trunk/tree/src/test/java/org/infinispan/api/tree/LazyDeserializationTreeCacheTest.java
===================================================================
--- trunk/tree/src/test/java/org/infinispan/api/tree/LazyDeserializationTreeCacheTest.java	                        (rev 0)
+++ trunk/tree/src/test/java/org/infinispan/api/tree/LazyDeserializationTreeCacheTest.java	2010-07-27 08:10:54 UTC (rev 2101)
@@ -0,0 +1,36 @@
+package org.infinispan.api.tree;
+
+import org.infinispan.config.Configuration;
+import org.infinispan.manager.EmbeddedCacheManager;
+import org.infinispan.test.SingleCacheManagerTest;
+import org.infinispan.test.TestingUtil;
+import org.infinispan.test.fwk.TestCacheManagerFactory;
+import org.infinispan.tree.TreeCache;
+import org.infinispan.tree.TreeCacheImpl;
+import org.testng.annotations.Test;
+
+/**
+ * // TODO: Document this
+ *
+ * @author Galder Zamarreño
+ * @since // TODO
+ */
+ at Test(groups = "functional", testName = "api.tree.LazyDeserializationTreeCacheTest")
+public class LazyDeserializationTreeCacheTest extends SingleCacheManagerTest {
+
+   TreeCache cache;
+
+   @Override
+   protected EmbeddedCacheManager createCacheManager() throws Exception {
+      // start a single cache instance
+      Configuration c = getDefaultStandaloneConfig(true);
+      c.setInvocationBatchingEnabled(true);
+      c.setUseLazyDeserialization(true);
+      return TestCacheManagerFactory.createCacheManager(c, true);
+   }
+
+   public void testStartTreeCache() {
+      cache = new TreeCacheImpl(cacheManager.getCache());
+   }
+
+}



More information about the infinispan-commits mailing list