You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2007/10/09 08:35:41 UTC

svn commit: r583057 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java

Author: skitching
Date: Mon Oct  8 23:35:41 2007
New Revision: 583057

URL: http://svn.apache.org/viewvc?rev=583057&view=rev
Log:
Remove createMessager method that is unused now that the FrameworkAdapter is responsible for creating it.

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java?rev=583057&r1=583056&r2=583057&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java Mon Oct  8 23:35:41 2007
@@ -19,13 +19,6 @@
 
 package org.apache.myfaces.orchestra.conversation;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
-import org.apache.myfaces.orchestra.lib.OrchestraException;
-import org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterProviderManager;
-import org.apache.myfaces.shared_orchestra.util.ClassUtils;
-
 import java.io.IOException;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
@@ -34,6 +27,11 @@
 import java.util.Iterator;
 import java.util.Map;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
+import org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterProviderManager;
+
 /**
  * Deals with the various conversation contexts in the current session.
  * <p>
@@ -50,8 +48,6 @@
 {
 	final static String CONVERSATION_CONTEXT_PARAM = "conversationContext";
 
-	private final static String INIT_MESSAGER = "org.apache.myfaces.conversation.MESSAGER";
-
 	private final static String CONVERSATION_MANAGER_KEY = "org.apache.myfaces.ConversationManager";
 	private final static String CONVERSATION_CONTEXT_REQ = "org.apache.myfaces.ConversationManager.conversationContext";
 
@@ -325,49 +321,6 @@
 	{
 		return FrameworkAdapter.getCurrentInstance().getConversationMessager();
 		// return conversationMessager;
-	}
-
-	/**
-	 * Create the Messager used to inform the user about anomalies.
-	 * <p>
-	 * See {@link #getMessager()} for further details.
-	 */
-	private static ConversationMessager createMessager()
-	{
-		// First try init parameter for backwards compatibility
-		FrameworkAdapter adapter = FrameworkAdapter.getCurrentInstance();
-		String conversationMessagerName = adapter.getInitParameter(INIT_MESSAGER);
-		if (conversationMessagerName != null)
-		{
-			try
-			{
-				return (ConversationMessager) ClassUtils.classForName(conversationMessagerName).newInstance();
-			}
-			catch (InstantiationException e)
-			{
-				throw new OrchestraException("error creating messager: " + conversationMessagerName, e);
-			}
-			catch (IllegalAccessException e)
-			{
-				throw new OrchestraException("error creating messager: " + conversationMessagerName, e);
-			}
-			catch (ClassNotFoundException e)
-			{
-				throw new OrchestraException("error creating messager: " + conversationMessagerName, e);
-			}
-		}
-
-		// Now try to find a bean with name = ConversationMessager classname.
-		// This allows:
-		// (a) the IOC framework to be used to define the messager
-		// (b) the concrete FrameworkAdapter to provide a suitable default
-
-		ConversationMessager cm = (ConversationMessager) adapter.getBean(ConversationMessager.class.getName());
-		if (cm == null)
-		{
-			throw new OrchestraException("No ConversationMessager defined.");
-		}
-		return cm;
 	}
 
 	/**