On Fri, May 29, 2009 at 10:00 AM, Pete Muir <pmuir(a)bleepbleep.org.uk> wrote:
Yeah, the split is un-obvious (esp due to naming), but we wanted a
we could use inside the RI, that didn't have the producer method on it....
So I'm wondering, what should the standard signature of this injection be?
Always a field injection (as opposed to a constructor injection)? What about
access (package or private)?
private @Logger Log log;
The reason I ask about access (and constructor injection) is because this
could be the one pain in the side to unit testing a bean. Package access
just makes it easier to inject a stub. What would be interesting is if the
field could be seeded with a stub so that the logger just works in a unit
private @Logger Log log = new NoOpLogImpl();
The injection would overwrite this value. Just an idea.
Senior Software Engineer, Red Hat | Author of Seam in Action
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.