On Oct 18, 2006, at 3:16 PM, Frank Budinsky wrote:
<snip/>
Does this make any sense? If this example used static SDOs, then
the TCCL
would also need to be able to load the actual Java implementation
class.
Any advice or suggestions would be greatly appreciated.
As Jim pointed out, is this something SDO needs to do? Most of these
problems go away if you make the application responsible for
providing the TypeHelper to use (basically make it responsible for
the SDo context). If the application wants to pass it around using
parameters, a global, a ThreadLocal then it is free to do so.
As Raymond said, this is the approach taken by the JRE for normal
deserialization. ObjectInputStream does not resolve classes using a
custom classloader or even the TCCL - most code attempting
deserialization needs to subclass and override resolveClass() to work
correctly.
I would be very cautious about using the TCCL as well - this is how
the current implementation is keying INSTANCE and we know that in non-
trivial classloader environments this is problematic. I don't see why
it would be needed in this scenario either. If you have a static SDO
then the Type entry could contain the actual Class for the Type which
would be sufficient to allow it to be instantiated.
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]