Package org.osgi.framework

Examples of org.osgi.framework.ServiceException


        if (ref != null) {
            service = bundle.getBundleContext().getService(ref);
        }
       
        if (service == null) {
            throw new ManagementException(new ServiceException(type.getName(), ServiceException.UNREGISTERED));
        }
       
        return type.cast(service);
    }
View Full Code Here


          pair = null;
        }
      }

      if (pair == null) {
        throw new ServiceException(interfaceName, ServiceException.UNREGISTERED);
      }
      return pair.service;
    }
View Full Code Here

            for (Class<?> exType : method.getExceptionTypes()) {
                if (exType.isInstance(e)) {
                    throw e;
                }
            }
            throw new ServiceException(e.getMessage(), ServiceException.REMOTE, e);
        }
View Full Code Here

                    proxyService = proxyFactoryExtensionPoint.getClassProxyFactory();
                }
                Object proxy = proxyService.createProxy(interfaceClass, epr);
                return InvocationHandlerDelegate.cast(proxy, interfaceClass);
            } catch (Throwable e) {
                throw new ServiceException(e.getMessage(), ServiceException.FACTORY_EXCEPTION, e);
            }
        }
View Full Code Here

        public Object getService(Bundle bundle, ServiceRegistration registration) {
            try {
                return connectionManager.createConnectionFactory();
            } catch (ResourceException e) {
                throw new ServiceException("Error creating connection factory", e);
            }
        }
View Full Code Here

          pair = null;
        }
      }

      if (pair == null) {
        throw new ServiceException(interfaceName, ServiceException.UNREGISTERED);
      }
      return pair.service;
    }
View Full Code Here

        if (ref != null) {
            service = bundle.getBundleContext().getService(ref);
        }
       
        if (service == null) {
            throw new ManagementException(new ServiceException(type.getName(), ServiceException.UNREGISTERED));
        }
       
        return type.cast(service);
    }
View Full Code Here

            for (Object o = m_lockedRegsMap.get(reg); (o != null); o = m_lockedRegsMap.get(reg))
            {
                // We don't allow cycles when we call out to the service factory.
                if (o.equals(Thread.currentThread()))
                {
                    throw new ServiceException(
                        "ServiceFactory.getService() resulted in a cycle.",
                        ServiceException.FACTORY_ERROR,
                        null);
                }
View Full Code Here

      if (ref != null) {
          service = _bundleContext.getService(ref);
      }
     
      if (service == null) {
          throw new ManagementException(new ServiceException(type.getName(), ServiceException.UNREGISTERED));
      }
     
      return type.cast(service);
  }
View Full Code Here

    ServiceReference ref = b.getServiceReference(AriesApplicationResolver.class.getName());

    if (ref != null) resolver = (AriesApplicationResolver) b.getService(ref);
   
    if (resolver == null) {
      throw new ManagementException(new ServiceException(AriesApplicationResolver.class.getName(), ServiceException.UNREGISTERED));
    }
   
    try {
      List<DeploymentContent> bundlesToInstall = new ArrayList<DeploymentContent>(meta.getApplicationDeploymentContents());
      bundlesToInstall.addAll(meta.getApplicationProvisionBundles());
View Full Code Here

TOP

Related Classes of org.osgi.framework.ServiceException

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.