|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.transactionalSupport.TransactionManager
Nested Class Summary | |
static class |
TransactionManager.MyLockManager
A very efficient lock manager that takes advantage of the following assumptions. |
Field Summary | |
protected TransactionManager.MyLockManager |
lockManager
|
Constructor Summary | |
TransactionManager()
Constructor for the TransactionManager object |
Method Summary | |
void |
addTransactionSupport(java.lang.String name,
java.lang.Class transactionClass)
Register the 'name' with the class. |
void |
dumpContext(java.io.OutputStream os)
Used for debugging. |
void |
dumpContext(java.io.Writer w)
|
protected TransactionLog |
getCurrentDefaultInstance()
The defaultInstance is the root transaction for the current context. |
TransactionLog |
getCurrentInstance()
Find the most nested transaction. |
protected TransactionLog |
getCurrentInstance(TransactionLog log)
Find the most nested transaction. |
TransactionLog |
getDefaultInstance()
|
TransactionManager.MyLockManager |
getLockManager()
Gets the LockManager attribute of the TransactionManager object |
TransactionLog |
getNewTransaction(java.lang.String name)
Attempt to create a new TransactionLog for the transaction type of 'name'. |
boolean |
hasTransactions()
|
boolean |
isAllowingNesting()
|
protected boolean |
isUsingSessions()
Gets the UsingSessions attribute of the TransactionManager object |
protected java.lang.Object[] |
lookupTransaction(java.lang.String name)
Find the Object [] that contains the name and the class of the specified transaction name. |
static void |
main(java.lang.String[] args)
Benchmark lock manager performance |
protected void |
maintainContextList(TransactionLog log)
Clean up our context list of transactions. |
protected void |
managedTransactionComplete(TransactionLog log)
The non session type. |
protected void |
sessionTransactionComplete()
|
void |
setContext(java.lang.Object obj)
Transactions can have multiple contexts. |
protected void |
setDefaultInstance(TransactionLog log)
Use this method sparingly. |
TransactionLog |
startRootTransaction(java.lang.String name,
java.lang.Object context)
Used to provide seperation between a particular transaction instance and the desire to have a transaction. |
TransactionLog |
startRootTransaction(java.lang.String name,
Session session)
Used to provide seperation between a particular transaction instance and the desire to have a transaction. |
void |
startRootTransaction(TransactionLog log,
java.lang.Object context)
Only use this method if you KNOW that you want the provided transaction to be a root transaction. |
TransactionLog |
startTransaction(java.lang.String name,
java.lang.Object context)
Used to provide seperation between a particular transaction instance and the desire to have a transaction. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final TransactionManager.MyLockManager lockManager
Constructor Detail |
public TransactionManager()
Method Detail |
public static void main(java.lang.String[] args)
args
- The command line argumentspublic void setContext(java.lang.Object obj)
obj
- The new Context valueprotected void setDefaultInstance(TransactionLog log)
log
- The new DefaultInstance valuepublic TransactionManager.MyLockManager getLockManager()
public TransactionLog getCurrentInstance()
public TransactionLog getNewTransaction(java.lang.String name)
name
-
public TransactionLog getDefaultInstance()
public boolean isAllowingNesting()
protected boolean isUsingSessions()
protected final TransactionLog getCurrentDefaultInstance()
protected TransactionLog getCurrentInstance(TransactionLog log)
log
-
public void addTransactionSupport(java.lang.String name, java.lang.Class transactionClass)
transactionClass
- must be an instance of TransactionLog. Must also
have a default constructor.name
- The feature to be added to the TransactionSupport attributepublic void dumpContext(java.io.OutputStream os)
os
- public boolean hasTransactions()
public TransactionLog startRootTransaction(java.lang.String name, Session session)
name
- The name of a registered transaction type.session
-
addTransactionSupport(java.lang.String, java.lang.Class)
public TransactionLog startTransaction(java.lang.String name, java.lang.Object context)
context
- The context of the transaction.name
- The name of a registered transaction type.
addTransactionSupport(java.lang.String, java.lang.Class)
public void startRootTransaction(TransactionLog log, java.lang.Object context)
log
- The transaction that is to be the root transaction for the
provided context.context
- The context of the transaction.public TransactionLog startRootTransaction(java.lang.String name, java.lang.Object context)
context
- The context of the transaction.name
- The name of a registered transaction type.
addTransactionSupport(java.lang.String, java.lang.Class)
public void dumpContext(java.io.Writer w)
w
- protected void sessionTransactionComplete()
protected void managedTransactionComplete(TransactionLog log)
log
- protected void maintainContextList(TransactionLog log)
log
- protected java.lang.Object[] lookupTransaction(java.lang.String name)
name
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |