Package org.impalaframework.util.serialize

Examples of org.impalaframework.util.serialize.ClassLoaderAwareSerializationStreamFactory$ClassLoaderAwareInputStream


                logger.warn("Object in session under key [" + name + "] is not compatible with the current class loader, and cannot be recovered because it does not implement " + Serializable.class.getName() + ". Attribute will be removed from the session");
                this.removeAttribute(name);
                return null;
            }
           
            SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(moduleClassLoader));
           
            Object clonedAttribute = null;
            try {
                clonedAttribute = clone(attribute, helper);
            } catch (RuntimeException e) {
View Full Code Here


        logger.warn("Object in session under key [" + name + "] is not compatible with the current class loader, and cannot be recovered because it does not implement " + Serializable.class.getName() + ". Attribute will be removed from the session");
        this.removeAttribute(name);
        return null;
      }
     
      SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(moduleClassLoader));
     
      Object clonedAttribute = null;
      try {
        clonedAttribute = clone(attribute, helper);
      } catch (RuntimeException e) {
View Full Code Here

    final Object clone = helper.clone((Serializable) o);
    return clone;
  }

  SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
    return new ClassLoaderAwareSerializationStreamFactory(classLoader);
  }
View Full Code Here

        final Object clone = helper.clone((Serializable) o);
        return clone;
    }

    SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
        return new ClassLoaderAwareSerializationStreamFactory(classLoader);
    }
View Full Code Here

    final Object clone = helper.clone((Serializable) o);
    return clone;
  }

  SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
    return new ClassLoaderAwareSerializationStreamFactory(classLoader);
  }
View Full Code Here

                logger.warn("Object in session under key [" + name + "] is not compatible with the current class loader, and cannot be recovered because it does not implement " + Serializable.class.getName() + ". Attribute will be removed from the session");
                this.removeAttribute(name);
                return null;
            }
           
            SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(moduleClassLoader));
           
            Object clonedAttribute = null;
            try {
                clonedAttribute = clone(attribute, helper);
            } catch (RuntimeException e) {
View Full Code Here

        logger.warn("Object in session under key [" + name + "] is not compatible with the current class loader, and cannot be recovered because it does not implement " + Serializable.class.getName() + ". Attribute will be removed from the session");
        this.removeAttribute(name);
        return null;
      }
     
      SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(moduleClassLoader));
     
      Object clonedAttribute = null;
      try {
        clonedAttribute = clone(attribute, helper);
      } catch (RuntimeException e) {
View Full Code Here

    public void testGetAttributeWrappingSerializableValueHolder() {
        //test the case where the classloader is compatible
       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
        session.setAttribute(eq("myAttribute"), EasyMock.anyObject());
       
View Full Code Here

    public void testGetAttributeWrappingWithFailedSerialization() {
        //test the case where the classloader is compatible
       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
        session.removeAttribute("myAttribute");
       
View Full Code Here

       
        PropertySourceHolder.getInstance().setPropertySource(source);
       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
       
        //note the call to invalidate
View Full Code Here

TOP

Related Classes of org.impalaframework.util.serialize.ClassLoaderAwareSerializationStreamFactory$ClassLoaderAwareInputStream

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.