<div class="gmail_quote">On Fri, May 29, 2009 at 10:00 AM, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">Yeah, the split is un-obvious (esp due to naming), but we wanted a module we could use inside the RI, that didn&#39;t have the producer method on it....</div></blockquote><div><br>So I&#39;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)?<br>
<br>private @Logger Log log;<br><br>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 test.<br>
<br>private @Logger Log log = new NoOpLogImpl();<br><br>The injection would overwrite this value. Just an idea.<br><br>-Dan<br></div></div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>
<br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br>
<br>NOTE: While I make a strong effort to keep up with my email on a daily<br>basis, personal or other work matters can sometimes keep me away<br>from my email. If you contact me, but don&#39;t hear back for more than a week,<br>
it is very likely that I am excessively backlogged or the message was<br>caught in the spam filters.  Please don&#39;t hesitate to resend a message if<br>you feel that it did not reach my attention.<br>