Bug 6343 - Incorrect handling of configuration failures in SAL netconf connector
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / sal / tx / WriteCandidateRunningTx.java
index a693e8c59c3db5a07fc0538a675e72f550582b86..40a43c1cbe6eb61e1b2873e87cb3dc7117520566 100644 (file)
@@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
  *     <li>Running datastore is locked as the first thing and this lock has to succeed</li>
  * </ul>
  */
+//TODO replace custom RPCs future callbacks with NetconfRpcFutureCallback
 public class WriteCandidateRunningTx extends WriteCandidateTx {
 
     private static final Logger LOG  = LoggerFactory.getLogger(WriteCandidateRunningTx.class);
@@ -59,10 +60,9 @@ public class WriteCandidateRunningTx extends WriteCandidateTx {
             @Override
             public void onFailure(Throwable t) {
                 LOG.warn("{}: Failed to lock running. Failed to initialize transaction", id, t);
-                throw new RuntimeException(id + ": Failed to lock running. Failed to initialize transaction", t);
             }
         };
-        netOps.lockRunning(lockRunningCallback);
+        resultsFutures.add(netOps.lockRunning(lockRunningCallback));
     }
 
     /**