[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo ...

Ben Wang bwang at jboss.com
Thu Jul 13 03:53:27 EDT 2006


  User: bwang   
  Date: 06/07/13 03:53:27

  Modified:    src-50/org/jboss/cache/pojo   PojoCacheDelegate.java
                        SerializableObjectHandler.java
  Log:
  Added CheckNonSerializableInterceptor to check for marshalling non-serializable pojo.
  
  Revision  Changes    Path
  1.3       +0 -3      JBossCache/src-50/org/jboss/cache/pojo/PojoCacheDelegate.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoCacheDelegate.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/PojoCacheDelegate.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- PojoCacheDelegate.java	12 Jul 2006 13:28:25 -0000	1.2
  +++ PojoCacheDelegate.java	13 Jul 2006 07:53:26 -0000	1.3
  @@ -171,9 +171,6 @@
       */
      Object _putObject(Fqn fqn, Object obj) throws CacheException
      {
  -      if (!cache_.isMarshallNonSerializable())
  -         AopUtil.checkObjectType(obj);
  -
         if (obj == null)
         {
            return cache_._removeObject(fqn, true);
  
  
  
  1.5       +4 -19     JBossCache/src-50/org/jboss/cache/pojo/SerializableObjectHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SerializableObjectHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/SerializableObjectHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- SerializableObjectHandler.java	12 Jul 2006 13:28:25 -0000	1.4
  +++ SerializableObjectHandler.java	13 Jul 2006 07:53:27 -0000	1.5
  @@ -20,7 +20,7 @@
    * Handle Serializable object cache management.
    *
    * @author Ben Wang
  - * @version $Id: SerializableObjectHandler.java,v 1.4 2006/07/12 13:28:25 bwang Exp $
  + * @version $Id: SerializableObjectHandler.java,v 1.5 2006/07/13 07:53:27 bwang Exp $
    */
   class SerializableObjectHandler
   {
  @@ -64,31 +64,16 @@
              throws CacheException
      {
         // Note that JBoss Serialization can serialize any type now.
  -      if (obj instanceof Serializable || cache_.isMarshallNonSerializable())
  -      {
            if (log.isDebugEnabled())
            {
  -            log.debug("putObject(): obj (" + obj.getClass() + ") is non-advisable but is Serializable. ");
  +            log.debug("putObject(): obj (" + obj.getClass() + ") is non-advisable but serialize it anyway. "
  +            + "Note that if it is non-serializable we require to use JBoss Serialization.");
            }
   
            putIntoCache(fqn, obj);
            return true;
         }
   
  -      // If the flag is set, we will marshall it using JBossSerialization
  -/*      if(cache_.isMarshallNonSerializable())
  -      {
  -         if (log.isDebugEnabled()) {
  -            log.debug("serialiableObjectPut(): obj (" + obj.getClass() + ") is non-Serializable." +
  -            " Will marshall it first");
  -         }
  -         putIntoCache(fqn, obj);
  -         return true;
  -      }
  -*/
  -      return false;
  -   }
  -
      private void putIntoCache(Fqn fqn, Object obj)
              throws CacheException
      {
  
  
  



More information about the jboss-cvs-commits mailing list