[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Tue Dec 19 16:49:29 EST 2006
User: gavin
Date: 06/12/19 16:49:29
Modified: src/main/org/jboss/seam/contexts Lifecycle.java
Log:
fix bug JBSEAM-618
Revision Changes Path
1.74 +19 -5 jboss-seam/src/main/org/jboss/seam/contexts/Lifecycle.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Lifecycle.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/Lifecycle.java,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- Lifecycle.java 16 Dec 2006 16:05:20 -0000 1.73
+++ Lifecycle.java 19 Dec 2006 21:49:29 -0000 1.74
@@ -30,7 +30,7 @@
/**
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.73 $
+ * @version $Revision: 1.74 $
*/
public class Lifecycle
{
@@ -227,10 +227,7 @@
log.debug("destroying conversation contexts: " + conversationIds);
for (String conversationId: conversationIds)
{
- ServerConversationContext conversationContext = new ServerConversationContext(session, conversationId);
- Contexts.conversationContext.set(conversationContext);
- Contexts.destroy(conversationContext);
- Contexts.conversationContext.set(null);
+ destroyConversationContext(session, conversationId);
}
Context tempConversationContext = new MapContext(ScopeType.CONVERSATION);
@@ -459,4 +456,21 @@
return attribute instanceof Mutable && ( (Mutable) attribute ).clearDirty();
}
+ public static void destroyConversationContext(ContextAdaptor session, String conversationId)
+ {
+ ServerConversationContext conversationContext = new ServerConversationContext(session, conversationId);
+ Context old = Contexts.getConversationContext();
+ Contexts.conversationContext.set(conversationContext);
+ try
+ {
+ Contexts.destroy( conversationContext );
+ conversationContext.clear();
+ conversationContext.flush();
+ }
+ finally
+ {
+ Contexts.conversationContext.set(old);
+ }
+ }
+
}
More information about the jboss-cvs-commits
mailing list