>From ObjectOutputStream.resolveClass: The default implementation of this method in ObjectInputStream returns the result of calling
Class.forName(desc.getName(), false, loader) where loader is determined as follows: if there is a method on the current thread's stack whose declaring class was defined by a user-defined class loader (and was not a generated to implement reflective invocations), then loader is class loader corresponding to the closest such method to the currently executing frame; ----- Original Message ----- From: "Geert Bevin" <[EMAIL PROTECTED]> To: "Steven Harris" <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Tuesday, May 22, 2007 2:44 PM Subject: Re: [tc-dev] Named Classloaders > Doesn't serialization just use the caller's current classloader? > > On 22 May 2007, at 23:42, Steven Harris wrote: > >> I think we can follow the same rules that serialization follow >> about choosing classloaders but I'm not sure. >> >> Cheers, >> Steven Harris >> >> Director of Engineering >> [EMAIL PROTECTED] >> www.terracotta.org >> >> >> >> On May 22, 2007, at 2:38 PM, Geert Bevin wrote: >> >>> What about classes that are loaded through another classloader >>> (ie. an application having several classloaders). How well TC be >>> able to automatically tell which classloader it has to retrieve it >>> from, if it isn't named? >>> >>> On 22 May 2007, at 23:22, Steven Harris wrote: >>> >>>> This is something that has come up a few times over the last few >>>> years. Alex mentioned a solution and gkeim mentioned a similar >>>> solution. >>>> I want to schedule a brain storming session on it in the coming >>>> weeks >>>> but... >>>> >>>> Since I don't believe we ever push objects to a client anymore, at >>>> least not all the way to instantiation, I believe we can just use >>>> the >>>> classloader of requesting client. This may not >>>> have always been true but I think it is true now. What reasons >>>> can we >>>> think of that would require us to need named classloaders anymore? >>> >>> -- >>> Geert Bevin >>> Terracotta - http://www.terracotta.org >>> Uwyn "Use what you need" - http://uwyn.com >>> RIFE Java application framework - http://rifers.org >>> Music and words - http://gbevin.com >>> >> >> _______________________________________________ >> tc-dev mailing list >> [email protected] >> http://lists.terracotta.org/mailman/listinfo/tc-dev > > -- > Geert Bevin > Terracotta - http://www.terracotta.org > Uwyn "Use what you need" - http://uwyn.com > RIFE Java application framework - http://rifers.org > Music and words - http://gbevin.com > > > _______________________________________________ > tc-dev mailing list > [email protected] > http://lists.terracotta.org/mailman/listinfo/tc-dev > _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
