Examples of UnavailableException


Examples of com.datastax.driver.core.exceptions.UnavailableException

                        case UNAVAILABLE:
                            assert err.infos instanceof UnavailableException;
                            if (metricsEnabled())
                                metrics().getErrorMetrics().getUnavailables().inc();

                            UnavailableException ue = (UnavailableException)err.infos;
                            retry = retryPolicy.onUnavailable(statement,
                                                              ue.getConsistencyLevel(),
                                                              ue.getRequiredReplicas(),
                                                              ue.getAliveReplicas(),
                                                              retriesByPolicy);

                            if (metricsEnabled()) {
                                if (retry.getType() == Type.RETRY)
                                    metrics().getErrorMetrics().getRetriesOnUnavailable().inc();
View Full Code Here

Examples of com.dotcms.repackage.javax.portlet.UnavailableException

        getExpCache());

      cachePortlet.init(portletConfig);
    }
    catch (ClassNotFoundException cnofe) {
      throw new UnavailableException(cnofe.getMessage());
    }
    catch (InstantiationException ie) {
      throw new UnavailableException(ie.getMessage());
    }
    catch (IllegalAccessException iae) {
      throw new UnavailableException(iae.getMessage());
    }

    return cachePortlet;
  }
View Full Code Here

Examples of com.totsp.gwittir.client.util.UnavailableException

            return true;
     else return false; }-*/;

    public static Storage getSession() throws UnavailableException{
        if(!available()){
            throw new UnavailableException();
        }
        return getNativeSession();
    }
View Full Code Here

