Package org.apache.tuscany.sca.distributed.domain

Examples of org.apache.tuscany.sca.distributed.domain.DistributedSCADomain


            String nodeName   = args[1]
           
            // Create the distributed domain representation. We use the network implementation
            // here so that the node contacts a registry running somewhere out on the
            // network.
            DistributedSCADomain distributedDomain = new DistributedSCADomainNetworkImpl(domainName);
      
            // create the node that runs the calculator component
            EmbeddedNode node = new EmbeddedNode(nodeName);
            SCADomain domain = node.attachDomain(distributedDomain);
               
View Full Code Here


     */
    public EndpointReference getServiceEndpoint(){
       
        if ( serviceEPR == null ){
            // try to resolve the service endpoint with the registry
            DistributedSCADomain distributedDomain = ((SCABindingImpl)binding).getDistributedDomain();
            ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
           
            // The binding URI might be null in the case where this reference is completely
            // dynamic, for example, in the case of callbacks
            if (binding.getURI() != null) {
                String serviceUrl = serviceDiscovery.findServiceEndpoint(distributedDomain.getDomainName(),
                                                                         binding.getURI(),
                                                                         SCABinding.class.getName());
               
                if ( (serviceUrl != null ) &&
                     (!serviceUrl.equals(""))){
View Full Code Here

       
        //this.binding.setURI(wsBinding.getURI());
       
        // get the url out of the binding and send it to the registry if
        // a distributed domain is configured
        DistributedSCADomain distributedDomain = ((SCABindingImpl)this.binding).getDistributedDomain();
       
        ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
       
        // register endpoint against the path element of the binding uri
        String componentName = this.binding.getURI();
       
        try {
            URI servicePath = new URI(this.binding.getURI());
            componentName = servicePath.getPath();
           
            // strinp any leading slash
            if (componentName.charAt(0) == '/'){
                componentName = componentName.substring(1, componentName.length());
            }
        } catch(Exception ex) {
            // do nothing, the binding uri string will be used
        }


        serviceDiscovery.registerServiceEndpoint(distributedDomain.getDomainName(),
                                                 distributedDomain.getNodeName(),
                                                 componentName,
                                                 SCABinding.class.getName(),
                                                 wsBinding.getURI());

/*      
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.distributed.domain.DistributedSCADomain

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.