Post details: Java Class Loaders
2005-04-26
Java Class Loaders
Here are some tricks you can perform with your own class loaders:
- search a database instead of a filesystem for classes
- load different classes with the same fully-qualified name
- swap your classes with new versions at runtime
- load classes before you need them
JDK 1.4 + Tomcat Normal Edition + your own XML parser
... your web applications will not be using JDK 1.4 XML parser, but Tomcat's Xerces parser instead.
If you want to use your own XML parser shared across multiple web applications, you could place it in the shared class loader path, but because the common class loader is higher in the delegation chain, Tomcat's parser will be used first.
To solve this problem you could either use ... or move xerces.jar from the common class loader path to the system class loader path, which would make it available to Tomcat but invisible to your application.
More reading:
- ClassLoader JavaDoc
- JavaGeeks papers section - has a few white papers related to class loaders.
From Professional Apache Tomcat book.
Comments, Pingbacks:
This post has 4 feedbacks awaiting moderation...
Leave a comment:
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
Search
Gallery
www.flickr.com
|
Categories
Archives
- February 2011 (1)
- September 2010 (1)
- October 2009 (1)
- March 2009 (2)
- February 2009 (4)
- January 2009 (2)
- December 2008 (2)
- November 2008 (5)
- October 2008 (10)
- August 2008 (1)
- July 2008 (4)
- June 2008 (1)
- More...
- more...

