|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.resource.JdoTransactionHandle
JdoManagedTransaction.java Implementations of the methods simply hand off to the transaction of the PM.
Constructor Summary | |
JdoTransactionHandle(PersistenceManagerImpl pm)
Constructor |
Method Summary | |
void |
begin()
Begin the transaction. |
void |
commit()
Commit the transaction. |
java.sql.Connection |
getConnection(boolean forWriting,
boolean forQuery)
Accessor for the connection to the datasource. |
java.sql.Connection |
getConnection(boolean forWriting,
boolean forQuery,
boolean useOpenedConnection)
Accessor for the connection to the datasource. |
javax.jdo.datastore.JDOConnection |
getJDOConnection()
Accessor for the connection to the datasource. |
boolean |
getNontransactionalRead()
Accessor for non-transactional reads |
boolean |
getNontransactionalWrite()
|
boolean |
getOptimistic()
Accessor for the optimistic transactions flag |
javax.jdo.PersistenceManager |
getPersistenceManager()
Accessor for the persistence manager. |
boolean |
getRestoreValues()
Accessor for whether to restore values |
boolean |
getRetainValues()
Accessor for whether to retain values |
boolean |
getRollbackOnly()
Accessor for the "rollback only" flag. |
javax.transaction.Synchronization |
getSynchronization()
Accessor for the synchronization |
int |
getTransactionIsolation()
Accessor for the transaction isolation level. |
boolean |
isActive()
Accessor for whether the transaction is active. |
boolean |
isCommitting()
Accessor for whether the transaction is committing. |
boolean |
isConnectionOpen()
Checks whether a connection to the datasource is open. |
void |
releaseConnection(java.sql.Connection conn)
Method to release the Connection. |
void |
rollback()
Perform rollback of the transaction |
void |
setNontransactionalRead(boolean ntr)
Mutator for non-transactional reads |
void |
setNontransactionalWrite(boolean ntw)
Mutator for non-transactional writes |
void |
setOptimistic(boolean optimistic)
set the optimistic transactions flag |
void |
setRestoreValues(boolean restore_values)
Mutator for whether to restore values |
void |
setRetainValues(boolean retain_values)
Set retainValues flag |
void |
setRollbackOnly()
Mutator for the "rollback only" flag. |
void |
setSynchronization(javax.transaction.Synchronization synch)
Set the synchronization. |
void |
setTransactionIsolation(int isolationLevel)
Mutator for the transaction isolation level. |
void |
setUseUpdateLock(boolean lock)
Mutator for whether to lock queried/fetched objects in this txn. |
boolean |
useUpdateLockOnFetch()
Accessor for whether to use an update lock when fetching data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JdoTransactionHandle(PersistenceManagerImpl pm)
pm
- the PersistenceManagerMethod Detail |
public void begin()
begin
in interface javax.jdo.Transaction
public void commit()
commit
in interface javax.jdo.Transaction
public void rollback()
rollback
in interface javax.jdo.Transaction
public boolean isActive()
isActive
in interface javax.jdo.Transaction
public boolean isCommitting()
isCommitting
in interface Transaction
public boolean getRollbackOnly()
getRollbackOnly
in interface javax.jdo.Transaction
public void setRollbackOnly()
setRollbackOnly
in interface javax.jdo.Transaction
public void setNontransactionalRead(boolean ntr)
setNontransactionalRead
in interface javax.jdo.Transaction
ntr
- Whether to use nontransactional readspublic boolean getNontransactionalRead()
getNontransactionalRead
in interface javax.jdo.Transaction
public void setNontransactionalWrite(boolean ntw)
setNontransactionalWrite
in interface javax.jdo.Transaction
ntw
- Whether to use nontransactional writespublic boolean getNontransactionalWrite()
getNontransactionalWrite
in interface javax.jdo.Transaction
public void setRetainValues(boolean retain_values)
setRetainValues
in interface javax.jdo.Transaction
retain_values
- public boolean getRetainValues()
getRetainValues
in interface javax.jdo.Transaction
public void setRestoreValues(boolean restore_values)
setRestoreValues
in interface javax.jdo.Transaction
restore_values
- Whether to restore valuespublic boolean getRestoreValues()
getRestoreValues
in interface javax.jdo.Transaction
public void setOptimistic(boolean optimistic)
setOptimistic
in interface javax.jdo.Transaction
optimistic
- public boolean getOptimistic()
getOptimistic
in interface javax.jdo.Transaction
public void setSynchronization(javax.transaction.Synchronization synch)
setSynchronization
in interface javax.jdo.Transaction
synch
- public javax.transaction.Synchronization getSynchronization()
getSynchronization
in interface javax.jdo.Transaction
public javax.jdo.PersistenceManager getPersistenceManager()
getPersistenceManager
in interface javax.jdo.Transaction
public java.sql.Connection getConnection(boolean forWriting, boolean forQuery) throws java.sql.SQLException
Transaction
getConnection
in interface Transaction
forWriting
- Whether the connection is read-only or read-write.forQuery
- Whether the connection is to be used by a query (i.e.JDOQUERY).
java.sql.SQLException
public java.sql.Connection getConnection(boolean forWriting, boolean forQuery, boolean useOpenedConnection) throws java.sql.SQLException
Transaction
getConnection
in interface Transaction
forWriting
- Whether the connection is read-only or read-write.forQuery
- Whether the connection is to be used by a query (i.e.JDOQUERY).useOpenedConnection
- whether to use an already opened connection, if one is opened.
java.sql.SQLException
public boolean isConnectionOpen()
Transaction
isConnectionOpen
in interface Transaction
public void releaseConnection(java.sql.Connection conn) throws java.sql.SQLException
Transaction
releaseConnection
in interface Transaction
conn
- The Connection to release.
java.sql.SQLException
- Thrown when an error occurs releasing the
connection.public int getTransactionIsolation()
Transaction
getTransactionIsolation
in interface Transaction
public void setTransactionIsolation(int isolationLevel)
Transaction
setTransactionIsolation
in interface Transaction
isolationLevel
- The isolation level required.public boolean useUpdateLockOnFetch()
Transaction
useUpdateLockOnFetch
in interface Transaction
public void setUseUpdateLock(boolean lock)
Transaction
setUseUpdateLock
in interface Transaction
lock
- Whether to use an update lock.public javax.jdo.datastore.JDOConnection getJDOConnection()
Transaction
getJDOConnection
in interface Transaction
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |