Author: nbelaevski
Date: 2008-08-08 08:37:39 -0400 (Fri, 08 Aug 2008)
New Revision: 9986
Modified:
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
Log:
https://jira.jboss.org/jira/browse/RF-4108
https://jira.jboss.org/jira/browse/RF-4120
Modified:
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
===================================================================
---
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2008-08-08
10:19:53 UTC (rev 9985)
+++
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2008-08-08
12:37:39 UTC (rev 9986)
@@ -29,6 +29,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
@@ -262,7 +263,14 @@
if (ContextInitParameters.isSerializeServerState(context)) {
ObjectInputStream ois = null;
try {
- ois = new ObjectInputStream(new ByteArrayInputStream((byte[]) state));
+ ois = new ObjectInputStream(new ByteArrayInputStream((byte[]) state)) {
+
+ protected Class resolveClass(ObjectStreamClass desc)
+ throws IOException, ClassNotFoundException {
+ return Class.forName(desc.getName(), true,
+ Thread.currentThread().getContextClassLoader());
+ }
+ };
return ois.readObject();
} catch (Exception e) {
throw new FacesException(e);