Examples of ServiceNotFoundException


Examples of org.apache.tuscany.core.context.ServiceNotFoundException

    public Object locateService(String qualifiedName) throws ServiceUnavailableException {
        checkInit();
        QualifiedName qName = new QualifiedName(qualifiedName);
        ScopeContext scope = scopeIndex.get(qName.getPartName());
        if (scope == null) {
            throw new ServiceNotFoundException(qualifiedName);
        }
        Context ctx = scope.getContext(qName.getPartName());
        try {
            Object o = ctx.getInstance(qName);
            if (o == null) {
                throw new ServiceNotFoundException(qualifiedName);
            }
            return o;
        } catch (TargetException e) {
            e.addContextName(getName());
            throw new ServiceNotFoundException(e);
        }
    }
View Full Code Here

Examples of org.jboss.msc.service.ServiceNotFoundException

                                        future.failed(controller.getStartException());
                                        controller.removeListener(this);
                                        break;
                                    }
                                    case REMOVING_to_REMOVED: {
                                        future.failed(new ServiceNotFoundException("Server controller service was removed"));
                                        controller.removeListener(this);
                                        break;
                                    }
                                }
                            }
                        });
                        break;
                    }
                    case STARTING_to_START_FAILED: {
                        controller.removeListener(this);
                        future.failed(controller.getStartException());
                        break;
                    }
                    case REMOVING_to_REMOVED: {
                        controller.removeListener(this);
                        future.failed(new ServiceNotFoundException("Root service was removed"));
                        break;
                    }
                }
            }
        });
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

      */
    public void unRegisterEPR(String serviceCategoryName, String serviceName, EPR epr) throws RegistryException, ServiceNotFoundException {
        int indexOf = repository.indexOf(new RepositoryEntry(serviceCategoryName, serviceName, null, epr, null));

        if (indexOf == -1) {
            throw new ServiceNotFoundException("Registry entry [" + serviceCategoryName + "][" + serviceName + "] not found.");
        }
        repository.remove(indexOf);
    }
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

        for (RepositoryEntry entry : repository) {
            if (serviceCategoryName.equals(entry.serviceCategoryName) && serviceName.equals(entry.serviceName)) {
                return entry.epr;
            }
        }
        throw new ServiceNotFoundException("Registry entry [" + serviceCategoryName + "][" + serviceName + "] not found.");
    }
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
        Service service = null;
        try {
            service = findService(category, serviceName);
            if (service==null) {
                throw new ServiceNotFoundException("No such EPR found for service with name = " + serviceName);
            }
            RegistryService rs = connection.getRegistryService();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            Collection<Key> serviceKeys = new ArrayList<Key>();
            serviceKeys.add(service.getKey());
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
        Service service = null;
        try {
            service = findService(category, serviceName);
            if (service==null) {
                throw new ServiceNotFoundException("No such Service found for service with category= "
                        + category + " and name = " + serviceName);
            }
            Collection serviceBindings = findServiceBindings(service);
            String toBeDeletedEPRXml = EPRHelper.toXMLString(toBeDeletedEPR).trim();
            for (Iterator i=serviceBindings.iterator();i.hasNext();){
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

    try {
      final Concept jbossTModel = getJBossESBTModel(connection);

      Service service = findService(category, serviceName);
      if (service==null){
                throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
      }
      // Get registry service and business query manager
      Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
      //Converting them to EPRs
      for (Iterator i=serviceBindings.iterator();i.hasNext();) {
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

        try {
      final Concept jbossTModel = getJBossESBTModel(connection);

            Service service = findService(category, serviceName);
            if (service==null){
                throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
            }
            // Get registry service and business query manager
            Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
            if (serviceBindings.iterator().hasNext()) {
                ServiceBinding serviceBinding = (ServiceBinding) serviceBindings.iterator().next();
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

        try
        {
            Map<String, InVMEntry> nameToEntry = categoryToNameToEntry.get(category) ;
            if (nameToEntry == null)
            {
                throw new ServiceNotFoundException("Could not locate any services for category " + category) ;
            }
           
            InVMEntry entry = nameToEntry.get(name) ;
            if (entry == null)
            {
                throw new ServiceNotFoundException("Could not locate service " + category + ", " + name) ;
            }
            if (entry.removeEPR(epr))
            {
                nameToEntry.remove(name) ;
                entry.shutdown() ;
View Full Code Here

Examples of org.jboss.soa.esb.services.registry.ServiceNotFoundException

        boolean removeEPR(final InVMEpr epr)
            throws ServiceNotFoundException
        {
            if (!eprs.remove(epr))
            {
                throw new ServiceNotFoundException("Could not locate the EPR in the current service") ;
            }
            if (epr.getPassByValue())
            {
                numPassByValue-- ;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.