FileDocCategorySizeDatePackage
ExceptionFactory.javaAPI DocGlassfish v2 API3447Tue May 22 16:54:24 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.base

ExceptionFactory

public class ExceptionFactory extends Object

Fields Summary
Constructors Summary
public ExceptionFactory()

    
Methods Summary
public javax.transaction.SystemExceptioninvalidStateException(int state)

        return newSystemException("Cannot complete operation, invalid state: " + state);
    
public javax.transaction.SystemExceptionnewSystemException(java.lang.String str)

        return new SystemException(str);
    
public javax.transaction.SystemExceptionnewSystemException(java.lang.Exception ex)

        return new SystemException("Real nested exception: " + stackTraceString(ex));
    
public javax.transaction.RollbackExceptionrollbackException(java.sql.SQLException sqlEx)

        return new RollbackException(sqlEx.toString());
    
protected java.lang.StringstackTraceString(java.lang.Exception ex)

        StringWriter swriter = new StringWriter();
        PrintWriter writer = new PrintWriter(swriter, true);
        ex.printStackTrace(writer);
        writer.close();
        return swriter.toString();
    
public javax.transaction.SystemExceptiontxActiveException()

        return newSystemException("Transaction is already active");
    
public javax.transaction.SystemExceptiontxMarkedForRollbackException()

        return newSystemException("Transaction marked for rollback");
    
public javax.transaction.SystemExceptiontxNotActiveException()

        return newSystemException("No transaction is active");