On 2/4/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
I was thinking it would be nice if client code could call use the OpenEJB injection facilities. Say you have some unit tests. You could in the setUp method, lookup a bunch of stuff in JNDI and write it into fields, but it would be much nicer to simple annotate your fields and have OpenEJB inject directly. I'm thinking of something like this:public class SomeTest extends TestCase { @Resource private SomeEjb someEjb; public void setUp() { OpenEJB.inject(this); } } I can think of a bunch of ways we could implement this, but what do you think of the idea generally?
Yeah, that would be of help. There's one caveat with it. When I first read the email of yours I couldn't see the point because of the name which would perform the injection. That's what the method would do, wouldn't it? So why it isn't called performInjection or doInjection or alike? Other than that the idea's excellent. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
