Package org.jboss.cache

Examples of org.jboss.cache.CacheException


         else
            tx.rollback();
      }
      catch (Exception e)
      {
         throw new CacheException("Unable to end batch", e);
      }
      finally
      {
         batchTransactionContainer.remove();
         try
         {
            if (existingTx != null) transactionManager.resume(existingTx);
         }
         catch (Exception e)
         {
            throw new CacheException("Failed resuming existing transaction " + existingTx, e);
         }
      }
   }
View Full Code Here


         if (isPrim)
            for (int i = 0; i < sz; i++) out.writeDouble(Array.getDouble(o, i));
         else
            for (int i = 0; i < sz; i++) out.writeDouble((Double) Array.get(o, i));
      }
      else throw new CacheException("Unknown array type!");
   }
View Full Code Here

//            instance = null;
            raw = baos.toByteArray();
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to marshall value " + instance, e);
         }
      }
   }
View Full Code Here

            bais.close();
//            raw = null;
         }
         catch (Exception e)
         {
            throw new CacheException("Unable to unmarshall value", e);
         }
      }
   }
View Full Code Here

            Field field = CallingFormat.class.getDeclaredField(s);
            setCallingFormat((CallingFormat) field.get(null));
         }
         catch (Exception e)
         {
            throw new CacheException(e);
         }
      }
   }
View Full Code Here

   }

   private List<ListenerInvocation> getListenerCollectionForAnnotation(Class<? extends Annotation> annotation)
   {
      List<ListenerInvocation> list = listenersMap.get(annotation);
      if (list == null) throw new CacheException("Unknown listener annotation: " + annotation);
      return list;
   }
View Full Code Here

               }
               catch (InvocationTargetException exception)
               {
                  Throwable cause = exception.getCause();
                  if (cause != null)
                     throw new CacheException("Caught exception invoking method " + method + " on listener instance " + target, cause);
                  else
                     throw new CacheException("Caught exception invoking method " + method + " on listener instance " + target, exception);
               }
               catch (IllegalAccessException exception)
               {
                  log.warn("Unable to invoke method " + method + " on Object instance " + target + " - removing this target object from list of listeners!", exception);
                  removeCacheListener(target);
View Full Code Here

      else
      {
         // "fail-more-silently" patch thanks to Owen Taylor - JBCACHE-767
         if ((ctx.getOptionOverrides() == null || !ctx.getOptionOverrides().isFailSilently()))
         {
            throw new CacheException("Unable to set node version for " + command.getFqn() + ", node is null.");
         }
      }
      Object result = putDataKeyValueAndNotify(command.getKey(), command.getValue(), workspace, workspaceNode, ctx);
      addToModificationList(command, ctx);
      return result;
View Full Code Here

      else
      {
         // "fail-more-silently" patch thanks to Owen Taylor - JBCACHE-767
         if ((ctx.getOptionOverrides() == null || !ctx.getOptionOverrides().isFailSilently()))
         {
            throw new CacheException("Unable to set node version for " + command.getFqn() + ", node is null.");
         }
      }
      putDataMapAndNotify(command.getData(), workspace, workspaceNode, ctx);
      addToModificationList(command, ctx);
      return null;
View Full Code Here

   {
      TransactionWorkspace workspace = getTransactionWorkspace(ctx);
      WorkspaceNode workspaceNode = fetchWorkspaceNode(ctx, command.getFqn(), workspace, true, true);
      if (ctx.isOriginLocal() && ctx.getOptionOverrides() != null && ctx.getOptionOverrides().getDataVersion() != null)
      {
         throw new CacheException("Setting a data version while performing a move() is not supported!!");
      }
      if (workspaceNode != null)
      {
         setVersioning(ctx, workspace, workspaceNode);
      }
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.