Am Samstag, den 19.03.2011, 19:26 -0400 schrieb Pulkit Singhal:
> Hello,
> 
> Is there a hook exposed in tomcat such that a custom class can be
> introduced to do some work at a point where we have a list of the
> docBase attribute for all the web applications that will be hosted by
> this tomcat instance ... while one of the web application specific
> handling has begun yet?
> 
> I 'm asking this for any tomcat version, starting with 5.x, 6.x or 7.x
> ... I don't care.
> 
> The motivation behind this question is a bit wordy so I don't want to
> take everyone off topic by posting it here ... but if you are
> interested in reading you can refer to this link:
> http://pulkitsinghal.blogspot.com/2011/03/idea-day-scan-for-shared-webapp.html
There may be such a hook, but I don't think it would be a good idea to
use it for your usecase.

There are reasons why the web-app class loader and commons loader are
not the same. Only the developer can really decide if jar's can be
shared.

Take for example log4j. You will find it in many web-apps, but if you
try to put it into your common class loader, it will only be initialized
by the first web-app. The other web-apps will be able to use it, though.
But you will get strange results.

Any globally shared ressource, such as static variables or Singletons
will get you in trouble.

So: Don't do it.

Regards
 Felix
> 
> Thanks!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to