Package org.jboss.as.controller

Examples of org.jboss.as.controller.ControllerTransactionContext


            final OperationHandler operationHandler, final ResultHandler resultHandler,
            final PathAddress address, final OperationControllerContext operationControllerContext) throws OperationFailedException {

        final OperationResult result;

        ControllerTransactionContext transaction = operationControllerContext.getControllerTransactionContext();
        if (transaction == null) {
            result = super.doExecute(operationHandlerContext, operation, operationHandler, resultHandler, address, operationControllerContext);
        } else {

            try {
                ModelNode opNode = operation.getOperation();

                result = operationHandler.execute(operationHandlerContext, opNode, resultHandler);
                ControllerResource txResource = getControllerResource(operationHandlerContext, opNode, operationHandler, resultHandler,
                        address, operationControllerContext);
                if (txResource != null) {
                    transaction.registerResource(txResource);
                }
                return result;
            } catch (OperationFailedException e) {
                transaction.setRollbackOnly();
                throw e;
            }
        }

        if (operationHandlerContext instanceof RuntimeOperationContextImpl) {
View Full Code Here


            return EXECUTE_TRANSACTIONAL_SYNCHRONOUS_RESPONSE;
        }

        @Override
        protected void sendResponse(final OutputStream outputStream) throws IOException {
            ControllerTransactionContext tx = getTransaction();
            Operation operation = builder.build();
            ModelNode result = transactionalModelController.execute(operation, tx);
            outputStream.write(ModelControllerClientProtocol.PARAM_OPERATION);
            result.writeExternal(outputStream);
        }
View Full Code Here

            final CountDownLatch completeLatch = new CountDownLatch(1);
            final IOExceptionHolder exceptionHolder = new IOExceptionHolder();
            final FailureHolder failureHolder = new FailureHolder();
            final AtomicInteger status = new AtomicInteger(0);

            ControllerTransactionContext tx = getTransaction();
            Operation operation = builder.build();
            OperationResult result = transactionalModelController.execute(operation, new ResultHandler() {
                @Override
                public void handleResultFragment(String[] location, ModelNode fragment) {
                    try {
View Full Code Here

    @Override
    protected OperationResult doExecute(final OperationContext operationHandlerContext, final Operation operation,
            final OperationHandler operationHandler, final ResultHandler resultHandler,
            final PathAddress address, final OperationControllerContext operationControllerContext) throws OperationFailedException {

        ControllerTransactionContext transaction = operationControllerContext.getControllerTransactionContext();
        if (transaction == null) {
            return super.doExecute(operationHandlerContext, operation, operationHandler, resultHandler, address, operationControllerContext);
        }

        try {
            ModelNode opNode = operation.getOperation();
            final OperationResult result = operationHandler.execute(operationHandlerContext, opNode, resultHandler);
            ControllerResource txResource = getControllerResource(operationHandlerContext, opNode, operationHandler, resultHandler,
                                                                  address, operationControllerContext);
            if (txResource != null) {
                transaction.registerResource(txResource);
            }
            return result;
        } catch (OperationFailedException e) {
            transaction.setRollbackOnly();
            throw e;
        }
    }
View Full Code Here

     *
     * {@inheritDoc}
     */
    @Override
    public ModelNode execute(final Operation operation) {
        final ControllerTransactionContext transaction = null;
        // Use the superclass method to avoid treating this as a "executeOnDomain" call
        return super.execute(operation, transaction);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.ControllerTransactionContext

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.