SourceForge.net
2004-06-29 21:09:01 UTC
Feature Requests item #982260, was opened at 2004-06-29 16:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474139&aid=982260&group_id=54559
Category: enhancement
Group: None
Status: Open
Priority: 5
Submitted By: Johnathan Conley (jconley)
Assigned to: Jim Alateras (jalateras)
Summary: support for context classloader during deserialization
Initial Comment:
If OpenJMS is used in an Embedded system where the
classloaders are controlled through
Thread.currentThread().setContextClassloader(), it is
not able to properly deserialize object messages in
ObjectMessageImpl because it uses the default
implementation of ObjectInputStream.
Javadocs state that if you want to expand the
classloader capability, you need to extend the
resolveClass method yourself.
You would need to do something like the following:
protected Class resolveClass(ObjectStreamClass desc)
throws IOException, ClassNotFoundException {
ClassLoader cl =
Thread.currentThread().getContextClassLoader();
if (cl!=null)
return cl.loadClass(desc.getName());
return super.resolveClass(desc);
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474139&aid=982260&group_id=54559
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474139&aid=982260&group_id=54559
Category: enhancement
Group: None
Status: Open
Priority: 5
Submitted By: Johnathan Conley (jconley)
Assigned to: Jim Alateras (jalateras)
Summary: support for context classloader during deserialization
Initial Comment:
If OpenJMS is used in an Embedded system where the
classloaders are controlled through
Thread.currentThread().setContextClassloader(), it is
not able to properly deserialize object messages in
ObjectMessageImpl because it uses the default
implementation of ObjectInputStream.
Javadocs state that if you want to expand the
classloader capability, you need to extend the
resolveClass method yourself.
You would need to do something like the following:
protected Class resolveClass(ObjectStreamClass desc)
throws IOException, ClassNotFoundException {
ClassLoader cl =
Thread.currentThread().getContextClassLoader();
if (cl!=null)
return cl.loadClass(desc.getName());
return super.resolveClass(desc);
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474139&aid=982260&group_id=54559