Java Doc for SpeedoManagedConnection.java in  » Database-ORM » Speedo_1.4.5 » org » objectweb » speedo » jca » 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 » Database ORM » Speedo_1.4.5 » org.objectweb.speedo.jca 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.speedo.jca.SpeedoManagedConnection

SpeedoManagedConnection
public class SpeedoManagedConnection implements ManagedConnection,javax.resource.spi.LocalTransaction,javax.resource.cci.LocalTransaction,XAResource,ManagedConnectionMetaData(Code)

author:
   P. Dechamboux


Field Summary
final public static  StringEIS_PRODUCT_NAME
    
final public static  StringEIS_PRODUCT_VERSION
    
final public static  StringUSER_NAME
    
protected  SpeedoConnectionSpeccri
    
public  SpeedoXAContextxac
     It is the current SpeedoXAContext.

Constructor Summary
 SpeedoManagedConnection(Logger el, SpeedoManagedConnectionFactory fmcf)
     Constructs a SpeedoManagedConnection.

Method Summary
public synchronized  voidaddConnectionEventListener(ConnectionEventListener listener)
     Adds a listener to the listeners list if it has not already been done.
public synchronized  voidassociateConnection(Object o)
     Associates a new Connection to this ManagedConnection.
public synchronized  voidbegin()
     Begins the LocalTransaction if it has not already been started.
public  voidcleanup()
     Cleans up the connection.
public synchronized  voidcommit()
     Commits the LocalTransaction if it is active.
public  voidcommit(Xid xid, boolean b)
     Unbind the PersistenceManager to the xid.
public  voiddestroy()
     Called when ManagedConnection is removed.
public synchronized  voiddissociateConnection(Object conn)
     Dissociates a Connection from the ones that are associated to this ManagedConnection.
public  voidend(Xid xid, int i)
     Unbind this instance to the PersistenceManager.
public  voidforget(Xid xid)
    
public  ObjectgetConnection(Subject subject, ConnectionRequestInfo info)
     Delegates the creation of a Connection to the ConnectionFactory.
public  StringgetEISProductName()
    
public  StringgetEISProductVersion()
    
public  LocalTransactiongetLocalTransaction()
    
public  PrintWritergetLogWriter()
     Not supported yet.
public  intgetMaxConnections()
    
public  ManagedConnectionMetaDatagetMetaData()
    
public  POManagerItfgetPOManager()
    
public  intgetTransactionTimeout()
    
public  StringgetUserName()
    
public  SpeedoXAContextgetXAContext(Xid xid, int flag)
     find the SpeedoXAContext matching an Xid.
public synchronized  XAResourcegetXAResource()
     Retrieves an XA resource.
public  booleanisSameRM(XAResource resource)
     Used by JTA in order to verify that it has not already registered a XAResource to manage this transaction context from this RM.
public  booleanlocalTransactionTerminated()
     Specifies if this ManagedConnection still has an active LocalTransaction.
public  intprepare(Xid xid)
     Prepares the underlying JdoTxContext (prepare phase of the 2PC).
public  Xid[]recover(int i)
     Gets the Xid of distributed transactions to be recovered from the Speedo manager.
public synchronized  voidregisterSynchronization()
     Registers the POManagerItf of the current SpeedoXAContext to the current transaction, if it is not already done.
public synchronized  voidremoveConnectionEventListener(ConnectionEventListener listener)
     Removes a listener from the listeners list.
public synchronized  voidrollback()
     Rollbacks the LocalTransaction if it is active.
public  voidrollback(Xid xid)
     Unbind the PersistenceManager to the xid.
public  voidsetLogWriter(PrintWriter writer)
     Not supported yet.
public  booleansetTransactionTimeout(int i)
    
public  voidstart(Xid xid, int i)
     Assigns an actual Speedo transaction context to the XAResource within the give DTP context.

Field Detail
EIS_PRODUCT_NAME
final public static String EIS_PRODUCT_NAME(Code)



EIS_PRODUCT_VERSION
final public static String EIS_PRODUCT_VERSION(Code)



USER_NAME
final public static String USER_NAME(Code)



cri
protected SpeedoConnectionSpec cri(Code)



xac
public SpeedoXAContext xac(Code)
It is the current SpeedoXAContext. It is not null when the ManagedConnection is used in a XA transaction through the XAResource interface.




Constructor Detail
SpeedoManagedConnection
SpeedoManagedConnection(Logger el, SpeedoManagedConnectionFactory fmcf)(Code)
Constructs a SpeedoManagedConnection.
Parameters:
  el - The logger into which to produce ManagedConnection-relatedtraces.
Parameters:
  fmcf - The ManagedConnectionFactory that has requested theManagedConnection creation.




