public class CommitException extends Exception
CDOUserTransaction.commit()
in case of commit problems such as commit conflicts.
This class is the root of an exception hierarchy that allows to determine and handle specific causes of commit problems:
CDOTransaction transaction = session.openTransaction(); for (;;) { transaction.getViewLock().lock(); try { CDOResource resource = transaction.getResource("/stock/resource1"); // Modify the model here... transaction.commit(); break; } catch (ConcurrentAccessException ex) { transaction.rollback(); } catch (CommitException ex) { throw ex.wrap(); } finally { transaction.getViewLock().unlock(); } }Instances of this class indicate low-level technical problems such as database or network issues.
Constructor and Description |
---|
CommitException() |
CommitException(String message) |
CommitException(String message,
Throwable cause) |
CommitException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLocal() |
TransactionException |
wrap() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CommitException()
public CommitException(String message)
public CommitException(Throwable cause)
public boolean isLocal()
public TransactionException wrap()
Copyright (c) 2014 Eike Stepper (Berlin, Germany) 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