if [[ -z ${JAVA_HOME} ]]; then
# Find the actual location of the Java launcher:
- java_launcher=`which java`
+ java_launcher=`command -v java`
java_launcher=`readlink -f "${java_launcher}"`
# Compute the Java home from the location of the Java launcher:
* @param store Identifier of the store, where commit should occur.
* @return Result of the Commit, containing success information or list of
* encountered errors, if commit was not successful. The Future
- * blocks until {@link TransactionStatus#COMMITED} or
- * {@link TransactionStatus#FAILED} is reached.
+ * blocks until {@link TransactionStatus#COMMITED} is reached.
+ * Future will fail with {@link TransactionCommitFailedException}
+ * if Commit of this transaction failed.
+ *
* @throws IllegalStateException if the transaction is not {@link TransactionStatus#NEW}
*/
public ListenableFuture<RpcResult<TransactionStatus>> commit();
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.common.api.data;
+
+/**
+ *
+ * Failed commit of asynchronous transaction
+ *
+ * This exception is raised and returned when transaction commit
+ * failed.
+ *
+ */
+public class TransactionCommitFailedException extends Exception {
+
+ private static final long serialVersionUID = -6138306275373237068L;
+
+ protected TransactionCommitFailedException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+ public TransactionCommitFailedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TransactionCommitFailedException(final String message) {
+ super(message);
+ }
+
+}