myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r512176 - in /myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation: Conversation.java ConversationContext.java ConversationManager.java
Date Tue, 27 Feb 2007 08:31:36 GMT
Author: imario
Date: Tue Feb 27 00:31:35 2007
New Revision: 512176

URL: http://svn.apache.org/viewvc?view=rev&rev=512176
Log:
in conversation, store the conversation context reference instead of the manager reference
to avoid unnecessary facesContext lookups which is not working within the timeout thread.

Modified:
    myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/Conversation.java
    myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationContext.java
    myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationManager.java

Modified: myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/Conversation.java
URL: http://svn.apache.org/viewvc/myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/Conversation.java?view=diff&rev=512176&r1=512175&r2=512176
==============================================================================
--- myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/Conversation.java
(original)
+++ myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/Conversation.java
Tue Feb 27 00:31:35 2007
@@ -61,7 +61,7 @@
 
 	private final Map beans = new TreeMap();
 
-	private final ConversationManager manager;
+	private final ConversationContext conversationContext;
 
 	private boolean invalid = false;
 	private boolean queueInvalid = false;
@@ -71,9 +71,9 @@
 	private Object activeCountMutex = new Object();
 	private int activeCount;
 
-	protected Conversation(String name, ConversationManager manager)
+	protected Conversation(String name, ConversationContext conversationContext)
 	{
-		this.manager = manager;
+		this.conversationContext = conversationContext;
 		this.name = name;
 
 		if (log.isDebugEnabled())
@@ -179,10 +179,10 @@
 	public Conversation invalidateAndRestart()
 	{
 		String conversationName = getName();
-		
+
 		destroy();
 
-		return manager.startConversation(conversationName);
+		return conversationContext.startConversation(conversationName);
 	}
 
 	/**
@@ -233,7 +233,7 @@
 		}
 		beans.clear();
 
-		manager.removeConversation(getName());
+		conversationContext.removeConversation(getName());
 	}
 
 	/**

Modified: myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationContext.java
URL: http://svn.apache.org/viewvc/myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationContext.java?view=diff&rev=512176&r1=512175&r2=512176
==============================================================================
--- myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationContext.java
(original)
+++ myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationContext.java
Tue Feb 27 00:31:35 2007
@@ -103,7 +103,7 @@
 			Conversation conversation = (Conversation) conversations.get(name);
 			if (conversation == null)
 			{
-				conversation = new Conversation(name, manager);
+				conversation = new Conversation(name, this);
 				conversations.put(name, conversation);
 			}
 			return conversation;

Modified: myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationManager.java?view=diff&rev=512176&r1=512175&r2=512176
==============================================================================
--- myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationManager.java
(original)
+++ myfaces/fusion/trunk/core/src/main/java/org/apache/myfaces/fusion/conversation/ConversationManager.java
Tue Feb 27 00:31:35 2007
@@ -59,6 +59,7 @@
 	private final Map conversationContexts = new HashMap();
 
 	private ConversationMessager conversationMessager;
+
 	private Set managedScopes;
 
 	private class ConversationWiperThread extends Thread



Mime
View raw message