You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeff Trent <jt...@structsoft.com> on 2001/06/12 20:48:16 UTC

static initialization

I'm having some issues with static member initialization now that I've migrated to Tomcat.

I have a 3rd party library (call it X) that I used in several of my webapps.  X uses a static member to keep configuration information for all of the threads running in its process.  However, I'm finding that all webapps run in the same process space under Tomcat (by default).  Rather then separating out each webapp to run in a separate context by changing the Tomcat configuration, is there some other means I can employ to isolate one X from another?

I am considering chaging X to use getInitialContext() but (a) I'm not sure if this is will work or is the recommended solution for this sort of problem, and (b) Didn't want to clutter X with InitialContext since X has, up to now, been unaware of the context (web server or not) it runs under.

Any recommendations?

Thanks,
Jeff