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/12/05 16:33:01 UTC

svn commit: r601363 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/OrchestraAdvisorBeanPostProcessor.java

Author: skitching
Date: Wed Dec  5 07:33:00 2007
New Revision: 601363

URL: http://svn.apache.org/viewvc?rev=601363&view=rev
Log:
More fixes for the recent change: CurrentConversationAdvice must run *before* other orchestra advices.
In particular, PersistenceContextConversationInterceptor depends on the conversation being set first.

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

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/OrchestraAdvisorBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/OrchestraAdvisorBeanPostProcessor.java?rev=601363&r1=601362&r2=601363&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/OrchestraAdvisorBeanPostProcessor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/OrchestraAdvisorBeanPostProcessor.java Wed Dec  5 07:33:00 2007
@@ -217,12 +217,14 @@
 		// wrap every Advice in an Advisor instance that returns it in all cases
 		int len = advices.length + 1;
 		Advisor[] advisors = new Advisor[len];
+
+		// always add the standard CurrentConversationAdvice, and do it FIRST, so it runs first
+		advisors[0] = new SimpleAdvisor(new CurrentConversationAdvice(conversation, beanName));
+
 		for(int i=0; i<advices.length; ++i) 
 		{
-			advisors[i] = new SimpleAdvisor(advices[i]);
+			advisors[i+1] = new SimpleAdvisor(advices[i]);
 		}
-		// always add the standard CurrentConversationAdvice
-		advisors[len-1] = new SimpleAdvisor(new CurrentConversationAdvice(conversation, beanName));
 
 		return advisors;
 	}