Java Doc for TxManager.java in  » EJB-Server-JBoss-4.2.1 » transaction » org » jboss » tm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » transaction » org.jboss.tm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jboss.tm.TxManager

TxManager
public class TxManager implements TransactionManager,TransactionPropagationContextImporter,TransactionPropagationContextFactory,TransactionLocalDelegate,TransactionTimeoutConfiguration,JBossXATerminator(Code)
Our TransactionManager implementation.
author:
   Rickard Öberg
author:
   Marc Fleury
author:
   Ole Husgaard
author:
   Jason Dillon
author:
   Francisco Reverbel
author:
   Adrian Brock
author:
   Dimitris Andreadis
version:
   $Revision: 57208 $

Inner Class :static class ThreadInfo



Method Summary
public  voidassociateThread(Transaction transaction)
    
public  voidbegin()
     Begin a new transaction.
public  voidcancelWork(Work work, Xid xid)
    
public  voidcommit()
     Commit the transaction associated with the currently running thread.
public  voidcommit(Xid xid, boolean onePhase)
    
public  booleancontainsValue(TransactionLocal local, Transaction tx)
    
public  TransactiondisassociateThread()
     The following 2 methods are here to provide association and disassociation of the thread.
public  voidendWork(Work work, Xid xid)
    
public  voidforget(Xid xid)
    
public  longgetCommitCount()
    
public  intgetDefaultTransactionTimeout()
     Get the default transaction timeout.
 TransactionImplgetExternalTransaction(Xid xid)
    
public  booleangetGlobalIdsEnabled()
     Getter for attribute globalIdsEnabled.
public static  TxManagergetInstance()
     Get a reference to the singleton instance.
public  longgetRollbackCount()
    
public  intgetStatus()
     Return the status of the transaction associated with the currently running thread, or Status.STATUS_NO_TRANSACTION if no active transaction is currently associated.
public  longgetTimeLeftBeforeTransactionTimeout(boolean errorRollback)
    
public  TransactiongetTransaction()
     Return the transaction currently associated with the invoking thread, or null if no active transaction is currently associated.
public  intgetTransactionCount()
    
public  TransactionIntegritygetTransactionIntegrity()
    
public  ObjectgetTransactionPropagationContext()
     Return a TPC for the current transaction.
public  ObjectgetTransactionPropagationContext(Transaction tx)
     Return a TPC for the argument transaction.
public  intgetTransactionTimeout()
    
public  ObjectgetValue(TransactionLocal local, Transaction tx)
    
 TransactionImplimportExternalTransaction(Xid xid, long timeOut)
    
public  TransactionimportTransactionPropagationContext(Object tpc)
     Import a transaction propagation context into this TM. The TPC is loosely typed, as we may (at a later time) want to import TPCs that come from other transaction domains without offloading the conversion to the client.
Parameters:
  tpc - The transaction propagation context that we want toimport into this TM.
 voidincCommitCount()
    
 voidincRollbackCount()
    
public  booleanisInterruptThreads()
    
public  voidlock(TransactionLocal local, Transaction tx)
    
public  intprepare(Xid xid)
    
public  Xid[]recover(int flag)
    
public  voidregisterWork(Work work, Xid xid, long timeout)
    
 voidreleaseTransactionImpl(TransactionImpl tx)
     Release the given TransactionImpl.
public  voidresume(Transaction transaction)
     Resume a transaction. Note: This will not enlist any resources involved in this transaction.
public  voidrollback()
     Roll back the transaction associated with the currently running thread.
public  voidrollback(Xid xid)
    
public  voidsetDefaultTransactionTimeout(int seconds)
     Set the default transaction timeout for new transactions.
public  voidsetGlobalIdsEnabled(boolean newValue)
     Setter for attribute globalIdsEnabled.
public  voidsetInterruptThreads(boolean interruptThreads)
     Enable/disable thread interruption at transaction timeout.
public  voidsetRollbackOnly()
     Mark the transaction associated with the currently running thread so that the only possible outcome is a rollback.
public  voidsetTransactionIntegrity(TransactionIntegrity integrity)
    
public  voidsetTransactionTimeout(int seconds)
     Set the transaction timeout for new transactions started by the calling thread.
public  voidstartWork(Work work, Xid xid)
    
public  voidstoreValue(TransactionLocal local, Transaction tx, Object value)
    
public  Transactionsuspend()
     Suspend the transaction currently associated with the current thread, and return it. Note: This will not delist any resources involved in this transaction.
public  voidunlock(TransactionLocal local, Transaction tx)
    



Method Detail
associateThread
public void associateThread(Transaction transaction)(Code)



begin
public void begin() throws NotSupportedException, SystemException(Code)
Begin a new transaction. The new transaction will be associated with the calling thread.



cancelWork
public void cancelWork(Work work, Xid xid)(Code)



commit
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException(Code)
Commit the transaction associated with the currently running thread.



commit
public void commit(Xid xid, boolean onePhase) throws XAException(Code)



containsValue
public boolean containsValue(TransactionLocal local, Transaction tx)(Code)



disassociateThread
public Transaction disassociateThread()(Code)
The following 2 methods are here to provide association and disassociation of the thread.



endWork
public void endWork(Work work, Xid xid)(Code)



