You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by peter royal <pr...@apache.org> on 2007/05/31 04:07:43 UTC

Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
> Made ExecutorFilter.logger non-static for easier tracking of class  
> loader issues

curious as to how this helps?

-pete


-- 
proyal@apache.org - http://fotap.org/~osi




Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by Maarten Bosteels <mb...@gmail.com>.
Until 'static' is removed from all loggers, it might be best to advise users


* to avoid putting mina jars in a shared classpath ( like for example
${tomcat_home}/shared/lib/ )
* to avoid putting slf4j jars in a shared classpath

In general, I would advise against using the shared classpath at all.

Maarten

On 5/31/07, Trustin Lee <tr...@gmail.com> wrote:
>
> On 5/31/07, peter royal <pr...@apache.org> wrote:
> > On May 30, 2007, at 9:24 PM, Trustin Lee wrote:
> > > On 5/31/07, peter royal <pr...@apache.org> wrote:
> > >> On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
> > >> > Made ExecutorFilter.logger non-static for easier tracking of class
> > >> > loader issues
> > >>
> > >> curious as to how this helps?
> > >
> > > http://wiki.apache.org/jakarta-commons/Logging/StaticLog
> > >
> > > To be strict, it doesn't help tracking the problem but removes the
> > > problem.
> >
> > from reading that, sounds like we should remove 'static' from all
> > loggers?
>
> It is recommended to do so, but certain classes that is created very
> often could be excluded to avoid excessive memory consumption.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by Stefano Bagnara <ap...@bago.org>.
Trustin Lee ha scritto:
> On 5/31/07, peter royal <pr...@apache.org> wrote:
>> from reading that, sounds like we should remove 'static' from all
>> loggers?
> 
> It is recommended to do so, but certain classes that is created very
> often could be excluded to avoid excessive memory consumption.

I often use dependency injection to inject loggers in child classes in
this cases instead of using static loggers.
The factory/parent of the objects created too often creates a logger for
them and pass it to them as an argument.

I also add a getLogger that check if "logger" is not null, otherwise
creates its own logger. This way I'm sure that if no one inject the
logger I don't throw an NPE.

Stefano


Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by Trustin Lee <tr...@gmail.com>.
On 5/31/07, peter royal <pr...@apache.org> wrote:
> On May 30, 2007, at 9:24 PM, Trustin Lee wrote:
> > On 5/31/07, peter royal <pr...@apache.org> wrote:
> >> On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
> >> > Made ExecutorFilter.logger non-static for easier tracking of class
> >> > loader issues
> >>
> >> curious as to how this helps?
> >
> > http://wiki.apache.org/jakarta-commons/Logging/StaticLog
> >
> > To be strict, it doesn't help tracking the problem but removes the
> > problem.
>
> from reading that, sounds like we should remove 'static' from all
> loggers?

It is recommended to do so, but certain classes that is created very
often could be excluded to avoid excessive memory consumption.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by Teste <sc...@altriz.com.br>.
----- Original Message ----- 
From: "peter royal" <pr...@apache.org>
To: <de...@mina.apache.org>
Sent: Thursday, May 31, 2007 1:45 AM
Subject: Re: svn commit: r543013 -
/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilte
r.java


> On May 30, 2007, at 9:24 PM, Trustin Lee wrote:
> > On 5/31/07, peter royal <pr...@apache.org> wrote:
> >> On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
> >> > Made ExecutorFilter.logger non-static for easier tracking of class
> >> > loader issues
> >>
> >> curious as to how this helps?
> >
> > http://wiki.apache.org/jakarta-commons/Logging/StaticLog
> >
> > To be strict, it doesn't help tracking the problem but removes the
> > problem.
>
> from reading that, sounds like we should remove 'static' from all
> loggers?
>
> -pete
>
>
> -- 
> proyal@apache.org - http://fotap.org/~osi
>
>
>
>


Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by peter royal <pr...@apache.org>.
On May 30, 2007, at 9:24 PM, Trustin Lee wrote:
> On 5/31/07, peter royal <pr...@apache.org> wrote:
>> On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
>> > Made ExecutorFilter.logger non-static for easier tracking of class
>> > loader issues
>>
>> curious as to how this helps?
>
> http://wiki.apache.org/jakarta-commons/Logging/StaticLog
>
> To be strict, it doesn't help tracking the problem but removes the  
> problem.

from reading that, sounds like we should remove 'static' from all  
loggers?

-pete


-- 
proyal@apache.org - http://fotap.org/~osi




Re: svn commit: r543013 - /mina/trunk/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java

Posted by Trustin Lee <tr...@gmail.com>.
On 5/31/07, peter royal <pr...@apache.org> wrote:
> On May 30, 2007, at 6:43 PM, trustin@apache.org wrote:
> > Made ExecutorFilter.logger non-static for easier tracking of class
> > loader issues
>
> curious as to how this helps?

http://wiki.apache.org/jakarta-commons/Logging/StaticLog

To be strict, it doesn't help tracking the problem but removes the problem.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6