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:
- BindingController, LifeCycleController, Transaction, Transaction, TransactionalWorkingSet, WorkingSet
- public class SpeedoTransaction
- extends BasicWorkingSet
- implements Transaction, 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
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.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 PersistenceException
- It activates the working set. This is used to delimit the begining of
the working set.
- Specified by:
active
in interface Transaction
- Throws:
PersistenceException
bind
public State bind(State state,
java.lang.Object oid,
byte mode)
- Attaches an entry to the transaction.
Plus version update.
- Specified by:
bind
in interface 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 PersistenceException
- Invalidates the prefetch buffer associated to this working set.
- Throws:
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(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 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 LifeCycleController
startFc
public void startFc()
- Specified by:
startFc
in interface LifeCycleController
stopFc
public void stopFc()
- Specified by:
stopFc
in interface LifeCycleController
listFc
public java.lang.String[] listFc()
- Specified by:
listFc
in interface BindingController
lookupFc
public java.lang.Object lookupFc(java.lang.String c)
- Specified by:
lookupFc
in interface BindingController
bindFc
public void bindFc(java.lang.String c,
java.lang.Object s)
- Specified by:
bindFc
in interface BindingController
unbindFc
public void unbindFc(java.lang.String c)
- Specified by:
unbindFc
in interface BindingController
setStatus
public void setStatus(byte status)
throws PersistenceException
- Specified by:
setStatus
in interface WorkingSet
- Throws:
PersistenceException
begin
public void begin()
- Specified by:
begin
in interface Transaction
commit
public void commit()
- Specified by:
commit
in interface Transaction
rollback
public void rollback()
- Specified by:
rollback
in interface Transaction
isActive
public boolean isActive()
- Specified by:
isActive
in interface Transaction
setNontransactionalRead
public void setNontransactionalRead(boolean b)
- Specified by:
setNontransactionalRead
in interface Transaction
getNontransactionalRead
public boolean getNontransactionalRead()
- Specified by:
getNontransactionalRead
in interface Transaction
setNontransactionalWrite
public void setNontransactionalWrite(boolean b)
- Specified by:
setNontransactionalWrite
in interface Transaction
getNontransactionalWrite
public boolean getNontransactionalWrite()
- Specified by:
getNontransactionalWrite
in interface Transaction
setRetainValues
public void setRetainValues(boolean b)
- Specified by:
setRetainValues
in interface Transaction
getRetainValues
public boolean getRetainValues()
- Specified by:
getRetainValues
in interface Transaction
setRestoreValues
public void setRestoreValues(boolean b)
- Specified by:
setRestoreValues
in interface Transaction
getRestoreValues
public boolean getRestoreValues()
- Specified by:
getRestoreValues
in interface Transaction
setOptimistic
public void setOptimistic(boolean b)
- Specified by:
setOptimistic
in interface Transaction
getOptimistic
public boolean getOptimistic()
- Specified by:
getOptimistic
in interface Transaction
setSynchronization
public void setSynchronization(Synchronization s)
- Specified by:
setSynchronization
in interface Transaction
getSynchronization
public Synchronization getSynchronization()
- Specified by:
getSynchronization
in interface Transaction
getPersistenceManager
public PersistenceManager getPersistenceManager()
- Specified by:
getPersistenceManager
in interface Transaction
getRollbackOnly
public boolean getRollbackOnly()
- Specified by:
getRollbackOnly
in interface Transaction
setRollbackOnly
public void setRollbackOnly()
- Specified by:
setRollbackOnly
in interface Transaction