Examples of CacheLoaderException


Examples of org.infinispan.loaders.CacheLoaderException

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

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

Examples of org.infinispan.loaders.CacheLoaderException

        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

Examples of org.infinispan.loaders.CacheLoaderException

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

Examples of org.infinispan.loaders.CacheLoaderException

            log.infof("Subscribed to remote cache events");
         } finally {
            ctx.close();
         }
      } catch (Exception e) {
         throw new CacheLoaderException(
               "Unable to subscribe for remote cache events", e);
      }

      super.start(); // Connect to the remote store
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

      super.stop();
      if (con != null) {
         try {
            con.close();
         } catch (JMSException e) {
            throw new CacheLoaderException(
                  "Unable to close remote cache event connection", e);
         }
      }
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

      assertNotNull(timestampColumnType, "timestampColumnType needed in order to create table");
   }

   private void assertNotNull(String keyColumnType, String message) throws CacheLoaderException {
      if (keyColumnType == null || keyColumnType.trim().length() == 0) {
         throw new CacheLoaderException(message);
      }
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

      try {
         statement = conn.createStatement();
         statement.executeUpdate(sql);
      } catch (SQLException e) {
         log.errorCreatingTable(sql, e);
         throw new CacheLoaderException(e);
      } finally {
         JdbcUtil.safeClose(statement);
      }
   }
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

         ps.setBinaryStream(1, byteBuffer.getStream(), byteBuffer.getLength());
         ps.setLong(2, bucket.timestampOfFirstEntryToExpire());
         ps.setString(3, bucket.getBucketName());
         int insertedRows = ps.executeUpdate();
         if (insertedRows != 1) {
            throw new CacheLoaderException("Unexpected insert result: '" + insertedRows + "'. Expected values is 1");
         }
      } catch (SQLException ex) {
         logAndThrow(ex, "sql failure while inserting bucket: " + bucket);
      } catch (InterruptedException ie) {
         if (log.isTraceEnabled()) log.trace("Interrupted while marshalling to insert a bucket");
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

         ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
         ps.setLong(2, bucket.timestampOfFirstEntryToExpire());
         ps.setString(3, bucket.getBucketName());
         int updatedRows = ps.executeUpdate();
         if (updatedRows != 1) {
            throw new CacheLoaderException("Unexpected  update result: '" + updatedRows + "'. Expected values is 1");
         }
      } catch (SQLException e) {
         logAndThrow(e, "sql failure while updating bucket: " + bucket);
      } catch (InterruptedException ie) {
         if (log.isTraceEnabled()) log.trace("Interrupted while marshalling to update a bucket");
View Full Code Here

Examples of org.infinispan.loaders.CacheLoaderException

         bucket.setBucketName(bucketName);//bucket name is volatile, so not persisted.
         return bucket;
      } catch (SQLException e) {
         String message = "sql failure while loading key: " + keyHashCode;
         log.error(message, e);
         throw new CacheLoaderException(message, e);
      } finally {
         JdbcUtil.safeClose(rs);
         JdbcUtil.safeClose(ps);
         connectionFactory.releaseConnection(conn);
      }
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.