You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Stefano Bagnara <ap...@bago.org> on 2008/09/01 15:30:39 UTC

Re: [jira] Commented: (JSIEVE-16) Singletons -> IoC

Robert Burrell Donkin ha scritto:
> On Sun, Aug 31, 2008 at 6:13 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin ha scritto:
>>> On Sun, Aug 31, 2008 at 2:59 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>>> Robert Burrell Donkin (JIRA) ha scritto:
>>>>>  * Entry point:
>>>>>  * SieveFactory
>>>> This should only be used to wire together the default implementations,
>>>> otherwise direct objects wiring should be allowed for
>>>> extensibility/integration.
>>> i see no reason why SieveFactory needs to be coupled to the default
>>> implementations. the factory should be either abstract or an interface
>>> and loaded by the configuration.
>> My think is that if it is an entry point it cannot be abstract or an
>> interface. The entry point is the object I instantiate to use sieve (in my
>> terms).
>> But I guess here we are simply using different terms. It's better I wait and
>> look at how you will change code and maybe I should better speak with code
>> in reply :-)
> 
> SieveFactory is currently the (badly named) entry point. it might be
> better to have a proper factory as the entry point.

Make sense.

>>> i'm not sure it's worthwhile to create yet another logger bridge in
>>> this case. injecting a JCL log is probably good enough.
>> My issue with JCL injecting is that Logger does not have a getChildLogger.
> 
> yes - that's probably the biggest mistake we made when creating the
> API. then again, the JEE specifications weren't broken at that time so
> it didn't seem necessary to cater for injecting loggers.

OT: why not to starting a commons-logging 2.0 that has this feature?

>> So if you inject a JCL logger you can't have different names in the various
>> components.
> 
> jsieve doesn't need this functionality

Ok. Then plain commons logging is ok.

>> Furthermore there are many people not happy with commons-logging, and they
>> often don't understand the difference between injected commons-logging and
>> static commons-logging usage. The bad name for loggers born by their static
>> usage.
> 
> i strongly suspect that JCL is the most widely used library in java.
> lots of people whinge but everyone uses it. the JEE specifications are
> mutally incompatible when it comes to classloaders. this makes it
> impossible to fix JCL or come up with anything better than it that is
> compatible with both the servlet and enterprise specifications.
> 
> it's problems are well known as are the workarounds. alternative
> solutions often have better reputations because no one really uses
> them.
> 
> the JCP is absolutely culpable for the whole mess. they refused to
> invite ceki onto the expert group for java.util.logging and so forced
> people to choose between log4j and java.util.logging. this forced JCL
> to be created. the JCP then decided that it was more important that
> JEE engines could do whatever they want with classloaders than
> consistency with the Java2 or servlet specifications. this caused the
> classloading hell with JCL and made it impossible to fix for both
> servlet containers and JEE containers.

Interesting summary. Didn't know the history of things. Thank you!

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: getChildLogger (Was: [jira] Commented: (JSIEVE-16) Singletons -> IoC)

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Tue, Sep 2, 2008 at 8:55 AM, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin ha scritto:
>>> On Mon, Sep 1, 2008 at 2:30 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>>> Robert Burrell Donkin ha scritto:
>>>>> On Sun, Aug 31, 2008 at 6:13 PM, Stefano Bagnara <ap...@bago.org>
>>>>> wrote:
>>>>>> Robert Burrell Donkin ha scritto:
>>> <snip>
>>>
>>>>>>> i'm not sure it's worthwhile to create yet another logger bridge in
>>>>>>> this case. injecting a JCL log is probably good enough.
>>>>>> My issue with JCL injecting is that Logger does not have a
>>>>>> getChildLogger.
>>>>> yes - that's probably the biggest mistake we made when creating the
>>>>> API. then again, the JEE specifications weren't broken at that time so
>>>>> it didn't seem necessary to cater for injecting loggers.
>>>> OT: why not to starting a commons-logging 2.0 that has this feature?
>>> 1. ceki already did
>> Do you speak about ILoggerFactory in slf4j or something else?
> 
> slf4j

I've read something, and I think it is a pity that is has been 
implemented as a separated interface.

A ChildGeneratingLogger spi like the LocationAwareLogger would have been 
much better, IMHO.
http://www.slf4j.org/api/org/slf4j/spi/LocationAwareLogger.html

But I admit I may miss something and Ceki arguments are often very 
convincing!

>>> 2. JCL's good enough so nothing else is ever to reach critical mass
>> Joerg Hohwiller crusade to add a new extended interface for the Ioc friendly
>> logger (e.g: IoCLogger) was not so bad.
>> This could have been easy even in a minor release and it could have been
>> added to api only at first.
> 
> there wasn't any realistic way to add it without breaking
> compatibility. we analysed many permutations but in the JCL2.0 was
> never going to fly,
> 
>>> 3. really the JCP should just get ceki to create a decent logging API
>> true, but I don't expect a "java.util.newlogging" ever..
> 
> all it requires is energy
> 
>>> 4. i've wasted too many hundreds of hours on logging already
>> I understood this while looking markmail for this getChildLogger issue!
>> Thank you!
>>
>> Interesting! It's cool to know that someone else see things like me :-)
>>
>> http://markmail.org/message/4hlquicqcyovfv6a
>> http://markmail.org/message/ynsu2uutkh2z7mfp
>>
>> Expecially http://markmail.org/message/3lnqomomugq3xyec
>>
>> I see at the end of 2005 there was a patch to add getChildLogger and a
>> discussion about releasing and then add it, but I didn't found what happened
>> then. I guess it simply died or you found blocking issues... it's a pity.
> 
> it would have required a major version increment. the collections hell
> was bad but JCL would have been much, much worse. better to leave the
> field clear for ceki.

