Package org.servicemix.jbi.deployment

Examples of org.servicemix.jbi.deployment.Provider


            Connection[] connections = sa.getConnections().getConnection();
            if (connections != null) {
                for (int i = 0; i < connections.length; i++) {
                    Connection connection = connections[i];
                    Consumer consumer = connection.getConsumer();
                    Provider provider = connection.getProvider();
                    QName suName = consumer.getInterfaceName();
                    if (suName != null) {
                        LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                .getComponentConnector(suName);
                        if (lcc != null) {
                            lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                            lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                        }
                        else {
                            throw new DeploymentException("Unable to build connections, can't find consumer interface "
                                    + suName);
                        }
                    }
                    else {
                        // We didn't have the interface so we will go after
                        // the service name and endpoint
                        InternalEndpoint endPoint = (InternalEndpoint) container.getRegistry().getEndpoint(
                                consumer.getServiceName(), consumer.getEndpointName());
                        if (endPoint != null) {
                            LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                    .getComponentConnector(endPoint.getComponentNameSpace());
                            if (lcc != null) {
                                lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                                lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                            }
                            else {
                                throw new DeploymentException(
                                        "Unable to build connections, can't find consumer based on component name space "
                                                + endPoint.getComponentNameSpace());
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.deployment.Provider

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.