org.objectweb.speedo.workingset.lib
Class SpeedoTransaction
java.lang.Object
org.objectweb.perseus.persistence.lib.BasicWorkingSet
org.objectweb.speedo.workingset.lib.SpeedoTransaction
- All Implemented Interfaces:
- org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, javax.jdo.Transaction, Transaction, org.objectweb.perseus.persistence.api.TransactionalWorkingSet, org.objectweb.perseus.persistence.api.WorkingSet
- public class SpeedoTransaction
- extends org.objectweb.perseus.persistence.lib.BasicWorkingSet
- implements Transaction, org.objectweb.fractal.api.control.LifeCycleController
Is a working set assocaited to a ProxyManager. The working set can be
transactional or not. It contains the list of reached instances.
- Author:
- S.Chassande-Barrioz
- See Also:
Transaction,
Transaction,
WorkingSet,
BasicWorkingSet
| Fields inherited from class org.objectweb.perseus.persistence.lib.BasicWorkingSet |
connectionHolder, logger, oid2state, restoreValues, retainValues, rollBackOnly, status, userObject |
| Fields inherited from interface org.objectweb.perseus.persistence.api.TransactionalWorkingSet |
CTX_ABORTED, CTX_ACTIVE_TRANSACTIONAL, CTX_COMMITTED, CTX_PREPARED, CTX_PREPARED_FAIL, CTX_PREPARED_OK |
| Fields inherited from interface org.objectweb.perseus.persistence.api.WorkingSet |
CTX_ACTIVE, CTX_CLOSED, READ_INTENTION, UNKNOWN_INTENTION, WRITE_INTENTION |
| Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
| Methods inherited from class org.objectweb.perseus.persistence.lib.BasicWorkingSet |
clear, entries, getConnectionHolder, getStatus, getUserObject, getWSRestoreValues, getWSRetainValues, getWSRollBackOnly, lookup, oids, setWSRestoreValues, setWSRetainValues, setWSRollBackOnly, unbind |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.perseus.persistence.api.TransactionalWorkingSet |
getWSRollBackOnly, setWSRollBackOnly |
| Methods inherited from interface org.objectweb.perseus.persistence.api.WorkingSet |
clear, entries, getConnectionHolder, getStatus, getUserObject, getWSRestoreValues, getWSRetainValues, lookup, oids, setWSRestoreValues, setWSRetainValues, unbind |
PROXY_MANAGER_BINDING
public static final java.lang.String PROXY_MANAGER_BINDING
- See Also:
- Constant Field Values
MAPPER_BINDING
public static final java.lang.String MAPPER_BINDING
- See Also:
- Constant Field Values
TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING
public static final java.lang.String TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING
- See Also:
- Constant Field Values
COMPONENT_BINDING
public static final java.lang.String COMPONENT_BINDING
- See Also:
- Constant Field Values
txListener
public static TransactionListener txListener
SpeedoTransaction
public SpeedoTransaction()
active
public void active()
throws org.objectweb.perseus.persistence.api.PersistenceException
- It activates the working set. This is used to delimit the begining of
the working set.
- Specified by:
active in interface Transaction
- Throws:
org.objectweb.perseus.persistence.api.PersistenceException
bind
public org.objectweb.perseus.persistence.api.State bind(org.objectweb.perseus.persistence.api.State state,
java.lang.Object oid,
byte mode)
- Attaches an entry to the transaction.
Plus version update.
- Specified by:
bind in interface org.objectweb.perseus.persistence.api.WorkingSet
- Parameters:
state - the state which must be attached to the transactionmode - the action that stared the binding: either read or write intention
beforeWSPrepare
public void beforeWSPrepare()
throws org.objectweb.perseus.persistence.api.PersistenceException
- Invalidates the prefetch buffer associated to this working set.
- Throws:
org.objectweb.perseus.persistence.api.PersistenceException
onWSEnd
public void onWSEnd()
- Signal to the persistent instances reached in the working set that the
current working set is closed. Some actions on persistent instances at
this time can be done, such as reference unswizlling
setConnectionHolder
public void setConnectionHolder(org.objectweb.perseus.persistence.api.ConnectionHolder ch)
- Description copied from interface:
Transaction
- Assignes the connection holder. The connection holder is able to allocate
a connection to the underlying data support and to kept it until the
working set / transaction end.
- Specified by:
setConnectionHolder in interface Transaction
rollBackOnInternalError
public javax.jdo.JDOFatalException rollBackOnInternalError(java.lang.Exception _e)
- Specified by:
rollBackOnInternalError in interface Transaction
isManagedEnv
public boolean isManagedEnv()
- Description copied from interface:
Transaction
- Indicates if the transaction environnement is managed. If the 'false'
value is returned then that means that a user transaction matches to
a local transaction managed by speedo.
- Specified by:
isManagedEnv in interface Transaction
getFcState
public java.lang.String getFcState()
- Specified by:
getFcState in interface org.objectweb.fractal.api.control.LifeCycleController
startFc
public void startFc()
- Specified by:
startFc in interface org.objectweb.fractal.api.control.LifeCycleController
stopFc
public void stopFc()
- Specified by:
stopFc in interface org.objectweb.fractal.api.control.LifeCycleController
listFc
public java.lang.String[] listFc()
- Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController
lookupFc
public java.lang.Object lookupFc(java.lang.String c)
- Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
bindFc
public void bindFc(java.lang.String c,
java.lang.Object s)
- Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
unbindFc
public void unbindFc(java.lang.String c)
- Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
setStatus
public void setStatus(byte status)
throws org.objectweb.perseus.persistence.api.PersistenceException
- Specified by:
setStatus in interface org.objectweb.perseus.persistence.api.WorkingSet
- Throws:
org.objectweb.perseus.persistence.api.PersistenceException
begin
public void begin()
- Specified by:
begin in interface javax.jdo.Transaction
commit
public void commit()
- Specified by:
commit in interface javax.jdo.Transaction
rollback
public void rollback()
- Specified by:
rollback in interface javax.jdo.Transaction
isActive
public boolean isActive()
- Specified by:
isActive in interface javax.jdo.Transaction
setNontransactionalRead
public void setNontransactionalRead(boolean b)
- Specified by:
setNontransactionalRead in interface javax.jdo.Transaction
getNontransactionalRead
public boolean getNontransactionalRead()
- Specified by:
getNontransactionalRead in interface javax.jdo.Transaction
setNontransactionalWrite
public void setNontransactionalWrite(boolean b)
- Specified by:
setNontransactionalWrite in interface javax.jdo.Transaction
getNontransactionalWrite
public boolean getNontransactionalWrite()
- Specified by:
getNontransactionalWrite in interface javax.jdo.Transaction
setRetainValues
public void setRetainValues(boolean b)
- Specified by:
setRetainValues in interface javax.jdo.Transaction
getRetainValues
public boolean getRetainValues()
- Specified by:
getRetainValues in interface javax.jdo.Transaction
setRestoreValues
public void setRestoreValues(boolean b)
- Specified by:
setRestoreValues in interface javax.jdo.Transaction
getRestoreValues
public boolean getRestoreValues()
- Specified by:
getRestoreValues in interface javax.jdo.Transaction
setOptimistic
public void setOptimistic(boolean b)
- Specified by:
setOptimistic in interface javax.jdo.Transaction
getOptimistic
public boolean getOptimistic()
- Specified by:
getOptimistic in interface javax.jdo.Transaction
setSynchronization
public void setSynchronization(javax.transaction.Synchronization s)
- Specified by:
setSynchronization in interface javax.jdo.Transaction
getSynchronization
public javax.transaction.Synchronization getSynchronization()
- Specified by:
getSynchronization in interface javax.jdo.Transaction
getPersistenceManager
public javax.jdo.PersistenceManager getPersistenceManager()
- Specified by:
getPersistenceManager in interface javax.jdo.Transaction
getRollbackOnly
public boolean getRollbackOnly()
- Specified by:
getRollbackOnly in interface javax.jdo.Transaction
setRollbackOnly
public void setRollbackOnly()
- Specified by:
setRollbackOnly in interface javax.jdo.Transaction