Author: carlos Date: Tue Aug 22 14:05:08 2006 New Revision: 433751 URL: http://svn.apache.org/viewvc?rev=433751&view=rev Log: Added javax.persistence exceptions to keep JDK 1.4 compatibility
Added: maven/shared/trunk/maven-user/persistence-api-exceptions/ (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java (with props) maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java (with props) Modified: maven/shared/trunk/maven-user/maven-user-model/pom.xml maven/shared/trunk/maven-user/pom.xml Modified: maven/shared/trunk/maven-user/maven-user-model/pom.xml URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/maven-user-model/pom.xml?rev=433751&r1=433750&r2=433751&view=diff ============================================================================== --- maven/shared/trunk/maven-user/maven-user-model/pom.xml (original) +++ maven/shared/trunk/maven-user/maven-user-model/pom.xml Tue Aug 22 14:05:08 2006 @@ -20,8 +20,8 @@ <dependencies> <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> + <groupId>${project.groupId}</groupId> + <artifactId>persistence-api-exceptions</artifactId> <version>1.0</version> </dependency> <dependency> Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Aug 22 14:05:08 2006 @@ -0,0 +1 @@ +target Added: maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml Tue Aug 22 14:05:08 2006 @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<project + xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.shared.user</groupId> + <artifactId>persistence-api-exceptions</artifactId> + <version>1.0</version> + <name>Enterprise JavaBeans (EJB) 3.0 exceptions</name> + <description> + The Enterprise JavaBeans architecture is a component architecture for the development and deployment of component-based business applications. + The purpose of Enterprise JavaBeans (EJB) 3.0 is to improve the EJB architecture by reducing its complexity from the developer's point of view. + This package contains only exceptions so it can be built under JDK 1.4. + </description> + <url>http://www.jcp.org/en/jsr/detail?id=220</url> + + <licenses> + <license> + <name>Common Development and Distribution License (CDDL) v1.0</name> + <url>http://www.sun.com/cddl/cddl.html</url> + <distribution>repo</distribution> + </license> + </licenses> + + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.4</source> + <target>1.4</target> + </configuration> + </plugin> + </plugins> + </build> + +</project> Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,73 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + +/** + * Thrown by the persistence provider when [EMAIL PROTECTED] EntityManager#persist(Object) + * EntityManager.persist(Object)} is called and the entity + * already exists. The current transaction, if one is active, + * will be marked for rollback. + * + * @see javax.persistence.EntityManager#persist(Object) + * + * @since Java Persistence 1.0 + */ +public class EntityExistsException extends PersistenceException { + + /** + * Constructs a new <code>EntityExistsException</code> exception + * with <code>null</code> as its detail message. + */ + public EntityExistsException() { + super(); + } + + /** + * Constructs a new <code>EntityExistsException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public EntityExistsException(String message) { + super(message); + } + + /** + * Constructs a new <code>EntityExistsException</code> exception + * with the specified detail message and cause. + * @param message the detail message. + * @param cause the cause. + */ + public EntityExistsException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new <code>EntityExistsException</code> exception + * with the specified cause. + * @param cause the cause. + */ + public EntityExistsException(Throwable cause) { + super(cause); + } +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityExistsException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,57 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + +/** + * Thrown by the persistence provider when an entity reference obtained by + * [EMAIL PROTECTED] EntityManager#getReference EntityManager.getReference(Class,Object)} + * is accessed but the entity does not exist. Also thrown when + * [EMAIL PROTECTED] EntityManager#refresh EntityManager.refresh(Object)} is called + * and the object no longer exists in the database. The + * current transaction, if one is active, will be marked for rollback. + * + * @see javax.persistence.EntityManager#getReference(Class,Object) + * @see javax.persistence.EntityManager#refresh(Object) + * + * @since Java Persistence 1.0 + */ +public class EntityNotFoundException extends PersistenceException { + + /** + * Constructs a new <code>EntityNotFoundException</code> exception + * with <code>null</code> as its detail message. + */ + public EntityNotFoundException() { + super(); + } + + /** + * Constructs a new <code>EntityNotFoundException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public EntityNotFoundException(String message) { + super(message); + } + +}; Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/EntityNotFoundException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,54 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + +/** + * Thrown by the persistence provider when [EMAIL PROTECTED] Query#getSingleResult + * getSingleResult()} is executed on a query + * and there is no result to return. This exception will not cause the current + * transaction, if one is active, to be marked for roll back. + * + * @see javax.persistence.Query#getSingleResult() + * + * @since Java Persistence 1.0 + */ +public class NoResultException extends PersistenceException { + + /** + * Constructs a new <code>NoResultException</code> exception + * with <code>null</code> as its detail message. + */ + public NoResultException() { + super(); + } + + /** + * Constructs a new <code>NoResultException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public NoResultException(String message) { + super(message); + } +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NoResultException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,54 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + +/** + * Thrown by the persistence provider when [EMAIL PROTECTED] Query#getSingleResult + * getSingleResult()} is executed on a query and there is more + * than one result from the query. This exception will not cause + * the current transaction, if one is active, to be marked for roll back. + * + * @see javax.persistence.Query#getSingleResult() + * + * @since Java Persistence 1.0 + */ +public class NonUniqueResultException extends PersistenceException { + + /** + * Constructs a new <code>NonUniqueResultException</code> exception + * with <code>null</code> as its detail message. + */ + public NonUniqueResultException() { + super(); + } + + /** + * Constructs a new <code>NonUniqueResultException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public NonUniqueResultException(String message) { + super(message); + } +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/NonUniqueResultException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,104 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + +/** + * Thrown by the persistence provider when an optimistic locking conflict + * occurs. This exception may be thrown as part of an API call, a flush or at + * commit time. The current transaction, if one is active, will be marked for + * rollback. + * + * @since Java Persistence 1.0 + */ +public class OptimisticLockException extends PersistenceException { + + /** The object that caused the exception */ + Object entity; + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with <code>null</code> as its detail message. + */ + public OptimisticLockException() { + super(); + } + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public OptimisticLockException(String message) { + super(message); + } + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with the specified detail message and cause. + * @param message the detail message. + * @param cause the cause. + */ + public OptimisticLockException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with the specified cause. + * @param cause the cause. + */ + public OptimisticLockException(Throwable cause) { + super(cause); + } + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with the specified entity. + * @param entity the entity. + */ + public OptimisticLockException(Object entity) { + this.entity = entity; + } + + /** + * Constructs a new <code>OptimisticLockException</code> exception + * with the specified detail message, cause, and entity. + * @param message the detail message. + * @param cause the cause. + * @param entity the entity. + */ + public OptimisticLockException(String message, Throwable cause, Object entity) { + super(message, cause); + this.entity = entity; + } + + /** + * Returns the entity that caused this exception. + * @return the entity. + */ + public Object getEntity() { + return this.entity; + } + +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/OptimisticLockException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,72 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; + + +/** + * Thrown by the persistence provider when a problem occurs. + * All instances of <code>PersistenceException</code> except for instances of + * [EMAIL PROTECTED] NoResultException} and [EMAIL PROTECTED] NonUniqueResultException} will cause + * the current transaction, if one is active, to be marked for rollback. + * + * @since Java Persistence 1.0 + */ +public class PersistenceException extends RuntimeException { + + /** + * Constructs a new <code>PersistenceException</code> exception + * with <code>null</code> as its detail message. + */ + public PersistenceException() { + super(); + } + + /** + * Constructs a new <code>PersistenceException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public PersistenceException(String message) { + super(message); + } + + /** + * Constructs a new <code>PersistenceException</code> exception + * with the specified detail message and cause. + * @param message the detail message. + * @param cause the cause. + */ + public PersistenceException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new <code>PersistenceException</code> exception + * with the specified cause. + * @param cause the cause. + */ + public PersistenceException(Throwable cause) { + super(cause); + } +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/PersistenceException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,71 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ +package javax.persistence; +/** + * Thrown by the persistence provider when the + * [EMAIL PROTECTED] EntityTransaction#commit() EntityTransaction.commit()} fails. + * + * @see javax.persistence.EntityTransaction#commit() + * + * @since Java Persistence 1.0 + */ +public class RollbackException extends PersistenceException { + + /** + * Constructs a new <code>RollbackException</code> exception + * with <code>null</code> as its detail message. + */ + public RollbackException() { + super(); + } + + /** + * Constructs a new <code>RollbackException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public RollbackException(String message) { + super(message); + } + + /** + * Constructs a new <code>RollbackException</code> exception + * with the specified detail message and cause. + * @param message the detail message. + * @param cause the cause. + */ + public RollbackException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new <code>RollbackException</code> exception + * with the specified cause. + * @param cause the cause. + */ + public RollbackException(Throwable cause) { + super(cause); + } +}; + + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/RollbackException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java?rev=433751&view=auto ============================================================================== --- maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java (added) +++ maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java Tue Aug 22 14:05:08 2006 @@ -0,0 +1,51 @@ +/* + * The contents of this file are subject to the terms + * of the Common Development and Distribution License + * (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the license at + * https://glassfish.dev.java.net/public/CDDLv1.0.html or + * glassfish/bootstrap/legal/CDDLv1.0.txt. + * See the License for the specific language governing + * permissions and limitations under the License. + * + * When distributing Covered Code, include this CDDL + * Header Notice in each file and include the License file + * at glassfish/bootstrap/legal/CDDLv1.0.txt. + * If applicable, add the following below the CDDL Header, + * with the fields enclosed by brackets [] replaced by + * you own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + */ + +package javax.persistence; + +/** + * Thrown by the persistence provider when a transaction is required but is not + * active. + * + * @since Java Persistence 1.0 + */ +public class TransactionRequiredException extends PersistenceException { + + /** + * Constructs a new <code>TransactionRequiredException</code> exception + * with <code>null</code> as its detail message. + */ + public TransactionRequiredException() { + super(); + } + + /** + * Constructs a new <code>TransactionRequiredException</code> exception + * with the specified detail message. + * @param message the detail message. + */ + public TransactionRequiredException(String message) { + super(message); + } +}; + Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-user/persistence-api-exceptions/src/main/java/javax/persistence/TransactionRequiredException.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/shared/trunk/maven-user/pom.xml URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-user/pom.xml?rev=433751&r1=433750&r2=433751&view=diff ============================================================================== --- maven/shared/trunk/maven-user/pom.xml (original) +++ maven/shared/trunk/maven-user/pom.xml Tue Aug 22 14:05:08 2006 @@ -19,6 +19,7 @@ <description>User management code shared for different apps like Continuum or MRM</description> <modules> + <module>persistence-api-exceptions</module> <module>maven-user-model</module> <module>maven-user-controller</module> <module>maven-user-webapp</module>