[PJUG Javamail] Is there a problem of name collision with session attributes in Tomcat??

Sean Adkinson sean.adkinson at gmail.com
Thu Sep 4 13:28:22 EDT 2008


The session is obviously unique per user, so you shouldn't get any conflicts
in that respect.  Could a user with a session in one web application
potential go to another one of your web applications?  Then if their session
isn't being cleared properly, they would still have the sess.cat property of
the first app while browsing in the second app.

I've always used Logger.getLogger(), giving it the class in context, in
order to get the logger I'm using.  If all your different web apps are under
a different package (com.example.app1, com.example.app2, etc) you could
guarantee loggers log disjointly.

- Sean


On Thu, Sep 4, 2008 at 10:07 AM, Rob Tanner <rtanner at linfield.edu> wrote:

>  At least that's the only answer that makes sense.
>
> I have 13 separate web applications running on Tomcat (v5.5.23) and I do
> runtime logging with log4j.  For each application, the log4j.properties file
> is in WEB-INF/classes and the properties file in each case specifies an
> appender path unique for each application.
>
> But here's the problem.  When I look at the runtime.log for one
> application, see numbers of instances of log entries from one of the other
> applications.  I am using Category.getInstance() logging.  Individual
> applications may have a number of servlets but I get the initParameters only
> once and setup log4j only once and then store everything in session
> attributes.
>
> I am consistent in all my applications in storing the Category instance in
> a session attribute called "sess.cat".  What I'm wondering is whether that
> attribute is unique for each session or whether it's global so that its
> contents is whatever it was last set to by any one of the 13 applications.
>
> -- Rob
>
>
> _______________________________________________
> Web Site - http://www.pjug.org/
> Javamail mailing list
> Javamail at pjug.org
> http://www.pjug.org/mailman/listinfo/javamail
>
>


-- 
Sean Adkinson
Web Insight Technology
(503) 731-5488 work, (503) 866-0852 cell
sean.adkinson at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pjug.org/pipermail/javamail/attachments/20080904/6f6a6423/attachment.html 


More information about the Javamail mailing list