On 28/02/12 12:14 AM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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


Thanks for your suggestions, I'll investigate a few more things and get better 
information. At least I know this isn't some simple newbie known issue.

Cheers
Ari



- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9LgbUACgkQ9CaO5/Lv0PBYoACfSFRbddQN1BNkBT5Q4GzhP2zA
o4MAnRZVmV0mhFOj7Wu94JX76nbV9DFB
=ugoA
-----END PGP SIGNATURE-----

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


--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

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

Reply via email to