Injected values are only kept valid while the component is executing. They will be dis-injected when then the component is not being used. Remember, it's not simple-minded IOC configuration injection, it is contexual bijection. When the component is active, the component will be linked to the correct contextual value.
Injected values are only kept valid while the component is executing.
Okay, but the component still IS active. It's like
A.actionA() [calls] B.actionB() [calls] A.actionC() [then returns] A.actionA() <-- and here, are fields are empty..
actionA() just calls a method down the stack and upon returning from this method call, all injected values are null?! Isn't that a bit weird? ;)
thanks & greets & a happy new year! ;)
Ah - I misread your original post. This is indeed a bug. http://jira.jboss.com/jira/browse/JBSEAM-631 To work around this for the time being, you can pass a "this" reference from the first component to the second component instead of injecting it.
We are having the same issue, and the work-around is not acceptable (we cannot pass "this" around, as "B" is not always called by "A").