Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Eclipse Plug-in Development

You're reading from   Mastering Eclipse Plug-in Development Build modular applications on Eclipse by defining custom extension points and using OSGi services

Arrow left icon
Product type Paperback
Published in Aug 2014
Publisher
ISBN-13 9781783287796
Length 362 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Bandlem Limited Bandlem Limited
Author Profile Icon Bandlem Limited
Bandlem Limited
Alex Blewitt Alex Blewitt
Author Profile Icon Alex Blewitt
Alex Blewitt
Arrow right icon
View More author details
Toc

ThreadContextClassLoaders


When a class is requested (either implicitly through a class reference or explicitly with class.forName), the ClassLoader of the calling Class is used. This allows an Applet or an RMI-based application to refer to other classes that have been acquired from a remote site and ensure that they are downloaded from the same location as well.

However, libraries loaded from one ClassLoader cannot necessarily see classes loaded from another ClassLoader.

This often occurs with Object Relational Mapping (ORM) tools such as Hibernate that use configuration files that contain class names. To load the classes, it needs to resolve class names from the application's associated ClassLoader.

If the Hibernate library is installed in the same WAR as the webapp, this will be automatic. However, if Hibernate is stored in the webapp server's global classpath or an extension location, then it won't have visibility to the webapp's ClassLoader.

To solve this (specifically for the benefit of...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image