Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.TransactionNotActiveException


     */
    public void commit()
    {
        if (!isActive())
        {
            throw new TransactionNotActiveException();
        }

        // JDO 2.0 section 13.4.5 rollbackOnly functionality
        // It isn't clear from the spec if we are expected to do the rollback here.
        // The spec simply says that we throw an exception. This is assumed as meaning that the users code will catch
View Full Code Here


     */
    public void rollback()
    {
        if (!isActive())
        {
            throw new TransactionNotActiveException();
        }
        long startTime = System.currentTimeMillis();

        try
        {
View Full Code Here

     */
    protected void assertActiveTransaction()
    {
        if (!tx.isActive())
        {
            throw new TransactionNotActiveException();
        }
    }
View Full Code Here

            throw new NucleusUserException(LOCALISER.msg("021013")).setFatal();
        }
        if (!ec.getTransaction().isActive() && !ec.getTransaction().getNontransactionalWrite())
        {
            // tx not active and not allowing non-tx write
            throw new TransactionNotActiveException();
        }

        // Check for specification of any illegal attributes
        if (result != null)
        {
View Full Code Here

     */
    public void commit()
    {
        if (!isActive())
        {
            throw new TransactionNotActiveException();
        }

        // JDO 2.0 section 13.4.5 rollbackOnly functionality
        // It isn't clear from the spec if we are expected to do the rollback here.
        // The spec simply says that we throw an exception. This is assumed as meaning that the users code will catch
View Full Code Here

     */
    public void rollback()
    {
        if (!isActive())
        {
            throw new TransactionNotActiveException();
        }
        long startTime = System.currentTimeMillis();
        try
        {
            boolean canComplete = true; //whether the transaction can be completed
View Full Code Here

            throw new NucleusUserException(LOCALISER.msg("021013")).setFatal();
        }
        if (!om.getTransaction().isActive() && !om.getTransaction().getNontransactionalWrite())
        {
            // tx not active and not allowing non-tx write
            throw new TransactionNotActiveException();
        }

        // Check for specification of any illegal attributes
        if (result != null)
        {
View Full Code Here

     */
    protected void assertActiveTransaction()
    {
        if (!tx.isActive())
        {
            throw new TransactionNotActiveException();
        }
    }
View Full Code Here

     */
    protected void assertWritable()
    {
        if (!getTransaction().isActive() && !getTransaction().getNontransactionalWrite())
        {
            throw new TransactionNotActiveException();
        }
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.TransactionNotActiveException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.