| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Does anyone know much about how webobjects uses the classloader and how the _NSUtilities class cache is initialized and used?You are correct ... Frameworks (and your app) are loaded by NSBundle, which traverses all of the classpath and loads the reachable classes into the NSUtilities cache (so you can do things like looking up a component by name -- _NSUtilities.classWithName(..)). You can also override these class names by calling _NSUtilities.setClassForName. If the name was not in the cache, it will Class.forName it and then put the result into the cache. This behavior makes packageless WOComponent name lookups (for instance) very fast in exchange for some kind of weird behavior (like cross-your-fingers-if-you-have-two- classes-with-the-same-name).
[snip] it appears that _NSUtilities has a static initialiser that pulls in and caches classes rather than asking the current thread context classloader for them when needed [snip]
ms
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden
| References: | |
| >WebObjects classloader fun. (From: Q <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.