org.apache.myfaces.orchestra.conversation.spring
Class PersistenceContextCloser

java.lang.Object
  extended by org.apache.myfaces.orchestra.conversation.spring.PersistenceContextCloser
All Implemented Interfaces:
ConversationBindingListener

public class PersistenceContextCloser
extends java.lang.Object
implements ConversationBindingListener

A simple class to tidy up persistence contexts.

An instance of this class can be stored into the attributes of a specific Conversation object. Because it implements ConversationBindingListener, it receives a valueUnbound callback when the Conversation is terminated. It then closes the persistence context object associated with the Conversation.


Constructor Summary
PersistenceContextCloser(PersistenceContext persistenceContext)
           
 
Method Summary
 PersistenceContext getPersistenceContext()
           
 void valueBound(ConversationBindingEvent event)
          The bean has been added to the conversation.
 void valueUnbound(ConversationBindingEvent event)
          The bean has been removed from the conversation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceContextCloser

public PersistenceContextCloser(PersistenceContext persistenceContext)
Method Detail

getPersistenceContext

public PersistenceContext getPersistenceContext()

valueBound

public void valueBound(ConversationBindingEvent event)
Description copied from interface: ConversationBindingListener
The bean has been added to the conversation.

Specified by:
valueBound in interface ConversationBindingListener

valueUnbound

public void valueUnbound(ConversationBindingEvent event)
Description copied from interface: ConversationBindingListener
The bean has been removed from the conversation.

Specified by:
valueUnbound in interface ConversationBindingListener


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.