> > We thought this would allow us to monitor all contexts with a
> > single probe install, but it only seems to show a single localhost
> > context. I assume that the hosts are separated, and that the
> > context="priviliged" setting can allow a web app to access other
> > webapps in the same context, but not across hosts.
>
> So... what setting is that?
>
> I meant the crossContext="true" setting. I have searched around, and can
see that both tomcat's manager and probe are not able to monitor virtual
hosts other than the one that they reside in. So I will just have to deploy
manager and/or probe for each virtual host. I just wanted to see everything
in a single place - from what I have read this can't be done


> 1. Move your .war files from out of the webapps directory (and subdirs)
> 2. Update the paths in ROOT.xml and probe.xml to point to the new
>   location
> 3. Remove the "local" and "demos" directories
>
> Thanks for the pointer. What I ended up doing was moving all wars to
<CATALINA_BASE>/notWebapps. Then I unpacked them, and set the relevant
context.xml's docbase to point to the exploded directory. Seems to work
well now

> The only idea I have left if nobody can see an obvious flaw in our
> > logic is to write some custom code to initialise log4j. We would
> > just need to pick up the context, or a jndi variable and then
> > prefix the log file name with this. Guess it can't be that hard -
> > just figured that somebody would have hit this before.
>
> I think that's your best bet.
>
> Yes it was surprisingly easy. We created a subclass of springs
Log4jConfigListener, and then prefix the file parameter of any file
appenders. We set the web.xml value to blank, which is ignored, and then
when required we can override it in context.xml. Thanks for the pointer

> I recall that Mark Thomas mentioned something in a recent response
> > about looking for some code in tomcat source where it allowed
> > different contexts to register with JMX using different ports. I
> > looked and can't find it - always hard to google for something if
> > you don't know the term. Can anyone provide a pointer to if there
> > is an existing variable containing a context id, or path, or name
> > or something unique that we could use to prefix the log file - or
> > is it just easier to setup our own context parameter?
>
> I'm not sure that using JMX is going to make your life any easier.
>

I thought that via some internal to tomcat mechanism, I would be able to
detect which context I was in, and thus be able to use that to drive the
prefix for the log file, rather than having to have a specific web.xml
setting that each context overrides.

Thanks for you quick and detailed reply

Chris

Reply via email to