org.tynamo.jdo.internal
Class JDOTransactionManagerImpl

java.lang.Object
  extended by org.tynamo.jdo.internal.JDOTransactionManagerImpl
All Implemented Interfaces:
EventListener, org.apache.tapestry5.ioc.services.ThreadCleanupListener, JDOTransactionManager

public class JDOTransactionManagerImpl
extends Object
implements JDOTransactionManager, org.apache.tapestry5.ioc.services.ThreadCleanupListener


Constructor Summary
JDOTransactionManagerImpl(JDOPersistenceManagerSource source)
           
 
Method Summary
 void abort()
          Aborts the current transaction, and starts a new transaction to replace it.
 void commit()
          Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.
 javax.jdo.PersistenceManager getPersistenceManager()
          Gets the active persistent manager for this request, creating it as necessary.
 void threadDidCleanup()
          Rollsback the transaction at the end of the request, then closes the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOTransactionManagerImpl

public JDOTransactionManagerImpl(JDOPersistenceManagerSource source)
Method Detail

abort

public void abort()
Description copied from interface: JDOTransactionManager
Aborts the current transaction, and starts a new transaction to replace it.

Specified by:
abort in interface JDOTransactionManager

commit

public void commit()
Description copied from interface: JDOTransactionManager
Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.

Specified by:
commit in interface JDOTransactionManager

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager()
Description copied from interface: JDOTransactionManager
Gets the active persistent manager for this request, creating it as necessary. When the session is first created, a transaction is started.

Specified by:
getPersistenceManager in interface JDOTransactionManager
Returns:
the request's persistenceManager
See Also:
JDOPersistenceManagerSource

threadDidCleanup

public void threadDidCleanup()
Rollsback the transaction at the end of the request, then closes the session. This means that any uncommitted changes are lost; code should inject the JDO Persistence Manager and invoke commit() after making any changes, if they should persist.

Specified by:
threadDidCleanup in interface org.apache.tapestry5.ioc.services.ThreadCleanupListener


Copyright © 2011-2012. All Rights Reserved.