[jboss-user] [Microcontainer] - Re: POJO thread safety
do-not-reply at jboss.com
Wed Feb 20 13:07:04 EST 2008
"david.lloyd at jboss.com" wrote : Actually one more question - are the locks held when doing auto-wiring and injection and that sort of thing?
Yup, a read lock.
"david.lloyd at jboss.com" wrote :
| In other words, if I have beans A and B, and I want a property from A to be injected into B, will the same lock be held that is used to change states during the injection? I'm concerned more about memory visibility than locking here.
We try to unlock/re-lock things as much as possible, to not keep things in waiting for unnecessary reasons.
But we do make sure things are consistent, applying write/read locks where needed.
See AbstractController.incrementState for such unlocking usage.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130884#4130884
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130884
More information about the jboss-user