Package org.apache.isis.runtimes.dflt.runtime.system.transaction

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


            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) {
                context.addVariable("_security-context", ((TagProcessingException) e).getContext(), Scope.ERROR);
View Full Code Here


        if (propertiesList == null) {
            throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, "Could not find properties list (no members[memberType=property]); got %s", objectRepr);
        }

        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");
            }
View Full Code Here

        // has logged in or out in the action
        // processing above.
        final IsisTransactionManager transactionManager = IsisContext.getPersistenceSession().getTransactionManager();
        if (transactionManager.getTransaction().getState().canCommit()) {
            transactionManager.endTransaction();
            transactionManager.startTransaction();
        }
    }

}
View Full Code Here

        // Note - the session will have changed since the earlier call if a user has logged in or out in the action
        // processing above.
        final IsisTransactionManager transactionManager = IsisContext.getPersistenceSession().getTransactionManager();
        if (transactionManager.getTransaction().getState().canCommit()) {
            transactionManager.endTransaction();
            transactionManager.startTransaction();
        }
    }

}
View Full Code Here

            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) {
                context.addVariable("_security-context", ((TagProcessingException) e).getContext(), Scope.ERROR);
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.