![]() |
|
Модераторы: LSD, AntonSaburov |
![]()
|
|
| Royan |
|
|||
|
Dreamer ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 1708 Регистрация: 14.9.2002 Где: Лондон Репутация: 3 Всего: 15 |
Всем привет!
Был тут на одном собеседовании, спросили, - "Что такое контекст classloader'а?" - в памяти забрезжило что-то туманное, короче я не стал особо гнать пургу сказал что не знаю. Сейчас пытаюсь погуглить, ничего вразумительно-разъясняющего не находиться. Кто может просветить все же что это такое и зачем оно нужно? -------------------- Открыта вакансия Junior Java Developer'а в нашем лондонском офисе, подробнее можно узнать здесь |
|||
|
||||
| ecologist |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 452 Регистрация: 28.2.2007 Репутация: 2 Всего: 9 |
Странно - у меня гугл видимо не такой.
"The Java 2 platform also introduced the notion of context class loader. A thread's context class loader is, by default, set to the context class loader of the thread's parent. The hierarchy of threads is rooted at the primordial thread (the one that runs the program). The context class loader of the primordial thread is set to the class loader that loaded the application. So unless you explicitly change the thread's context class loader, its context class loader will be the application's class loader. That is, the context class loader can load the classes that the application can load. This loader is used by the Java runtime such as the RMI (Java Remote Method Invocation) to load classes and resources on behalf of the user application. The context class loader, like any Java 2 platform class loader, has a parent class loader and supports the same delegation model for class loading described previously. " "A context class loader is associated with a Thread. This class loader is provided by the thread creator to code running in the thread for the purpose loading classes and resources. This class loader is useful for loading classes and resources that are not always available to the class loader which loaded the code running in the thread. " http://java.sun.com/products/jndi/tutorial...lassloader.html http://wiki.eclipse.org/index.php/Context_...er_Enhancements http://impalablog.blogspot.com/2008/10/usi...-loader-in.html Да и в J2SE API посмотреть ClassLoader тоже можно. |
|||
|
||||
| SoulKeeper |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 375 Регистрация: 14.1.2007 Где: Ukraine, Lviv. Репутация: 11 Всего: 15 |
Контекстный класслоадер у треда это явно не контекст класслоадера.
Как именно вопрос звучал? |
|||
|
||||
| Royan |
|
|||
|
Dreamer ![]() ![]() ![]() Профиль Группа: Участник Клуба Сообщений: 1708 Регистрация: 14.9.2002 Где: Лондон Репутация: 3 Всего: 15 |
SoulKeeper, Вопрос звучал буквально так, как я его задал здесь, другое дело, что интервьюер мог сам запутаться в словах, потому что про тред речи не шло, думаю, если само по себе понятие контекст класслоадера бессмысленно, то имелся ввиду контекст класслоадера у треда.
-------------------- Открыта вакансия Junior Java Developer'а в нашем лондонском офисе, подробнее можно узнать здесь |
|||
|
||||
![]()
|
| Правила форума "Java" | |
|
|
Если Вам помогли, и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, LSD, AntonSaburov, powerOn, tux, javastic. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Java: Общие вопросы | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |