Hi All!
I am trying to debug a verdor's app and it is giving me errors and exceptions at some points..
(This questions a bit different from the previous one i asked so I am making a new topic so as to not confuse)
I would like to ask a conceptual question about auto wiring.
I have a class User that extends a class Profile that extends another class Operations that has an @AutoWired User user;
So its like this
Code:@Component("user") @Scope("session") public class User extends Profile { } //No @Component or any annotation public class Profile { @Autowired private Operations operations; } @Component("operations") public class Operations { @Autowired private User user; @Autowired private LoginDao logindao }
Is it possible? a User has a property that has a property User. I know it is possible because it is a working code, but I think its recursively having the same object within itself. Should it not send me into a memory usage issue????
OR : When you Autowire a component you are actually referencing to it and it does not become part of the actual object ? I was under the impression that when you Autowire a component its actually a property of that object and Autowiring is only to populate it with respective values with whatever component its wired with. Am I wrong?
How can I prove my own assumptions or the other way?
thanks
Syed...


Reply With Quote