From: RobJellinghaus <do-...@jb...> - 2005-12-30 05:27:46
|
"gav...@jb..." wrote : anonymous wrote : First, it looks like the transition object is only @In, not @In @Out. But it's pretty clear that myActionListener is trying to communicate some state outwards to the conversation. So why not @Out also? Or is @Out only for cases where new contextual objects might be outjected (as opposed to just side-effecting existing ones)? | | Right, this is a byvalue/byreference question. You can change the state of an @In-jected object by calling its method. This is not side-effecty. It is how any variable in Java works :-) Ya, I know. But it makes @Out seem kind of pointless. Why not do everything with side-effects? In other words, if @In(create="true") suffices to create a seam component and inject it, why not just do @In(create="true") and then side-effect away? The Seam documentation says this in chap. 4: Note that it is quite common for these annotations to occur together, for example: | @In(create=true) @Out private User currentUser; This is exactly what I'm talking about. What is the point of @Out here? It seems like just as much of a no-op as my use of @Out for the jBPM state, since the component will be created by @In(create=true) and then just put back by the @Out. There's something I'm missing here, but what? anonymous wrote : By definition, there is a unique instance of the Seam component named "transition" in your conversation context. It don't matter how many times you inject it, it will always be the same one. Until you switch conversations, that is ;-) Where's that documented? I would've expected it in chapter 5 of the 1.0alpha reference docs, but didn't see it anywhere...? Cheers! Rob View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914883#3914883 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914883 |