| Author |
Can't add libraries to shared.loader
|
Guy Yafe
Greenhorn
Joined: Sep 30, 2011
Posts: 11
|
|
Hi all,
I am using the latest Tomcat version: 7.0.30.
I want to add an external library to the class loader, so web applications can use other classes I have written.
I tried adding the path to the shared.loader property in the catalina.properties file, and Tomcat just ignored this property and did not load my classes.
When I added the same path to the common.loader proprty, it worked perfectky and Tomcat loaded all my classes and the application worked well.
Has anyone encountered this problem before?
Is there another property I should set? Maybe I need to explicitly tell Tomcat to use the shared loader?
Thanks,
Guy
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14475
|
|
|
Actually, sharing classes between webapps is not a recommended practice. Webapps are supposed to be self-contained for one thing. Plus a lot of people who try don't address proper thread-safety in their libraries, and shared classes MUST allow for unexpected multi-threading issues.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Guy Yafe
Greenhorn
Joined: Sep 30, 2011
Posts: 11
|
|
Thanks, I am aware of this approach.
Still, I want to have some common libraries for all my applications: User managment (Like BaseUser object) and some Logging utilities.
Is there a way to put these libraries inside the shares.loader property instead of the common.loader?
Guy
|
 |
 |
|
|
subject: Can't add libraries to shared.loader
|
|
|