Examples of abortTransaction()


Examples of org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.abortTransaction()

            case COMMITTED:
                Assert.fail("Transaction is in state of '" + state + "'");
                break;
            case MUST_ABORT:
            case IN_PROGRESS:
                transactionManager.abortTransaction();
                break;
            default:
                Assert.fail("Unknown transaction state '" + state + "'");
        }
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.abortTransaction()

        } catch (final Throwable e) {
            ErrorCollator error = new ErrorCollator();
            final PersistenceSession checkSession = IsisContext.getPersistenceSession();
            final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
            if (transactionManager.getTransaction() != null && transactionManager.getTransaction().getState().canAbort()) {
                transactionManager.abortTransaction();
                transactionManager.startTransaction();
            }

            final Throwable ex = e instanceof TagProcessingException ? e.getCause() : e;
            if (ex instanceof ForbiddenException) {
View Full Code Here

Examples of org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.abortTransaction()

            case COMMITTED:
                Assert.fail("Transaction is in state of '" + state + "'");
                break;
            case MUST_ABORT:
            case IN_PROGRESS:
                transactionManager.abortTransaction();
                break;
            default:
                Assert.fail("Unknown transaction state '" + state + "'");
        }
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager.abortTransaction()

            prepareErrorDetails(e, context, errorRef, servletPath);

            final PersistenceSession checkSession = IsisContext.getPersistenceSession();
            final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
            if (transactionManager.getTransaction() != null && transactionManager.getTransaction().getState().canAbort()) {
                transactionManager.abortTransaction();
                transactionManager.startTransaction();
            }

            final Throwable ex = e instanceof TagProcessingException ? e.getCause() : e;
            if (ex instanceof ForbiddenException) {
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager.abortTransaction()

        final IsisTransactionManager transactionManager = getResourceContext().getPersistenceSession().getTransactionManager();
        transactionManager.startTransaction();
        try {
            if (!DomainResourceHelper.copyOverProperties(getResourceContext(), objectAdapter, propertiesList)) {
                transactionManager.abortTransaction();
                throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, objectRepr, "Illegal property value");
            }

            final Consent validity = objectAdapter.getSpecification().isValid(objectAdapter);
            if (validity.isVetoed()) {
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager.abortTransaction()

                throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, objectRepr, "Illegal property value");
            }

            final Consent validity = objectAdapter.getSpecification().isValid(objectAdapter);
            if (validity.isVetoed()) {
                transactionManager.abortTransaction();
                throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, objectRepr, validity.getReason());
            }

            transactionManager.endTransaction();
        } finally {
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager.abortTransaction()

            transactionManager.endTransaction();
        } finally {
            // in case an exception got thrown somewhere...
            if (!transactionManager.getTransaction().getState().isComplete()) {
                transactionManager.abortTransaction();
            }
        }

        final DomainResourceHelper helper = new DomainResourceHelper(getResourceContext(), objectAdapter);
        return helper.objectRepresentation();
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransactionManager.abortTransaction()

            final PersistenceSession checkSession = IsisContext.getPersistenceSession();
            final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
            if (transactionManager.getTransaction() != null
                && transactionManager.getTransaction().getState().canAbort()) {
                transactionManager.abortTransaction();
                transactionManager.startTransaction();
            }

            final Throwable ex = e instanceof TagProcessingException ? e.getCause() : e;
            if (ex instanceof ForbiddenException) {
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.abortTransaction()

    conControl.setVoidCallable(1);
    pb.beginTransaction();
    pbControl.setVoidCallable(1);
    pb.delete(entity);
    pbControl.setVoidCallable(1);
    pb.abortTransaction();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);

    pbControl.replay();
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.abortTransaction()

    conControl.setReturnValue(false, 1);
    pb.beginTransaction();
    pbControl.setVoidCallable(1);
    pb.delete(entity);
    pbControl.setVoidCallable(1);
    pb.abortTransaction();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);

    pbControl.replay();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.