Package org.jboss.cache.pojo

Examples of org.jboss.cache.pojo.PojoCacheException


         MethodCall mc = new MethodCall(method, args, invocation.getTargetObject());
         handler.addToList(mc);
      }
      else
      {
         throw new PojoCacheException("PojoTxUndoInterceptor: invalid invocation name: " + methodName);
      }

      return invocation.invokeNext();
   }
View Full Code Here


   private void checkSetRecursion(Set set, Object obj)
   {
      if (set.remove(set))
      {
         set.add(obj); // replace with proxy
         throw new PojoCacheException("CollectionClassHandler.checkSetRecursion(): " +
                                      "detect a recursive set (e.g., set inside the same set). This will fail to " +
                                      "replicate even outside of PojoCache with HashSet. " + set);
      }
   }
View Full Code Here

      for (Object k : m.keySet())
      {
         if (m == k)
         {
            throw new PojoCacheException("CollectionClassHandler.checkMapRecursion(): " +
                                         " Can't handle the recursion map where it is nested in a constant key " + map);
         }

         Object v = m.get(k);
         if (v == map)
         {
            throw new PojoCacheException("CollectionClassHandler.checkMapRecursion(): " +
                                         "detect a recursive map (e.g., map inside the same map). This will fail to " +
                                         "replicate even outside of PojoCache with HashMap because of hashCode. " + map);
            // recursion here, replace it with proxy
//            map.put(k, obj);
         }
View Full Code Here

   Object remove(Fqn fqn, Object obj) throws CacheException
   {
      if (!(obj instanceof ClassProxy))
      {
         throw new PojoCacheException("CollectionClassHandler.collectionRemoveObject(): object is not a proxy :" + obj);
      }

      Interceptor interceptor = CollectionInterceptorUtil.getInterceptor((ClassProxy) obj);
      boolean removeFromCache = true;
      // detach the interceptor. This will trigger a copy and remove.
View Full Code Here

   private static Fqn constructFqn(Fqn baseFqn, Object relative)
   {
      if (!(relative instanceof Serializable) && !(relative instanceof Advised))
      {
         throw new PojoCacheException("Non-serializable for " + relative.getClass().getName());
      }

      return new Fqn(baseFqn, relative);
   }
View Full Code Here

      // Note this is actually the aliasFqn, not the real fqn!
      Object obj;

      obj = cache.getObject(fqn);
      if (obj == null)
         throw new PojoCacheException("ObjectGraphHandler.get(): null object from internal ref node." +
                                      " Internal ref node: " + fqn);

      return obj; // No need to set the instance under fqn. It is located in refFqn anyway.
   }
View Full Code Here

      if (obj instanceof Advised)
      {
         advisor = ((Advised) obj)._getInstanceAdvisor();
         if (advisor == null)
            throw new PojoCacheException("put(): InstanceAdvisor is null for: " + obj);
         // Step Check for cross references
         interceptor = AopUtil.findCacheInterceptor(advisor);
      }
      else
      {
         advisor = ((ClassProxy) obj)._getInstanceAdvisor();
         if (advisor == null)
            throw new PojoCacheException("put(): InstanceAdvisor is null for: " + obj);
         interceptor = CollectionInterceptorUtil.getInterceptor((ClassProxy) obj);
      }

      Fqn originalFqn = null;
View Full Code Here

      {
         pojoInstance = internal_.getPojoInstance(internalFqn);
      }
      catch (CacheException e)
      {
         throw new PojoCacheException("Exception in isMultipleReferenced", e);
      }
      // check if this is a refernce
      return InternalHelper.isMultipleReferenced(pojoInstance);

   }
View Full Code Here

    */
   int incrementRefCount(Fqn originalFqn, Fqn referencingFqn) throws CacheException
   {
      PojoInstance pojoInstance = getPojoInstance(originalFqn);
      if (pojoInstance == null)
         throw new PojoCacheException("InternalDelegate.incrementRefCount(): null pojoReference for fqn: " + originalFqn);

      int count = pojoInstance.incrementRefCount(referencingFqn);
      // need to update it.
      put(originalFqn, PojoInstance.KEY, pojoInstance);
      return count;
View Full Code Here

    */
   int decrementRefCount(Fqn originalFqn, Fqn referencingFqn) throws CacheException
   {
      PojoInstance pojoInstance = getPojoInstance(originalFqn);
      if (pojoInstance == null)
         throw new PojoCacheException("InternalDelegate.decrementRefCount(): null pojoReference.");

      int count = pojoInstance.decrementRefCount(referencingFqn);

      if (count < -1// can't dip below -1
         throw new PojoCacheException("InternalDelegate.decrementRefCount(): null pojoReference.");

      // need to update it.
      put(originalFqn, PojoInstance.KEY, pojoInstance);
      return count;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.pojo.PojoCacheException

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.