You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/04/17 20:44:33 UTC

svn commit: r529706 - in /myfaces/current/orchestra: core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/ core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/ examples/src/main/webapp/WEB-INF/

Author: imario
Date: Tue Apr 17 11:44:32 2007
New Revision: 529706

URL: http://svn.apache.org/viewvc?view=rev&rev=529706
Log:
added OrchestraServletFilter to examples, fixed "double unbind bug" in JpaPersistenceContextFactory

Modified:
    myfaces/current/orchestra/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java
    myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/JpaPersistenceContextFactory.java
    myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml

Modified: myfaces/current/orchestra/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java?view=diff&rev=529706&r1=529705&r2=529706
==============================================================================
--- myfaces/current/orchestra/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java (original)
+++ myfaces/current/orchestra/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/filter/OrchestraServletFilter.java Tue Apr 17 11:44:32 2007
@@ -46,11 +46,11 @@
 		{
 			if (servletRequest instanceof HttpServletRequest)
 			{
-				httpServletRequest.set((HttpServletRequest) servletRequest);
+				httpServletRequest.set(servletRequest);
 			}
 			if (servletResponse instanceof HttpServletResponse)
 			{
-				httpServletResponse.set((HttpServletResponse) servletResponse);
+				httpServletResponse.set(servletResponse);
 			}
 
 			filterChain.doFilter(servletRequest, servletResponse);
@@ -71,7 +71,7 @@
 
 	protected void unbindAllUsedPersistenceContexts()
 	{
-		// XXX: this cross link into the spring domain is not .... figure out a better way 
+		// XXX: this cross link into the spring domain is not the best way .... figure out a better way
 		PersistenceContextConversationInterceptor.unbindAllUsedPersistenceContexts();
 	}
 

Modified: myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/JpaPersistenceContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/JpaPersistenceContextFactory.java?view=diff&rev=529706&r1=529705&r2=529706
==============================================================================
--- myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/JpaPersistenceContextFactory.java (original)
+++ myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/conversation/persistenceContexts/JpaPersistenceContextFactory.java Tue Apr 17 11:44:32 2007
@@ -67,7 +67,10 @@
 			{
 				synchronized(bindings)
 				{
-					TransactionSynchronizationManager.unbindResource(entityManagerFactory);
+					if (TransactionSynchronizationManager.hasResource(entityManagerFactory))
+					{
+						TransactionSynchronizationManager.unbindResource(entityManagerFactory);
+					}
 
 					Object holder = null;
 					if (bindings.size() > 0)

Modified: myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml?view=diff&rev=529706&r1=529705&r2=529706
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml Tue Apr 17 11:44:32 2007
@@ -90,15 +90,24 @@
 		<filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
 	</filter>
 
+	<filter>
+		<filter-name>orchestraFilter</filter-name>
+		<filter-class>org.apache.myfaces.orchestra.conversation.jsf.filter.OrchestraServletFilter</filter-class>
+	</filter>
+
 	<filter-mapping>
 		<filter-name>requestEncodingFilter</filter-name>
 		<url-pattern>/*</url-pattern>
 	</filter-mapping>
 
-
 	<filter-mapping>
 		<filter-name>FacesExtensionsFilter</filter-name>
 		<url-pattern>/faces/*</url-pattern>
+	</filter-mapping>
+
+	<filter-mapping>
+		<filter-name>orchestraFilter</filter-name>
+		<url-pattern>*.faces</url-pattern>
 	</filter-mapping>
 
 	<filter-mapping>