On 27/02/2012 22:23, Aristedes Maniatis wrote:
> On 28/02/12 12:14 AM, Christopher Schultz wrote:
> Chuck,
> 
> On 2/26/12 11:29 PM, Caldarale, Charles R wrote:
>>>>> From: Aristedes Maniatis [mailto:amania...@apache.org] Subject:
>>>>> Re: parallel deployment: multiple applications responding
>>>>
>>>>> What happens if our application defines a static class or other
>>>>> resource?
>>>>
>>>> Not sure what you mean by "static class", unless you're referring
>>>> to an inner class.  Regardless, each parallel deployment uses a
>>>> separate classloader, so the webapp instances cannot interfere
>>>> with each other.
> 
> I'm sure he means a class with a static method that returns a shared
> object (aka singleton, etc.).
> 
>> Yes of course. I mispoke earlier.
> 
> 
>>>> However, if you've placed classes in a shared library (e.g.,
>>>> Tomcat's lib directory), anything in there will be shared by all
>>>> webapps.  You must be very, very careful when utilizing shared
>>>> classes, since that can easily lead to unexpected data leakage
>>>> between webapps (not to mention often making it impossible to
>>>> undeploy them).
> 
> Yes, but I would be very surprised if one could cause a different
> webapp to service a request by doing such a thing. What you might be
> able to do is get the request *logged* to the wrong webapp, if you
> were fetching references (say, to the ServletContext) and caching them
> in the (shared) class, then calling ServletContext.log on them.
> 
> Aristedes, can you describe in a bit more detail the kinds of things
> you are doing, here?
> 
> Also, what kind of logging are you using that suggests your requests
> are being handled by the wrong webapp? What does JMX have to say about
> the number of active sessions? (You said that the 'manager' webapp
> shows a status for the webapp, so you are probably using that session
> count in your reports, here, but I just wanted to check).
> 
> 
>> I'll focus on trying to get some better logging of the session into the
>> log output and see if we can narrow down the symptoms. Yes, I am using
>> JMX and the Manager app to identify when there are no remaining
>> sessions, and when I therefore should expect to see no further activity
>> at all from the older application. I'll try and get some better
>> information around that by adding logging as you suggest.
> 
>> The logging that we did originally to discover this problem was simple:
> 
>> * sessionless application
>> * we changed the log.properties for log4j in the new app
>> * some hours after we deployed, the old-style log entries were still
>> being written, mixed in with the new ones

Aristedes,

Did you manage to resolve the problem or narrow down on what is actually
happening?


p

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to