Method Detail
addConnectionEventListener
public synchronized void addConnectionEventListener(ConnectionEventListener listener)(Code)
Adds a listener to the listeners list if it has not already been done. This means that duplicates are ignored. It first creates this list if needed (creation at first add).



associateConnection
public synchronized void associateConnection(Object o) throws ResourceException(Code)
Associates a new Connection to this ManagedConnection. Nothing is done if it has already been associated (enforces no duplicate).



begin
public synchronized void begin() throws ResourceException(Code)
Begins the LocalTransaction if it has not already been started.



cleanup
public void cleanup() throws ResourceException(Code)
Cleans up the connection.



commit
public synchronized void commit() throws ResourceException(Code)
Commits the LocalTransaction if it is active.



commit
public void commit(Xid xid, boolean b) throws XAException(Code)
Unbind the PersistenceManager to the xid. The real commit is done by the PersistenceManager registered as a Synchronization.



destroy
public void destroy() throws ResourceException(Code)
Called when ManagedConnection is removed.



dissociateConnection
public synchronized void dissociateConnection(Object conn) throws ResourceException(Code)
Dissociates a Connection from the ones that are associated to this ManagedConnection.
Parameters:
  conn - The Connection to be dissociated.



end
public void end(Xid xid, int i) throws XAException(Code)
Unbind this instance to the PersistenceManager.



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



getConnection
public Object getConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException(Code)
Delegates the creation of a Connection to the ConnectionFactory. "subject" and "info" parameters are ignored.



getEISProductName
public String getEISProductName() throws ResourceException(Code)



getEISProductVersion
public String getEISProductVersion() throws ResourceException(Code)



getLocalTransaction
public LocalTransaction getLocalTransaction() throws ResourceException(Code)



getLogWriter
public PrintWriter getLogWriter() throws ResourceException(Code)
Not supported yet.



getMaxConnections
public int getMaxConnections() throws ResourceException(Code)



getMetaData
public ManagedConnectionMetaData getMetaData() throws ResourceException(Code)



getPOManager
public POManagerItf getPOManager()(Code)
Retrieves the right POManagerItf in according the managed connection state (in a local transaction, in a XA transaction or out of transaction) a POManagerItf instance (never null).



getTransactionTimeout
public int getTransactionTimeout() throws XAException(Code)



getUserName
public String getUserName() throws ResourceException(Code)



getXAContext
public SpeedoXAContext getXAContext(Xid xid, int flag) throws XAException(Code)
find the SpeedoXAContext matching an Xid.
Parameters:
  flag - indicates expecting behavior:
  • 0: create the SpeedoXAContext if it does not already exist
  • 1: return an existing SpeedoXAContext
  • otherwise: return an SpeedoXAContext or null it is not found



getXAResource
public synchronized XAResource getXAResource() throws ResourceException(Code)
Retrieves an XA resource. Switches running mode to XA.



isSameRM
public boolean isSameRM(XAResource resource) throws XAException(Code)
Used by JTA in order to verify that it has not already registered a XAResource to manage this transaction context from this RM. If it is the case, both XAResource are warned of this fact (endWithNoSameRM = false). This means that these XAResource will be released at "end" time.
Parameters:
  resource - The resource to be compared against this one wrt RM.



localTransactionTerminated
public boolean localTransactionTerminated()(Code)
Specifies if this ManagedConnection still has an active LocalTransaction. true if a LocalTransaction is still active.



prepare
public int prepare(Xid xid) throws XAException(Code)
Prepares the underlying JdoTxContext (prepare phase of the 2PC).



recover
public Xid[] recover(int i) throws XAException(Code)
Gets the Xid of distributed transactions to be recovered from the Speedo manager.



registerSynchronization
public synchronized void registerSynchronization() throws XAException(Code)
Registers the POManagerItf of the current SpeedoXAContext to the current transaction, if it is not already done.
throws:
  XAException - if the registering is not possible:- TM not availlable- Pr



removeConnectionEventListener
public synchronized void removeConnectionEventListener(ConnectionEventListener listener)(Code)
Removes a listener from the listeners list. If the list does not eist (null), or if this listener does not belong to this list, nothing is done.



rollback
public synchronized void rollback() throws ResourceException(Code)
Rollbacks the LocalTransaction if it is active.



rollback
public void rollback(Xid xid) throws XAException(Code)
Unbind the PersistenceManager to the xid. The real commit is done by the PersistenceManager registered as a Synchronization.



setLogWriter
public void setLogWriter(PrintWriter writer) throws ResourceException(Code)
Not supported yet.



setTransactionTimeout
public boolean setTransactionTimeout(int i) throws XAException(Code)



start
public void start(Xid xid, int i) throws XAException(Code)
Assigns an actual Speedo transaction context to the XAResource within the give DTP context.



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.