ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/27] incubator-ignite git commit: # fix for jta issue
Date Mon, 22 Jun 2015 13:19:15 GMT
# fix for jta issue


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

Branch: refs/heads/ignite-gg-9795
Commit: 20ac4b80ce90422268e90e9ef3cd9a84cbcfac2d
Parents: 4d9868a
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Jun 19 21:27:35 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Jun 19 21:27:35 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java  |  1 +
 .../processors/cache/jta/GridCacheXAResource.java | 18 +++++++++---------
 .../processors/cache/GridCacheJtaSelfTest.java    |  2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20ac4b80/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 3df45cb..ad4cf50 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -771,6 +771,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         }
                     }
                 }
+
                 if (skipped > 10)
                     fut.cleanUp();
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20ac4b80/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
index 505f558..442cdde 100644
--- a/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
+++ b/modules/jta/src/main/java/org/apache/ignite/internal/processors/cache/jta/GridCacheXAResource.java
@@ -209,7 +209,14 @@ public final class GridCacheXAResource implements XAResource {
 
     /** {@inheritDoc} */
     @Override public int getTransactionTimeout() {
-        return (int)cacheTx.timeout();
+        return (int)(cacheTx.timeout() / 1000);
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean setTransactionTimeout(int i) {
+        cacheTx.timeout(i * 1000);
+
+        return true;
     }
 
     /** {@inheritDoc} */
@@ -217,7 +224,7 @@ public final class GridCacheXAResource implements XAResource {
         if (xar == this)
             return true;
 
-        if  (!(xar instanceof GridCacheXAResource))
+        if (!(xar instanceof GridCacheXAResource))
             return false;
 
         GridCacheXAResource other = (GridCacheXAResource)xar;
@@ -225,13 +232,6 @@ public final class GridCacheXAResource implements XAResource {
         return cctx == other.cctx;
     }
 
-    /** {@inheritDoc} */
-    @Override public boolean setTransactionTimeout(int i) {
-        cacheTx.timeout(i);
-
-        return true;
-    }
-
     /**
      *
      * @return {@code true} if jta was already committed or rolled back.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/20ac4b80/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
index cb7b4d6..b299f8d 100644
--- a/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
+++ b/modules/jta/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheJtaSelfTest.java
@@ -152,7 +152,7 @@ public class GridCacheJtaSelfTest extends GridCacheAbstractSelfTest {
     @SuppressWarnings("ConstantConditions")
     public void testJtaTwoCaches() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-591");
-        
+
         UserTransaction jtaTx = jotm.getUserTransaction();
 
         IgniteEx ignite = grid(0);


Mime
View raw message