org.tynamo.jdo
Interface JDOTransactionManager

All Known Implementing Classes:
JDOTransactionManagerImpl

public interface JDOTransactionManager

Manages the JDO transaction for the current thread. This includes creating an persistence manager as needed, allowing the persistence manager to checkpoint (commit the current transaction and continue) and commit the transaction automatically at the end of the request.

Remember that in Tapestry, action requests and render requests are entirely separate, and you will see a separate request and a separate transaction for each. Care should be taken to ensure that entity objects that are retained (in the session, as persistent field values) between requests are handled correctly (they tend to become detached instances).

This implementation of this service is per-thread.


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.
 

Method Detail

getPersistenceManager

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

Returns:
the request's persistenceManager
See Also:
JDOPersistenceManagerSource

commit

void commit()
Commits the current transaction (which will cause a flush of data to the database), then starts a new transaction to replace it.


abort

void abort()
Aborts the current transaction, and starts a new transaction to replace it.



Copyright © 2011-2012. All Rights Reserved.