Re: non-existent Springbean lazy beans only work when name specified

2009-05-07 Thread Marat Radchenko
Your setup seems to be broken. That's the whole point of nameless @SpringBean/@Resource/@Autowire - to find beans by _type_, not name. Relying on successful injection of beans of wrong type is a bad idea IMO. It'll break as soon as smth in your code tries to invoke that bean. I'd even say that

Re: non-existent Springbean lazy beans only work when name specified

2009-05-07 Thread Antony Stubbs
Sorry, not sure if I was clear enough? I know it's to wire by type, we want that. But the SpringBeanInjector is requesting a name be generated for our 'type' injected bean, which is causing a problem. We are _not_ relying on succesful injection of beans of the wrong type - unless you

non-existent Springbean lazy beans only work when name specified

2009-05-06 Thread Antony Stubbs
I think I've found a potential bug/ area for improvement. We are setting up pure unit tests for a component, and in this test case, although the component declares several @SpringBean's, only 1 is used. Our tests all work fine when we run them against our test spring context, but I wanted