Examples of javax.portlet.UnavailableException

                if (className != null)
                {
                    ClassLoader paCl = classLoaderMap.get(paName);
                    if (paCl == null)
                    {
                        throw new UnavailableException("Portlet Application " + paName + " not available");
                    }
                   
                    try
                    {
                        Class<?> clazz = paCl.loadClass(className);
View Full Code Here

Examples of javax.portlet.UnavailableException

                {
                    ClassLoader paCl = classLoaderMap.get(paName);
                   
                    if (paCl == null)
                    {
                        throw new UnavailableException("Portlet Application " + paName + " not available");
                    }
                    bundle = loadResourceBundle(locale, pa.getResourceBundle(), paCl);
                    // even if bundle isn't found, store a null value in the HashMap so we don't need to go
                    // look for it again
                    bundleCache.put(locale, bundle);
View Full Code Here

Examples of javax.portlet.UnavailableException

                {
                    ClassLoader paCl = classLoaderMap.get(paName);
                   
                    if (paCl == null)
                    {
                        throw new UnavailableException("Portlet Application " + paName + " not available");
                    }
                    ResourceBundle loadedBundle = loadResourceBundle(l.getLocale(), pd.getResourceBundle(), paCl);
                    if (loadedBundle != null)
                    {
                        bundle = new InlinePortletResourceBundle(l.getTitle(), l.getShortTitle(), l.getKeywords(), loadedBundle);
View Full Code Here

Examples of javax.portlet.UnavailableException

            {
                ClassLoader paCl = classLoaderMap.get(paName);
               
                if (paCl == null)
                {
                    throw new UnavailableException("Portlet Application " + paName + " not available");
                }
               
                ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();
               
                try
                {
                    Class<?> clazz = paCl.loadClass(pd.getPortletClass());
                   
                    try
                    {
                        Thread.currentThread().setContextClassLoader(paCl);
                        // wrap new Portlet inside PortletInstance which ensures
                        // the destroy
                        // method will wait for all its invocation threads to
                        // complete
                        // and thereby releasing all its ClassLoader locks as
                        // needed for local portlets.

                        if (proxyUsed)
                        {
                            portlet = new JetspeedPortletProxyInstance(
                                                                       pd.getPortletName(),
                                                                       (Portlet) clazz.newInstance(),
                                                                       this.autoSwitchEditDefaultsModeToEditMode,
                                                                       this.autoSwitchConfigMode, this.customConfigModePortletUniqueName,
                                                                       this.autoSwitchPreviewMode, this.customPreviewModePortletUniqueName
                                                                       );
                        }
                        else
                        {
                            portlet = new JetspeedPortletInstance(pdName, (Portlet)clazz.newInstance());
                        }
                    }
                    finally
                    {
                        Thread.currentThread().setContextClassLoader(currentContextClassLoader);
                    }
                }
                catch (Exception e)
                {
                    String msg = "Cannot create Portlet instance " + pd.getPortletClass() + " for Portlet Application " + paName;                       
                    log.error(msg, e);
                    throw new UnavailableException(msg);
                }
               
                JetspeedPortletContext portletContext = new JetspeedPortletContextImpl(servletContext,
                                                                                       pa,
                                                                                       ContainerInfo.getInfo(),
                                                                                       portalContext.getConfiguration(),
                                                                                       rdService,
                                                                                       servletContextProvider
                                                                                       );
                JetspeedPortletConfig portletConfig = new JetspeedPortletConfigImpl(this, portletContext, pd);
               
                try
                {
                    try
                    {
                        Thread.currentThread().setContextClassLoader(paCl);
                        portlet.init(portletConfig);
                    }
                    finally
                    {
                        Thread.currentThread().setContextClassLoader(currentContextClassLoader);
                    }
                }
                catch (PortletException e1)
                {
                    log.error("Failed to initialize Portlet "+pd.getPortletClass()+" for Portlet Application "+paName, e1);
                    throw e1;
                }
               
                if (instanceCache == null)
                {
                    instanceCache = Collections.synchronizedMap(new HashMap<String, PortletInstance>());
                    this.portletCache.put(paName, instanceCache);
                }
               
                instanceCache.put(pdName, portlet);
            }
        }
        catch (PortletException pe)
        {
            throw pe;
        }
        catch (Throwable e)
        {
            log.error("PortletFactory: Failed to load portlet " + pd.getPortletClass(), e);
            throw new UnavailableException("Failed to load portlet " + pd.getPortletClass() + ": " + e.toString());
        }
       
        return portlet;
    }
View Full Code Here

Examples of javax.portlet.UnavailableException

                cacheListeners = new ArrayList<PortletURLGenerationListener>();
                ClassLoader paCl = getPortletApplicationClassLoader(pa);
               
                if (paCl == null)
                {
                    throw new UnavailableException("Portlet Application " + paName + " not available");
                }
               
                for (Listener listener : paListenerList)
                {
                    try
View Full Code Here

Examples of javax.portlet.UnavailableException

            {
                ClassLoader paCl = classLoaderMap.get(paName);
               
                if (paCl == null)
                {
                    throw new UnavailableException("Portlet Application " + paName + " not available");
                }
               
                try
                {
                    Class<? extends Object> clazz = paCl.loadClass(filter.getFilterClass());
                    PortletFilter portletFilter = (PortletFilter) clazz.newInstance();
                    filterInstance = new JetspeedPortletFilterInstance(filter, portletFilter);
                }
                catch (ClassNotFoundException e)
                {
                    String message = "The filter class isn't found: " + filter.getFilterClass();
                    log.error(message);
                    throw new UnavailableException(message);
                }
                catch (InstantiationException e)
                {
                    String message = "The filter class instantiation fail: " + filter.getFilterClass();
                    log.error(message);
                    throw new UnavailableException(message);
                }
                catch (IllegalAccessException e)
                {
                    String message = "IllegalAccessException on the filter class: " + filter.getFilterClass();
                    log.error(message);
                    throw new UnavailableException(message);
                }
               
                if (cacheFilters == null)
                {
                    cacheFilters = Collections.synchronizedMap(new HashMap<String, PortletFilterInstance>());
View Full Code Here

Examples of javax.resource.spi.UnavailableException

        // get an instance of MDB
        EasyBeansMDB easyBeansMDB = null;
        try {
            easyBeansMDB = getPool().get();
        } catch (PoolException e) {
            throw new UnavailableException("Cannot get instance in the pool", e);
        }

        // Build a wrapper around this mdb instance
        MDBListenerEndpointInvocationHandler handler = new MDBListenerEndpointInvocationHandler(this, easyBeansMDB,
                this.listenerInterface);
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.