Fix bug that true is always returned even in failure cases

Additionally, remove catch block handling TransactionException, which
doesn't have to be caught in user side any more.

Change-Id: I359b50dbe0e1074a2bc4c8850459cb4463669aa8
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
index c332ada5..a38550e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
@@ -59,7 +59,6 @@
 import org.onosproject.store.service.Serializer;
 import org.onosproject.store.service.StorageService;
 import org.onosproject.store.service.TransactionContext;
-import org.onosproject.store.service.TransactionException;
 import org.onosproject.store.service.TransactionalMap;
 import org.onosproject.store.service.Versioned;
 
@@ -294,7 +293,7 @@
             intentAllocs.put(allocations.intentId(), allocations);
             allocations.links().forEach(link -> allocateLinkResource(tx, link, allocations));
             tx.commit();
-        } catch (TransactionException | ResourceAllocationException e) {
+        } catch (ResourceAllocationException e) {
             log.error("Exception thrown, rolling back", e);
             tx.abort();
         } catch (Exception e) {
@@ -407,12 +406,8 @@
                     after.remove(allocations);
                     linkAllocs.replace(linkId, before, after);
                 });
-                tx.commit();
-                success = true;
-            } catch (TransactionException e) {
-                log.debug("Transaction failed, retrying", e);
-                tx.abort();
-            } catch (Exception e) {
+                success = tx.commit();
+            }  catch (Exception e) {
                 log.error("Exception thrown during releaseResource {}", allocations, e);
                 tx.abort();
                 throw e;