backport from 1.1.x

18761a8c - 6a05270b

GemfireTransactionCommitException should extend Spring's extension
SGF-84
improve handling of GemFire 6.5 TX exceptions
This commit is contained in:
Costin Leau
2012-03-20 06:14:11 +02:00
parent 9d5de9222b
commit 90dd4b8b33
2 changed files with 2 additions and 11 deletions

View File

@@ -16,7 +16,7 @@
package org.springframework.data.gemfire;
import com.gemstone.gemfire.cache.TransactionException;
import org.springframework.transaction.TransactionException;
/**
* Gemfire-specific subclass of {@link org.springframework.transaction.TransactionException}, indicating a transaction failure at commit time.
@@ -25,10 +25,6 @@ import com.gemstone.gemfire.cache.TransactionException;
*/
public class GemfireTransactionCommitException extends TransactionException {
public GemfireTransactionCommitException() {
super();
}
public GemfireTransactionCommitException(String message, Throwable cause) {
super(message, cause);
}
@@ -36,8 +32,4 @@ public class GemfireTransactionCommitException extends TransactionException {
public GemfireTransactionCommitException(String message) {
super(message);
}
public GemfireTransactionCommitException(Throwable cause) {
super(cause);
}
}

View File

@@ -30,7 +30,6 @@ import org.springframework.util.Assert;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheTransactionManager;
import com.gemstone.gemfire.cache.CommitConflictException;
import com.gemstone.gemfire.cache.Region;
/**
@@ -136,7 +135,7 @@ public class GemfireTransactionManager extends AbstractPlatformTransactionManage
} catch (IllegalStateException ex) {
throw new NoTransactionException(
"No transaction associated with the current thread; are there multiple transaction managers ?", ex);
} catch (CommitConflictException ex) {
} catch (TransactionException ex) {
throw new GemfireTransactionCommitException("Unexpected failure on commit of Cache local transaction", ex);
}
}