Package org.jboss.soa.esb.services.registry

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


                        throw new UnmarshalException(ue.getMessage(), ue);
                    }
                }
      }
    } catch (JAXRException je) {
      throw new RegistryException(je.getLocalizedMessage(), je);
        } catch (UnmarshalException me) {
            throw new RegistryException(me.getLocalizedMessage(), me);
    } finally {
      JAXRConnectionSingleton.recycleConnection(jaxrConnectionFactory, connection);
    }
    return eprs;
  }
View Full Code Here


                        throw new UnmarshalException(ue.getMessage(), ue);
                    }
                }
            }
        } catch (JAXRException je) {
            throw new RegistryException(je.getLocalizedMessage(), je);
        } catch (UnmarshalException me) {
            throw new RegistryException(me.getLocalizedMessage(), me);
        } finally {
      JAXRConnectionSingleton.recycleConnection(jaxrConnectionFactory, connection);
        }
       
        return epr;
View Full Code Here

  {
    final Collection currentBindings ;
    try {
      currentBindings = service.getServiceBindings() ;
    } catch (final JAXRException jaxre) {
      throw new RegistryException(jaxre.getLocalizedMessage(), jaxre);
    }
    if ((currentBindings != null) && (currentBindings.size() > 0)) {
      return currentBindings;
    }
   
    Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
      BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
      Collection<String> findQualifiers = null;
      //Collection<String> findQualifiers = new ArrayList<String>();
      //findQualifiers.add(FindQualifier.SORT_BY_DATE_ASC);
      ArrayList<SpecificationLink> specs = new ArrayList<SpecificationLink>();
            SpecificationLink sl = new SpecificationLinkImpl(blm);
            sl.setSpecificationObject(jbossTModel);

      specs.add(sl);
      BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,specs);
      if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
        serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
        for (Iterator bindIter = serviceBindings.iterator(); bindIter.hasNext();)
        {
          ServiceBinding binding = (ServiceBinding) bindIter.next();
          Collection<SpecificationLink> bindingSpecs = binding.getSpecificationLinks();         
                SpecificationLink slink = new SpecificationLinkImpl(blm);
                slink.setSpecificationObject(jbossTModel);

          bindingSpecs.add(slink);
        }
      }
      return serviceBindings;
    } catch (Exception je) {
      throw new RegistryException(je.getLocalizedMessage(), je);
    } finally {
      JAXRConnectionSingleton.recycleConnection(jaxrConnectionFactory, connection);
    }
  }
View Full Code Here

   */
    public void unRegisterService(String categoryName, String serviceName) throws RegistryException
    {
        Category category = categories.get(categoryName);
        if (category==null) {
            throw new RegistryException("Service not found");
        } else {
            List<Service> services = category.getServices();
            for (Service service : services) {
                if (serviceName.equals(service.getName())) {
                    services.remove(service);
View Full Code Here

  public List<String> findServices(String categoryName) throws RegistryException
  {
        List<String> serviceNames = new ArrayList<String>();
    Category category = categories.get(categoryName);
        if (category==null) {
            throw new RegistryException("No category called " + categoryName + " exist");
        }
        for (Service service : category.getServices()) {
            serviceNames.add(service.name);
        }
        return serviceNames;
View Full Code Here

        for (Service service : category.getServices()) {
            if (serviceName.equals(service.getName())) {
                return service;
            }
        }
        throw new RegistryException("No service called " + serviceName + " exists in category " + categoryName);
  }
View Full Code Here

            getEprManager().saveEPR(name, address) ;
        }
        catch (final IOException ioe)
        {
            logger.error("Cannot register service", ioe) ;
            throw new RegistryException("Cannot register service", ioe) ;
        }
    }
View Full Code Here

            {
                epr = getEprManager().loadEPR(name) ;
            }
            catch (final IOException ioe)
            {
                throw new RegistryException("No EPRs found for <" + category
                    + "><" + name + ">") ;
            }
            return Arrays.asList(new EPR[] {epr}) ;
        }

        final Registry reg = RegistryFactory.getRegistry() ;
        RegistryException eReg = null ;
        for (int count = 0; count < 5; count++)
        {
            try
            {
                return reg.findEPRs(category, name) ;
View Full Code Here

    public void registerEPR(String serviceCategoryName, String serviceName, String serviceDescription, EPR epr, String eprDescription) throws RegistryException {
        if (epr instanceof InVMEpr) {
            try {
                InVMTransport.getInstance().registerEPR(serviceCategoryName, serviceName, (InVMEpr)epr) ;
            } catch (final InVMException invme) {
                throw new RegistryException("Unexpected error registering service EPR", invme) ;
            }
        } else {
            getRegistry().registerEPR(serviceCategoryName, serviceName, serviceDescription, epr, eprDescription) ;
        }
    }
View Full Code Here

              try {
                 return method.invoke(registry, args);
              } catch (InvocationTargetException ite) {
                    throw ite.getCause();
              } catch (Exception e) {
                  throw new RegistryException(e.getMessage(), e);
              } finally {
                 Thread.currentThread().setContextClassLoader(old);
              }
           }
      };
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.services.registry.RegistryException

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.