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/02 17:19:26 UTC
svn commit: r581275 -
/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java
Author: skitching
Date: Tue Oct 2 08:19:25 2007
New Revision: 581275
URL: http://svn.apache.org/viewvc?rev=581275&view=rev
Log:
Add javadoc only.
Modified:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java?rev=581275&r1=581274&r2=581275&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/PersistenceContextConversationInterceptor.java Tue Oct 2 08:19:25 2007
@@ -24,17 +24,24 @@
import org.apache.myfaces.orchestra.conversation.Conversation;
/**
- * <p/>
- * Maintain the persistence state
- * </p>
- * <p/>
- * <p/>
- * The interceptor will create a new persistenceContext using the
- * {@link PersistenceContextFactory} if none exists.<br />
- * It will also bind/unbind it if required.<br />
- * The {@link PersistenceContext} will be put into the conversation
- * attribute map wrapped in an {@link PersistenceContextCloser} so that it will
- * close the {@link PersistenceContext} on conversation end
+ * Maintain the appropriate persistence state for the current call-stack.
+ * <p>
+ * This class is a MethodInterceptor (an AOP Advice) which should be configured to intercept
+ * calls to all conversation-scoped beans. It ensures that the appropriate PersistenceContext
+ * object for this conversation is placed into the default location, by invoking the
+ * <i>bind</i> method on the persistence context object. Typically the bind method stores
+ * the persistence context into a thread-local variable, but that is implementation-specific.
+ * <p>
+ * When Spring code retrieves the persistence context in order to inject it into a bean,
+ * it then finds the correct context for the conversation that is associated with the
+ * nearest conversation-scoped bean in the callstack.
+ * <p>
+ * If no PersistenceContext yet exists for the conversation associated with the bean
+ * that is being invoked then one is created using {@link PersistenceContextFactory}.
+ * <p>
+ * A reference to the {@link PersistenceContext} is put into the conversation attribute
+ * map wrapped in an {@link PersistenceContextCloser} so that when the conversation
+ * ends a callback occurs on it which closes the underlying object.
*/
public class PersistenceContextConversationInterceptor implements MethodInterceptor
{