Thanks it works for private fields with ALL, and I'll get rid of the tests for private
methods, setters and constructors.
"alesj" wrote :
| Wrt JSR330 I wouldn't follow all their rules,
| I would mostly use its annotations to unify the usage,
| hence increase portability.
|
Do you think I should implement @Scope and @Singleton?
| public class SimpleFieldBean
| {
| @Inject
| public Simple field;
|
| @Inject
| public Simple other;
| }
|
The way this is described is that in my original SimpleFieldBean example, if Simple has no
annotations a new instance is injected for each use, i.e. field != other. If Simple has a
@Scope annotated annotation, such as @Singleton, the same instance is injected, so field
== other, which in effect is what we have now.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266025#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...