Package net.sf.ehcache

Examples of net.sf.ehcache.CacheException


            String url = null;
            if (rmiCachePeer != null) {
                url = rmiCachePeer.getUrl();
            }

            throw new CacheException("Problem starting listener for RMICachePeer "
                    + url + ". Initial cause was " + e.getMessage(), e);
        }
    }
View Full Code Here


     */
    protected String[] listBoundRMICachePeers() throws CacheException {
        try {
            return registry.list();
        } catch (RemoteException e) {
            throw new CacheException("Unable to list cache peers " + e.getMessage());
        }
    }
View Full Code Here

     */
    protected Remote lookupPeer(String name) throws CacheException {
        try {
            return registry.lookup(name);
        } catch (Exception e) {
            throw new CacheException("Unable to lookup peer for replicated cache " + name + " "
                    + e.getMessage());
        }
    }
View Full Code Here

                stopRegistry();
            }
            LOG.fine(counter + " RMICachePeers unbound from registry in RMI listener");
            status = Status.STATUS_SHUTDOWN;
        } catch (Exception e) {
            throw new CacheException("Problem unbinding remote cache peers. Initial cause was " + e.getMessage(), e);
        }
    }
View Full Code Here

            try {
                rmiCachePeer = new RMICachePeer(cache, hostName, port, remoteObjectPort, socketTimeoutMillis);
                url = rmiCachePeer.getUrl();
                bind(url, rmiCachePeer);
            } catch (Exception e) {
                throw new CacheException("Problem starting listener for RMICachePeer "
                        + url + ". Initial cause was " + e.getMessage(), e);
            }

            synchronized (cachePeers) {
                cachePeers.put(cacheName, rmiCachePeer);
View Full Code Here

        }
        String url = null;
        try {
            unbind(rmiCachePeer);
        } catch (Exception e) {
            throw new CacheException("Error removing Cache Peer "
                    + url + " from listener. Message was: " + e.getMessage(), e);
        }

        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine(cachePeers.size() + " RMICachePeers bound in registry for RMI listener");
View Full Code Here

        ObjectName objectName;
        try {
            objectName = new ObjectName("net.sf.ehcache:type=Cache,CacheManager="
                    + cacheManagerName + ",name=" + cacheName);
        } catch (MalformedObjectNameException e) {
            throw new CacheException(e);
        }
        return objectName;
    }
View Full Code Here

        ObjectName objectName;
        try {
            objectName = new ObjectName("net.sf.ehcache:type=CacheConfiguration,CacheManager="
                    + cacheManagerName + ",name=" + cacheName);
        } catch (MalformedObjectNameException e) {
            throw new CacheException(e);
        }
        return objectName;
    }
View Full Code Here

            //release the lock you acquired
            put(new Element(key, null));

            try {
                throw new CacheException("Could not fetch object for cache entry with key \"" + key + "\".", throwable);
            } catch (NoSuchMethodError noSuchMethodError) {
                //Running 1.3 or lower
                throw new CacheException("Could not fetch object for cache entry with key \"" + key + "\".");
            }


        }
    }
View Full Code Here

                exception = e;
            }
        }

        if (exception != null) {
            throw new CacheException(exception.getMessage() + " on refresh with key " + keyWithException);
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.ehcache.CacheException

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.