ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [02/38] incubator-ignite git commit: ignite-615 ignite-616 Fix
Date Wed, 01 Apr 2015 20:27:05 GMT
ignite-615
ignite-616 Fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d19e6c66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d19e6c66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d19e6c66

Branch: refs/heads/ignite-645
Commit: d19e6c66197ae3afbb1667c19952a86b8868e991
Parents: 3b03646
Author: avinogradov <avinogradov@gridgain.com>
Authored: Fri Mar 27 16:22:28 2015 +0300
Committer: avinogradov <avinogradov@gridgain.com>
Committed: Fri Mar 27 16:22:28 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java  | 9 +++++++--
 .../cache/store/hibernate/CacheHibernateBlobStore.java      | 9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d19e6c66/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
index 0bb3f1f..6852260 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
@@ -23,6 +23,8 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
@@ -111,6 +113,9 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
     /** Connection attribute name. */
     private static final String ATTR_CONN = "JDBC_STORE_CONNECTION";
 
+    /** Marshaller. */
+    private static final Marshaller marsh = new JdkMarshaller();
+
     /** Connection URL. */
     private String connUrl = DFLT_CONN_URL;
 
@@ -560,7 +565,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
      * @throws IgniteCheckedException If failed to convert.
      */
     protected byte[] toBytes(Object obj) throws IgniteCheckedException {
-        return ignite.configuration().getMarshaller().marshal(obj);
+        return marsh.marshal(obj);
     }
 
     /**
@@ -575,7 +580,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
         if (bytes == null || bytes.length == 0)
             return null;
 
-        return ignite.configuration().getMarshaller().unmarshal(bytes, getClass().getClassLoader());
+        return marsh.unmarshal(bytes, getClass().getClassLoader());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d19e6c66/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
index cf49450..77093b5 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStore.java
@@ -23,6 +23,8 @@ import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.Transaction;
 import org.hibernate.*;
@@ -165,6 +167,9 @@ public class CacheHibernateBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
     private static final String MAPPING_RESOURCE =
             "org/apache/ignite/cache/store/hibernate/CacheHibernateBlobStoreEntry.hbm.xml";
 
+    /** Marshaller. */
+    private static final Marshaller marsh = new JdkMarshaller();
+
     /** Init guard. */
     @GridToStringExclude
     private final AtomicBoolean initGuard = new AtomicBoolean();
@@ -569,7 +574,7 @@ public class CacheHibernateBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
      * @throws IgniteCheckedException If failed to convert.
      */
     protected byte[] toBytes(Object obj) throws IgniteCheckedException {
-        return ignite.configuration().getMarshaller().marshal(obj);
+        return marsh.marshal(obj);
     }
 
     /**
@@ -584,7 +589,7 @@ public class CacheHibernateBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
         if (bytes == null || bytes.length == 0)
             return null;
 
-        return ignite.configuration().getMarshaller().unmarshal(bytes, getClass().getClassLoader());
+        return marsh.unmarshal(bytes, getClass().getClassLoader());
     }
 
     /**


Mime
View raw message