*/
@SuppressWarnings("deprecation")
public static DataAccessException convertGemfireAccessException(GemFireException ex) {
if (ex instanceof CacheException) {
if (ex instanceof CacheExistsException) {
return new DataIntegrityViolationException(ex.getMessage(), ex);
}
if (ex instanceof CommitConflictException) {
return new DataIntegrityViolationException(ex.getMessage(), ex);
}
if (ex instanceof CommitIncompleteException) {
return new DataIntegrityViolationException(ex.getMessage(), ex);
}
if (ex instanceof EntryExistsException) {
return new DuplicateKeyException(ex.getMessage(), ex);
}
if (ex instanceof EntryNotFoundException) {
return new DataRetrievalFailureException(ex.getMessage(), ex);
}
if (ex instanceof RegionExistsException) {
return new DataIntegrityViolationException(ex.getMessage(), ex);
}
}
if (ex instanceof CacheRuntimeException) {
if (ex instanceof CacheXmlException) {
return new GemfireSystemException(ex);