Package org.infinispan.loaders

Examples of org.infinispan.loaders.CacheLoaderException


               safeClose(bos);
               safeClose(fos);
            }
         }
      } catch (IOException e) {
         throw new CacheLoaderException("I/O error", e);
      } catch (ClassNotFoundException e) {
         throw new CacheLoaderException("Unexpected exception", e);
      }
   }
View Full Code Here


               Util.close(bis);
               Util.close(fileInStream);
            }
         }
      } catch (IOException e) {
         throw new CacheLoaderException("I/O exception while generating stream", e);
      }
   }
View Full Code Here

            bucket = (Bucket) objectFromInputStreamInReentrantMode(is);
         } catch (InterruptedException ie) {
            throw ie;
         } catch (Exception e) {
            log.errorReadingFromFile(bucketFile.getAbsoluteFile(), e);
            throw new CacheLoaderException("Error while reading from file", e);
         } finally {
            safeClose(is);
         }
      }
      if (bucket != null) {
View Full Code Here

         try {
            byte[] bytes = marshaller.objectToByteBuffer(b);
            fileSync.write(bytes, f);
         } catch (IOException ex) {
            log.errorSavingBucket(b, ex);
            throw new CacheLoaderException(ex);
         } catch (InterruptedException ie) {
            if (trace) {
               log.trace("Interrupted while marshalling a bucket");
            }
            Thread.currentThread().interrupt(); // Restore interrupted status
View Full Code Here

      if (files == null) {
         boolean exists = f.exists();
         boolean isDirectory = f.isDirectory();
         boolean canRead = f.canRead();
         boolean canWrite = f.canWrite();
         throw new CacheLoaderException(String.format(
               "File %s is not directory or IO error occurred when listing " +
               "files with filter %s [fileExists=%b, isDirector=%b, " +
               "canRead=%b, canWrite=%b]",
               f, filter, exists, isDirectory, canRead, canWrite));
      }
View Full Code Here

  public void stop() throws CacheLoaderException {
    try {
       this.emfRegistry.closeEntityManagerFactory(config.getPersistenceUnitName());
      super.stop();
    } catch (Throwable t) {
      throw new CacheLoaderException(
          "Exceptions occurred while stopping store", t);
    }
  }
View Full Code Here

      txn.commit();
    } catch (Exception e) {
      if (txn != null && txn.isActive())
        txn.rollback();
      throw new CacheLoaderException("Exception caught in clear()", e);
    } finally {
      em.close();
    }

  }
View Full Code Here

        Object o = it.next();
        marshaller.objectToObjectStream(o, oos);
      }
      marshaller.objectToObjectStream(BINARY_STREAM_DELIMITER, oos);
    } catch (IOException e) {
      throw new CacheLoaderException("IO Exception in toStreamLockSafe",
          e);
    } finally {
      em.close();
    }
  }
View Full Code Here

      Thread.currentThread().interrupt();
    } catch (Exception e) {
      if (txn != null && txn.isActive())
        txn.rollback();

      throw new CacheLoaderException(e);
    } finally {
      em.close();
    }
  }
View Full Code Here

        return true;
      } catch (Exception e) {
        if (txn != null && txn.isActive())
          txn.rollback();
        throw new CacheLoaderException(
            "Exception caught in removeLockSafe()", e);
      }
    } finally {
      em.close();
    }
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.CacheLoaderException

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.