On 04/24/2011 05:14 PM, Edvin Syse wrote:
Hi,
I see that the JavaSessionDeserializer has a constructor that takes a
ClassLoader:
http://caucho.com/resin-4.0-javadoc/com/caucho/server/session/JavaSessionDeserializer.html
.. but I can't figure out how to configure this in resin.xml. It
My application is a CMS where each user can compile and run Groovy
classes as controllers for pages. These Groovy classes are compiled,
and it is fully legal to put part of a such a class in a session
variable (they are Serializable). The controller is executed using a
special classloader and
On 04/25/2011 10:07 AM, Edvin Syse wrote:
My application is a CMS where each user can compile and run Groovy
classes as controllers for pages. These Groovy classes are compiled,
and it is fully legal to put part of a such a class in a session
variable (they are Serializable). The controller is
Hmm.
When you call request.getSession(), have you already set the
Thread.setContextClassLoader?
It might be cleaner for us to add a use-context-class-loader as a
session-config configuration.
-- Scotthttp://maillist.caucho.com/mailman/listinfo/resin-interest
Basically, I construct a
Maybe a better route is to configure my own serializer/deserializer? If
I use a custom ObjectInputStream that overrides the loadClass() method
s/loadClass/resolveClass/
:)
-- Edvin
___
resin-interest mailing list
resin-interest@caucho.com
On 04/25/2011 10:44 AM, Edvin Syse wrote:
Hmm.
When you call request.getSession(), have you already set the
Thread.setContextClassLoader?
It might be cleaner for us to add a use-context-class-loader as a
session-config configuration.
--
The typical pattern for a custom classloader would also use:
Thread thread = Thread.currentThread();
ClassLoader oldLoader = thread.getContextClassLoader();
try {
thread.setContextClassLoader(myClassLoader);
pageController.execute();
} finally {
On 04/25/2011 12:11 PM, Edvin Syse wrote:
But it might be cleaner to use the ContextClassLoader pattern with a
session-config so you don't actually need to write a custom serializer.
This will actually not work properly, since
ObjectInputStream.readObject does not honor the thread's
On 04/25/2011 12:11 PM, Edvin Syse wrote:
But it might be cleaner to use the ContextClassLoader pattern with a
session-config so you don't actually need to write a custom serializer.
This will actually not work properly, since
ObjectInputStream.readObject does not honor the thread's
But that's the point of adding session-config
use-context-class-loader='true'/ to Resin. I can have Resin use the
context classloader when it's deserializing.
Resin already needs to deal with this issue to use the web-app's
classloader. It's an easy change to allow the context classloader
10 matches
Mail list logo