Java Doc for TransactionLocal.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.TransactionLocal

TransactionLocal
public class TransactionLocal (Code)
A TransactionLocal is similar to ThreadLocal except it is keyed on the Transactions. A transaction local variable is cleared after the transaction completes.
author:
   Dain Sundstrom
author:
   Bill Burke
version:
   $Revision: 57208 $


Field Summary
protected  TransactionLocalDelegatedelegate
    
final protected  TransactionManagertransactionManager
     The transaction manager is maintained by the system and manges the assocation of transaction to threads.

Constructor Summary
public  TransactionLocal()
     Creates a thread local variable.
public  TransactionLocal(TransactionManager tm)
     Creates a transaction local variable.

Method Summary
protected  booleancontainsValue(Transaction tx)
    
public  Objectget()
     Returns the value of this TransactionLocal variable associated with the thread context transaction.
public  Objectget(Transaction transaction)
     Returns the value of this TransactionLocal variable associated with the specified transaction.
public  TransactiongetTransaction()
    
protected  ObjectgetValue(Transaction tx)
     get the transaction local value.
protected  voidinitDelegate()
    
protected  ObjectinitialValue()
     Returns the initial value for this thransaction local.
public  voidlock()
    
public  voidlock(Transaction transaction)
    
public  voidset(Object value)
     Sets the value of this TransactionLocal variable associtated with the thread context transaction.
public  voidset(Transaction transaction, Object value)
     Sets the value of this TransactionLocal variable associtated with the specified transaction.
protected  voidstoreValue(Transaction tx, Object value)
    
public  voidunlock()
    
public  voidunlock(Transaction transaction)
    

Field Detail
delegate
protected TransactionLocalDelegate delegate(Code)
The delegate



transactionManager
final protected TransactionManager transactionManager(Code)
The transaction manager is maintained by the system and manges the assocation of transaction to threads.




Constructor Detail
TransactionLocal
public TransactionLocal()(Code)
Creates a thread local variable.
throws:
  IllegalStateException - if there is no system transaction manager



TransactionLocal
public TransactionLocal(TransactionManager tm)(Code)
Creates a transaction local variable. Using the given transaction manager
Parameters:
  tm - the transaction manager




Method Detail
containsValue
protected boolean containsValue(Transaction tx)(Code)
does Transaction contain object?



get
public Object get()(Code)
Returns the value of this TransactionLocal variable associated with the thread context transaction. Creates and initializes the copy if this is the first time the method is called in a transaction. the value of this TransactionLocal



get
public Object get(Transaction transaction)(Code)
Returns the value of this TransactionLocal variable associated with the specified transaction. Creates and initializes the copy if this is the first time the method is called in a transaction.
Parameters:
  transaction - the transaction for which the variable it to be retrieved the value of this TransactionLocal
throws:
  IllegalStateException - if an error occures while registeringa synchronization callback with the transaction



getTransaction
public Transaction getTransaction()(Code)



getValue
protected Object getValue(Transaction tx)(Code)
get the transaction local value.



initDelegate
protected void initDelegate()(Code)
Initialise the delegate



initialValue
protected Object initialValue()(Code)
Returns the initial value for this thransaction local. This method will be called once per accessing transaction for each TransactionLocal, the first time each transaction accesses the variable with get or set. If the programmer desires TransactionLocal variables to be initialized to some value other than null, TransactionLocal must be subclassed, and this method overridden. Typically, an anonymous inner class will be used. Typical implementations of initialValue will call an appropriate constructor and return the newly constructed object. the initial value for this TransactionLocal



lock
public void lock() throws InterruptedException(Code)
Lock the TransactionLocal using the current transaction

WARN: The current implemention just "locks the transactions"
throws:
  IllegalStateException - if the transaction is not active
throws:
  InterruptedException - if the thread is interrupted




lock
public void lock(Transaction transaction) throws InterruptedException(Code)
Lock the TransactionLocal using the provided transaction

WARN: The current implemention just "locks the transactions"
Parameters:
  transaction - the transaction
throws:
  IllegalStateException - if the transaction is not active
throws:
  InterruptedException - if the thread is interrupted




set
public void set(Object value)(Code)
Sets the value of this TransactionLocal variable associtated with the thread context transaction. This is only used to change the value from the one assigned by the initialValue method, and many applications will have no need for this functionality.
Parameters:
  value - the value to be associated with the thread context transactions's TransactionLocal



set
public void set(Transaction transaction, Object value)(Code)
Sets the value of this TransactionLocal variable associtated with the specified transaction. This is only used to change the value from the one assigned by the initialValue method, and many applications will have no need for this functionality.
Parameters:
  transaction - the transaction for which the value will be set
Parameters:
  value - the value to be associated with the thread context transactions's TransactionLocal



storeValue
protected void storeValue(Transaction tx, Object value)(Code)
put the value in the TransactionImpl map



unlock
public void unlock()(Code)
Unlock the TransactionLocal using the current transaction



unlock
public void unlock(Transaction transaction)(Code)
Unlock the ThreadLocal using the provided transaction
Parameters:
  transaction - the transaction



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.