001/* 002 * Copyright (c) 2008, 2009, 2011 Oracle, Inc. All rights reserved. 003 * 004 * This program and the accompanying materials are made available under the 005 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 006 * which accompanies this distribution. The Eclipse Public License is available 007 * at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License 008 * is available at http://www.eclipse.org/org/documents/edl-v10.php. 009 */ 010package javax.persistence; 011 012/** 013 * Thrown by the persistence provider when 014 * {@link EntityTransaction#commit() EntityTransaction.commit()} fails. 015 * 016 * @see javax.persistence.EntityTransaction#commit() 017 * @since Java Persistence 1.0 018 */ 019public class RollbackException extends PersistenceException { 020 /** 021 * Constructs a new <code>RollbackException</code> exception 022 * with <code>null</code> as its detail message. 023 */ 024 public RollbackException() { 025 super(); 026 } 027 028 /** 029 * Constructs a new <code>RollbackException</code> exception 030 * with the specified detail message. 031 * 032 * @param message the detail message. 033 */ 034 public RollbackException(String message) { 035 super(message); 036 } 037 038 /** 039 * Constructs a new <code>RollbackException</code> exception 040 * with the specified detail message and cause. 041 * 042 * @param message the detail message. 043 * @param cause the cause. 044 */ 045 public RollbackException(String message, Throwable cause) { 046 super(message, cause); 047 } 048 049 /** 050 * Constructs a new <code>RollbackException</code> exception 051 * with the specified cause. 052 * 053 * @param cause the cause. 054 */ 055 public RollbackException(Throwable cause) { 056 super(cause); 057 } 058}