You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by Marcus Brito <mb...@gmail.com> on 2004/07/19 18:37:01 UTC

autowire-services and error reporting

The newly-added autowire-services is really a great boon; this will
greatly reduce configuration files and save lots of typing... but
maybe considering that _every_ interface may be a service is a bit too
eager. Just think about CharSequence, Serializable, Collection and
other commonly used core interfaces.

Possible immediate solution: BuilderFactory should automatically
disconsider interfaces in the java.* packages. It's very unlikely to
have a business service typed as one of the core packages. javax.*
should be still considered: javax.sql.DataSource is a perfect
candidate for a service, as many other interfaces in SPI packages.

I'm just worried about logging too many obviously harmless errors:
while informative at first, it gets annoying when you see hundreds of
messages telling you that hivemind couldn't find a service
implementing the java.lang.CharSequence interface. Duh.

Guess what goes attached?

-- Marcus Brito

Re: autowire-services and error reporting

Posted by Marcus Brito <mb...@gmail.com>.
Yep, the two rules currently in place already limit quite a lot
problem cases. I just thought about adding one more common sense rule.
Talking about common sense, shouldn't the message when a service can't
be found logged just as a warning, instead of an error? Leaving this
as an error might lead the user to disable error-level logging for the
BuilderFactoryLogic class, hiding real error messages later.

-- Marcus

On Mon, 19 Jul 2004 15:30:59 -0400, Howard Lewis Ship <hl...@gmail.com> wrote:
> A few more common-sense filters would be fine; again, it has to be an
> interface, and there has to be a writable property. Those two rules do
> limit quite a few problem cases.
> 
> 
> 
> On Mon, 19 Jul 2004 13:37:01 -0300, Marcus Brito <mb...@gmail.com> wrote:
> > The newly-added autowire-services is really a great boon; this will
> > greatly reduce configuration files and save lots of typing... but
> > maybe considering that _every_ interface may be a service is a bit too
> > eager. Just think about CharSequence, Serializable, Collection and
> > other commonly used core interfaces.
> >
> > Possible immediate solution: BuilderFactory should automatically
> > disconsider interfaces in the java.* packages. It's very unlikely to
> > have a business service typed as one of the core packages. javax.*
> > should be still considered: javax.sql.DataSource is a perfect
> > candidate for a service, as many other interfaces in SPI packages.
> >
> > I'm just worried about logging too many obviously harmless errors:
> > while informative at first, it gets annoying when you see hundreds of
> > messages telling you that hivemind couldn't find a service
> > implementing the java.lang.CharSequence interface. Duh.
> >
> > Guess what goes attached?
> >
> > -- Marcus Brito
> >
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
>

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


Re: autowire-services and error reporting

Posted by Howard Lewis Ship <hl...@gmail.com>.
A few more common-sense filters would be fine; again, it has to be an
interface, and there has to be a writable property. Those two rules do
limit quite a few problem cases.

On Mon, 19 Jul 2004 13:37:01 -0300, Marcus Brito <mb...@gmail.com> wrote:
> The newly-added autowire-services is really a great boon; this will
> greatly reduce configuration files and save lots of typing... but
> maybe considering that _every_ interface may be a service is a bit too
> eager. Just think about CharSequence, Serializable, Collection and
> other commonly used core interfaces.
> 
> Possible immediate solution: BuilderFactory should automatically
> disconsider interfaces in the java.* packages. It's very unlikely to
> have a business service typed as one of the core packages. javax.*
> should be still considered: javax.sql.DataSource is a perfect
> candidate for a service, as many other interfaces in SPI packages.
> 
> I'm just worried about logging too many obviously harmless errors:
> while informative at first, it gets annoying when you see hundreds of
> messages telling you that hivemind couldn't find a service
> implementing the java.lang.CharSequence interface. Duh.
> 
> Guess what goes attached?
> 
> -- Marcus Brito
> 
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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