Package org.jboss.jca.core.api.connectionmanager.ccm

Examples of org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager



        @Override
        public void setup(final Map<String, Object> properties) {
            try {
                final CachedConnectionManager connectionManager = cachedConnectionManager.getOptionalValue();
                if (connectionManager != null) {
                    connectionManager.pushMetaAwareObject(this, unsharable);
                }
            } catch (ResourceException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here


        }

        @Override
        public void teardown(final Map<String, Object> properties) {
            try {
                final CachedConnectionManager connectionManager = cachedConnectionManager.getOptionalValue();
                if (connectionManager != null) {
                    connectionManager.popMetaAwareObject(unsharable);
                }
            } catch (ResourceException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

        if (context.isNormalServer()) {
            context.addStep(new OperationStepHandler() {

                @Override
                public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                    CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(false).getService(ConnectorServices.CCM_SERVICE).getValue();
                    int number = ccm.getNumberOfConnections();
                    ModelNode result = new ModelNode();
                    result.add(number);

                    context.getResult().set(result);
                    context.stepCompleted();
View Full Code Here

        if (context.isNormalServer()) {
            context.addStep(new OperationStepHandler() {

                @Override
                public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                    CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(false).getService(ConnectorServices.CCM_SERVICE).getValue();
                    Map<String, String> map= ccm.listConnections();
                    ModelNode result = new ModelNode();
                    for (Map.Entry<String, String> entry : map.entrySet()) {
                        result.add(entry.getKey(), entry.getValue());
                    }
View Full Code Here

    }

    @Override
    protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<JcaSubsystemConfiguration> jcaSubsystemConfigurationHandbackHolder) throws OperationFailedException {

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(true).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(resolvedValue.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(resolvedValue.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.IGNORE_UNKNOWN_CONNECTIONS.getAttribute().getName())) {
            ccm.setIgnoreUnknownConnections(resolvedValue.asBoolean());
        }


        return false;
View Full Code Here

    }

    @Override
    protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, JcaSubsystemConfiguration handback) throws OperationFailedException {

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(true).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(valueToRestore.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(valueToRestore.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.IGNORE_UNKNOWN_CONNECTIONS.getAttribute().getName())) {
            ccm.setIgnoreUnknownConnections(valueToRestore.asBoolean());
        }

    }
View Full Code Here

    }

    @Override
    protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, JcaSubsystemConfiguration handback) throws OperationFailedException {

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(true).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(valueToRestore.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(valueToRestore.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.IGNORE_UNKNOWN_CONNECTIONS.getAttribute().getName())) {
            ccm.setIgnoreUnknownConnections(valueToRestore.asBoolean());
        }

    }
View Full Code Here

    @Override
    protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<JcaSubsystemConfiguration> jcaSubsystemConfigurationHandbackHolder) throws OperationFailedException {
        JcaSubsystemConfiguration config = (JcaSubsystemConfiguration) context.getServiceRegistry(false).getService(ConnectorServices.CONNECTOR_CONFIG_SERVICE).getValue();

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(false).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_ENABLED.getAttribute().getName())) {
            config.setArchiveValidation(resolvedValue.asBoolean());
        }

        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_FAIL_ON_ERROR.getAttribute().getName())) {
            config.setArchiveValidationFailOnError(resolvedValue.asBoolean());
        }
        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_FAIL_ON_WARN.getAttribute().getName())) {
            config.setArchiveValidationFailOnWarn(resolvedValue.asBoolean());
        }

        if (attributeName.equals(BeanValidationAdd.BeanValidationParameters.BEAN_VALIDATION_ENABLED.getAttribute().getName())) {
            config.setBeanValidation(resolvedValue.asBoolean());
        }

        if (attributeName.equals(BeanValidationAdd.BeanValidationParameters.BEAN_VALIDATION_ENABLED.getAttribute().getName())) {
                    config.setBeanValidation(resolvedValue.asBoolean());
        }

        if (attributeName.equals(CachedConnectionManagerAdd.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(resolvedValue.asBoolean());
        }

        if (attributeName.equals(CachedConnectionManagerAdd.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(resolvedValue.asBoolean());
        }


        return false;
View Full Code Here

    @Override
    protected void revertUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode valueToRestore, ModelNode valueToRevert, JcaSubsystemConfiguration handback) throws OperationFailedException {
        JcaSubsystemConfiguration config = (JcaSubsystemConfiguration) context.getServiceRegistry(false).getService(ConnectorServices.CONNECTOR_CONFIG_SERVICE).getValue();

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(false).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_ENABLED.getAttribute().getName())) {
            config.setArchiveValidation(valueToRestore.asBoolean());
        }

        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_FAIL_ON_ERROR.getAttribute().getName())) {
            config.setArchiveValidationFailOnError(valueToRestore.asBoolean());
        }
        if (attributeName.equals(ArchiveValidationAdd.ArchiveValidationParameters.ARCHIVE_VALIDATION_FAIL_ON_WARN.getAttribute().getName())) {
            config.setArchiveValidationFailOnWarn(valueToRestore.asBoolean());
        }

        if (attributeName.equals(BeanValidationAdd.BeanValidationParameters.BEAN_VALIDATION_ENABLED.getAttribute().getName())) {
            config.setBeanValidation(valueToRestore.asBoolean());
        }

        if (attributeName.equals(BeanValidationAdd.BeanValidationParameters.BEAN_VALIDATION_ENABLED.getAttribute().getName())) {
            config.setBeanValidation(valueToRestore.asBoolean());
        }

        if (attributeName.equals(CachedConnectionManagerAdd.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(valueToRestore.asBoolean());
        }

        if (attributeName.equals(CachedConnectionManagerAdd.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(valueToRestore.asBoolean());
        }

    }
View Full Code Here

    }

    @Override
    protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<JcaSubsystemConfiguration> jcaSubsystemConfigurationHandbackHolder) throws OperationFailedException {

        CachedConnectionManager ccm = (CachedConnectionManager) context.getServiceRegistry(true).getService(ConnectorServices.CCM_SERVICE).getValue();

        if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.DEBUG.getAttribute().getName())) {
            ccm.setDebug(resolvedValue.asBoolean());
        } else if (attributeName.equals(JcaCachedConnectionManagerDefinition.CcmParameters.ERROR.getAttribute().getName())) {
            ccm.setError(resolvedValue.asBoolean());
        }

        return false;

    }
View Full Code Here

TOP

Related Classes of org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager

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.