Package org.switchyard.component.jca.config.model

Examples of org.switchyard.component.jca.config.model.JCABindingModel


        _raRepository = repository;
    }
   
    private InboundHandler handleServiceBinding(JCABindingModel config, QName name) {
       
        JCABindingModel jcaconfig = (JCABindingModel)config;
        InboundConnectionModel inboundConnectionModel = jcaconfig.getInboundConnection();
        if (inboundConnectionModel == null) {
            throw JCAMessages.MESSAGES.noInboundConnectionConfigured();
        }
        ResourceAdapterModel resourceAdapterModel = inboundConnectionModel.getResourceAdapter();
        if (resourceAdapterModel == null) {
            throw JCAMessages.MESSAGES.noResourceAdapterConfigured();
        }
        String raName = resourceAdapterModel.getName();
        if (raName == null) {
            throw JCAMessages.MESSAGES.noResourceAdapterNameConfigured();
        }
        String raid = ConnectorServices.getRegisteredResourceAdapterIdentifier(raName);
        if (raid == null && raName.endsWith(".rar")) {
            // AS7 registers adapter's name with stripping .rar suffix unlike WildFly
            raid = ConnectorServices.getRegisteredResourceAdapterIdentifier(stripDotRarSuffix(raName));
        }
        if (raid == null) {
            throw JCAMessages.MESSAGES.uniqueKeyForResourceAdapter(raName);
        }
       
        Properties raProps = resourceAdapterModel.getProperties();
        Properties activationProps = null;
        ActivationSpecModel activationSpecModel = inboundConnectionModel.getActivationSpec();
        if (activationSpecModel != null) {
            activationProps = activationSpecModel.getProperties();
        }
        InboundInteractionModel inboundInteractionModel = jcaconfig.getInboundInteraction();
        if (inboundInteractionModel == null) {
            throw JCAMessages.MESSAGES.noInboundInteractionConfigured();
        }
       
        String listener = null;
View Full Code Here


        return new InboundHandler(inflowMetaData, getServiceDomain());
       
    }
   
    private OutboundHandler handleReferenceBinding(JCABindingModel config, QName name) {
        JCABindingModel jcaconfig = (JCABindingModel)config;
        OutboundConnectionModel outboundConnectionModel = jcaconfig.getOutboundConnection();
        if (outboundConnectionModel == null) {
            throw JCAMessages.MESSAGES.noOutboundConnectionConfigured();
        }
        boolean managed = outboundConnectionModel.isManaged();
        if (!managed) {
            throw JCAMessages.MESSAGES.nonManagedScenarioIsNotSupportedYet();
        }
       
        ResourceAdapterModel resourceAdapterModel = outboundConnectionModel.getResourceAdapter();
        if (resourceAdapterModel != null) {
            Properties raProps = resourceAdapterModel.getProperties();
            if (!raProps.isEmpty()) {
                String raName = resourceAdapterModel.getName();
                String raid = ConnectorServices.getRegisteredResourceAdapterIdentifier(stripDotRarSuffix(raName));
                if (raid == null) {
                    throw JCAMessages.MESSAGES.uniqueKeyForResourceAdapter(raName);
                }

                ResourceAdapter resourceAdapter = null;
                try {
                    resourceAdapter = _raRepository.getResourceAdapter(raid);
                    PropertyEditors.mapJavaBeanProperties(resourceAdapter, raProps);
                } catch (Exception e) {
                    throw JCAMessages.MESSAGES.couldnTAcquireTheResourceAdapter(raName, e);
                }
            }
        }

        OutboundInteractionModel outboundInteractionModel = jcaconfig.getOutboundInteraction();
        if (outboundInteractionModel == null) {
            throw JCAMessages.MESSAGES.noOutboundInteractionConfigured();
        }
        ProcessorModel processorModel = outboundInteractionModel.getProcessor();
        if (processorModel == null) {
View Full Code Here

TOP

Related Classes of org.switchyard.component.jca.config.model.JCABindingModel

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.