Package org.jboss.cache

Examples of org.jboss.cache.CacheException


                  Thread.currentThread().interrupt();
               }
            }
            else
            {
               throw new CacheException("Problems invoking method call!", e);
            }
         }
      }
      while (System.currentTimeMillis() < endTime);
      throw new CacheException("Unable to communicate with TCPCacheServer(" + config.getHost() + ":" + config.getPort() + ") after " + config.getTimeout() + " millis, with reconnects every " + config.getReconnectWaitTime() + " millis.");
   }
View Full Code Here


         {
            loader = createCacheLoader();
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to create cache loaders", e);
         }
      }
   }
View Full Code Here

         {
            loader = createCacheLoader();
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to create cache loaders", e);
         }
      }
   }
View Full Code Here

         {
            children = loader.getChildrenNames(fqn);
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to preload from cache loader", e);
         }
         if (children != null)
         {
            for (Object aChildren : children)
            {
View Full Code Here

         {
            loader = createCacheLoader();
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to create cache loaders", e);
         }
      }


      if (loader != null)
      {
         try
         {
            // wire any deps.
            registry.wireDependencies(loader);

            // create the cache loader
            loader.create();
            // start the cache loader
            loader.start();

            purgeLoaders(false);
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to start cache loaders", e);
         }
         fetchPersistentState = fetchPersistentState || (loader.getConfig() != null && loader.getConfig().isFetchPersistentState());
         fetchPersistentState = fetchPersistentState || (config != null && config.isFetchPersistentState());
      }
   }
View Full Code Here

         {
            cache = (CacheSPI) wrapper.getCache();

            if (cache == null)
            {
               throw new CacheException("cache cannot be obtained from CacheJmxWrapperMBean;" +
                     " be sure start() is invoked on wrapper before it is invoked on the" +
                     " TcpCacheServer");
            }
         }
         else if (config != null)
         {
            cache = (CacheSPI) new DefaultCacheFactory<Object, Object>().createCache(this.config);
         }
      }

      if (cache == null)
      {
         throw new CacheException("cache reference is not set");
      }


      srv_sock = new ServerSocket(port, 10, bind_addr);
      log.info("TcpCacheServer listening on : " + srv_sock.getInetAddress() + ":" + srv_sock.getLocalPort());
View Full Code Here

         }
         else
         {
            //this should be valid
            if (!TransactionTable.isValid(ltx))
               throw new CacheException("Transaction " + ltx + " not in correct state to be prepared");

            //associate this thread with the local transaction associated with the global transaction, IF the localTx is NOT the current tx.
            if (currentTx == null || !ltx.equals(currentTx))
            {
               if (trace) log.trace("Suspending current tx " + currentTx);
View Full Code Here

         }
      }
      else
      {
         log.warn("Local transaction does not exist or does not match expected transaction " + gtx);
         throw new CacheException(" local transaction " + ltx + " does not exist or does not match expected transaction " + gtx);
      }
      return result;
   }
View Full Code Here

                     tx.setRollbackOnly();
                     throw (Throwable) result;
                  }
                  break;
               default:
                  throw new CacheException("transaction " + tx + " in status " + tx.getStatus() + " unable to start transaction");
            }
         }
         catch (Throwable t)
         {
            if (log.isWarnEnabled()) log.warn("Caught exception, will now set transaction to roll back", t);
View Full Code Here

   {
      // get the current globalTransaction
      GlobalTransaction gtx = ctx.getGlobalTransaction();
      if (gtx == null)
      {
         throw new CacheException("failed to get global transaction");
      }
      return gtx;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.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.