Thank you again for the explanation/revival.

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: getChildLogger (Was: [jira] Commented: (JSIEVE-16) Singletons -> IoC)

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Tue, Sep 2, 2008 at 8:55 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>>
>> On Mon, Sep 1, 2008 at 2:30 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>>
>>> Robert Burrell Donkin ha scritto:
>>>>
>>>> On Sun, Aug 31, 2008 at 6:13 PM, Stefano Bagnara <ap...@bago.org>
>>>> wrote:
>>>>>
>>>>> Robert Burrell Donkin ha scritto:
>>
>> <snip>
>>
>>>>>> i'm not sure it's worthwhile to create yet another logger bridge in
>>>>>> this case. injecting a JCL log is probably good enough.
>>>>>
>>>>> My issue with JCL injecting is that Logger does not have a
>>>>> getChildLogger.
>>>>
>>>> yes - that's probably the biggest mistake we made when creating the
>>>> API. then again, the JEE specifications weren't broken at that time so
>>>> it didn't seem necessary to cater for injecting loggers.
>>>
>>> OT: why not to starting a commons-logging 2.0 that has this feature?
>>
>> 1. ceki already did
>
> Do you speak about ILoggerFactory in slf4j or something else?

slf4j

>> 2. JCL's good enough so nothing else is ever to reach critical mass
>
> Joerg Hohwiller crusade to add a new extended interface for the Ioc friendly
> logger (e.g: IoCLogger) was not so bad.
> This could have been easy even in a minor release and it could have been
> added to api only at first.

there wasn't any realistic way to add it without breaking
compatibility. we analysed many permutations but in the JCL2.0 was
never going to fly,

>> 3. really the JCP should just get ceki to create a decent logging API
>
> true, but I don't expect a "java.util.newlogging" ever..

all it requires is energy

>> 4. i've wasted too many hundreds of hours on logging already
>
> I understood this while looking markmail for this getChildLogger issue!
> Thank you!
>
> Interesting! It's cool to know that someone else see things like me :-)
>
> http://markmail.org/message/4hlquicqcyovfv6a
> http://markmail.org/message/ynsu2uutkh2z7mfp
>
> Expecially http://markmail.org/message/3lnqomomugq3xyec
>
> I see at the end of 2005 there was a patch to add getChildLogger and a
> discussion about releasing and then add it, but I didn't found what happened
> then. I guess it simply died or you found blocking issues... it's a pity.

it would have required a major version increment. the collections hell
was bad but JCL would have been much, much worse. better to leave the
field clear for ceki.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


getChildLogger (Was: [jira] Commented: (JSIEVE-16) Singletons -> IoC)

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Mon, Sep 1, 2008 at 2:30 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin ha scritto:
>>> On Sun, Aug 31, 2008 at 6:13 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>>> Robert Burrell Donkin ha scritto:
> 
> <snip>
> 
>>>>> i'm not sure it's worthwhile to create yet another logger bridge in
>>>>> this case. injecting a JCL log is probably good enough.
>>>> My issue with JCL injecting is that Logger does not have a
>>>> getChildLogger.
>>> yes - that's probably the biggest mistake we made when creating the
>>> API. then again, the JEE specifications weren't broken at that time so
>>> it didn't seem necessary to cater for injecting loggers.
>> OT: why not to starting a commons-logging 2.0 that has this feature?
> 
> 1. ceki already did

Do you speak about ILoggerFactory in slf4j or something else?

> 2. JCL's good enough so nothing else is ever to reach critical mass

Joerg Hohwiller crusade to add a new extended interface for the Ioc 
friendly logger (e.g: IoCLogger) was not so bad.
This could have been easy even in a minor release and it could have been 
added to api only at first.

> 3. really the JCP should just get ceki to create a decent logging API

true, but I don't expect a "java.util.newlogging" ever..

> 4. i've wasted too many hundreds of hours on logging already

I understood this while looking markmail for this getChildLogger issue!
Thank you!

Interesting! It's cool to know that someone else see things like me :-)

http://markmail.org/message/4hlquicqcyovfv6a
http://markmail.org/message/ynsu2uutkh2z7mfp

Expecially http://markmail.org/message/3lnqomomugq3xyec

I see at the end of 2005 there was a patch to add getChildLogger and a 
discussion about releasing and then add it, but I didn't found what 
happened then. I guess it simply died or you found blocking issues... 
it's a pity.

Stefano

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [jira] Commented: (JSIEVE-16) Singletons -> IoC

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, Sep 1, 2008 at 2:30 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>>
>> On Sun, Aug 31, 2008 at 6:13 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>>
>>> Robert Burrell Donkin ha scritto:

<snip>

>>>> i'm not sure it's worthwhile to create yet another logger bridge in
>>>> this case. injecting a JCL log is probably good enough.
>>>
>>> My issue with JCL injecting is that Logger does not have a
>>> getChildLogger.
>>
>> yes - that's probably the biggest mistake we made when creating the
>> API. then again, the JEE specifications weren't broken at that time so
>> it didn't seem necessary to cater for injecting loggers.
>
> OT: why not to starting a commons-logging 2.0 that has this feature?

1. ceki already did
2. JCL's good enough so nothing else is ever to reach critical mass
3. really the JCP should just get ceki to create a decent logging API
4. i've wasted too many hundreds of hours on logging already

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org