WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Request for commit: MYFACES-3581 patch provided... simple fix

Request for commit: MYFACES-3581 patch provided... simple fix

by exabrial :: Rate this Message:

| View in Thread

Hey guys :) This is in reference to https://issues.apache.org/jira/browse/MYFACES-3581

This patch is fairly simplistic, and you should be able to verify it's correctness by reading the linked javadoc.

What's the patch for?
The short story is that MyFacesObjectInputStream does not attempt to use the context class loader while attempting to deserialize an object. The patch implements the resolveProxyClass method, which in turn uses the context class loader. See this link here to see why this patch is correct http://docs.oracle.com/javase/1.4.2/docs/api/java/io/ObjectInputStream.html#resolveProxyClass(java.lang.String[])

Why is this patch important?
Often times, proxies implementations of interfaces are generated at runtime to support behavior like dependency injection. These proxies need to be serialized into the view, if used with a ViewScoped bean. The current implementation causes the app to grind to a halt because it cannot find the proxy class in the normal classloader.

Thank you so much!

 « Return to Thread: Request for commit: MYFACES-3581 patch provided... simple fix