[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Thu Nov 16 08:19:08 EST 2006
User: gavin
Date: 06/11/16 08:19:08
Modified: src/main/org/jboss/seam/contexts
ServerConversationContext.java
Log:
JBSEAM-167, JBSEAM-381
Revision Changes Path
1.16 +10 -4 jboss-seam/src/main/org/jboss/seam/contexts/ServerConversationContext.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ServerConversationContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/ServerConversationContext.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- ServerConversationContext.java 27 Oct 2006 13:58:54 -0000 1.15
+++ ServerConversationContext.java 16 Nov 2006 13:19:08 -0000 1.16
@@ -16,6 +16,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.Seam;
+import org.jboss.seam.annotations.PerNestedConversation;
import org.jboss.seam.core.Events;
import org.jboss.seam.core.Manager;
@@ -25,7 +26,7 @@
*
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.15 $
+ * @version $Revision: 1.16 $
*/
public class ServerConversationContext implements Context {
@@ -92,10 +93,13 @@
}
else
{
- for ( String id: stack )
+ for ( int i=0; i<stack.size(); i++ )
{
+ String id = stack.get(i);
result = session.getAttribute( getKey(name, id) );
- if (result!=null) return result;
+ boolean found = result!=null &&
+ ( i==0 || !result.getClass().isAnnotationPresent(PerNestedConversation.class) );
+ if (found) return result;
}
return null;
}
@@ -167,7 +171,9 @@
/**
* Propagate additions and removals to the HttpSession if
* the current conversation is long-running, or remove all
- * attributes if it is a temporary conversation.
+ * attributes if it is a temporary conversation. This work
+ * may only be done at the end of the request, since we
+ * don't know for sure the conversation id until then.
*/
public void flush()
{
More information about the jboss-cvs-commits
mailing list