forget
public void forget(Xid xid) throws XAException(Code)



getCommitCount
public long getCommitCount()(Code)
A count of the transactions that have been committed



getDefaultTransactionTimeout
public int getDefaultTransactionTimeout()(Code)
Get the default transaction timeout. Default transaction timeout in seconds.



getExternalTransaction
TransactionImpl getExternalTransaction(Xid xid) throws WorkCompletedException(Code)



getGlobalIdsEnabled
public boolean getGlobalIdsEnabled()(Code)
Getter for attribute globalIdsEnabled.



getInstance
public static TxManager getInstance()(Code)
Get a reference to the singleton instance.



getRollbackCount
public long getRollbackCount()(Code)
A count of the transactions that have been rolled back



getStatus
public int getStatus() throws SystemException(Code)
Return the status of the transaction associated with the currently running thread, or Status.STATUS_NO_TRANSACTION if no active transaction is currently associated.



getTimeLeftBeforeTransactionTimeout
public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException(Code)



getTransaction
public Transaction getTransaction() throws SystemException(Code)
Return the transaction currently associated with the invoking thread, or null if no active transaction is currently associated.



getTransactionCount
public int getTransactionCount()(Code)
Return the number of active transactions



getTransactionIntegrity
public TransactionIntegrity getTransactionIntegrity()(Code)
Get the transaction integrity policy the transaction integrity policy



getTransactionPropagationContext
public Object getTransactionPropagationContext()(Code)
Return a TPC for the current transaction.



getTransactionPropagationContext
public Object getTransactionPropagationContext(Transaction tx)(Code)
Return a TPC for the argument transaction.



getTransactionTimeout
public int getTransactionTimeout()(Code)



getValue
public Object getValue(TransactionLocal local, Transaction tx)(Code)



importExternalTransaction
TransactionImpl importExternalTransaction(Xid xid, long timeOut)(Code)



importTransactionPropagationContext
public Transaction importTransactionPropagationContext(Object tpc)(Code)
Import a transaction propagation context into this TM. The TPC is loosely typed, as we may (at a later time) want to import TPCs that come from other transaction domains without offloading the conversion to the client.
Parameters:
  tpc - The transaction propagation context that we want toimport into this TM. Currently this is an instanceof LocalId. At some later time this may be an instanceof a transaction propagation context from anothertransaction domain likeorg.omg.CosTransactions.PropagationContext. A transaction representing this transaction propagationcontext, or null if this TPC cannot be imported.



incCommitCount
void incCommitCount()(Code)
Increment the commit count



incRollbackCount
void incRollbackCount()(Code)
Increment the rollback count



isInterruptThreads
public boolean isInterruptThreads()(Code)
Is thread interruption enabled at transaction timeout true for interrupt threads, false otherwise



lock
public void lock(TransactionLocal local, Transaction tx) throws InterruptedException(Code)



prepare
public int prepare(Xid xid) throws XAException(Code)



recover
public Xid[] recover(int flag) throws XAException(Code)



registerWork
public void registerWork(Work work, Xid xid, long timeout) throws WorkCompletedException(Code)



releaseTransactionImpl
void releaseTransactionImpl(TransactionImpl tx)(Code)
Release the given TransactionImpl.



resume
public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException(Code)
Resume a transaction. Note: This will not enlist any resources involved in this transaction. According to JTA1.0.1 specification section 3.2.3, that is the responsibility of the application server.



rollback
public void rollback() throws IllegalStateException, SecurityException, SystemException(Code)
Roll back the transaction associated with the currently running thread.



rollback
public void rollback(Xid xid) throws XAException(Code)



setDefaultTransactionTimeout
public void setDefaultTransactionTimeout(int seconds)(Code)
Set the default transaction timeout for new transactions. This default value is used if setTransactionTimeout() was never called, or if it was called with a value of 0.



setGlobalIdsEnabled
public void setGlobalIdsEnabled(boolean newValue)(Code)
Setter for attribute globalIdsEnabled.



setInterruptThreads
public void setInterruptThreads(boolean interruptThreads)(Code)
Enable/disable thread interruption at transaction timeout.
Parameters:
  interruptThreads - pass true to interrupt threads, false otherwise



setRollbackOnly
public void setRollbackOnly() throws IllegalStateException, SystemException(Code)
Mark the transaction associated with the currently running thread so that the only possible outcome is a rollback.



setTransactionIntegrity
public void setTransactionIntegrity(TransactionIntegrity integrity)(Code)
Set the transaction integrity policy
Parameters:
  integrity - the transaction integrity policy



setTransactionTimeout
public void setTransactionTimeout(int seconds) throws SystemException(Code)
Set the transaction timeout for new transactions started by the calling thread.



startWork
public void startWork(Work work, Xid xid) throws WorkCompletedException(Code)



storeValue
public void storeValue(TransactionLocal local, Transaction tx, Object value)(Code)



suspend
public Transaction suspend() throws SystemException(Code)
Suspend the transaction currently associated with the current thread, and return it. Note: This will not delist any resources involved in this transaction. According to JTA1.0.1 specification section 3.2.3, that is the responsibility of the application server.



unlock
public void unlock(TransactionLocal local, Transaction tx)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.