Java Doc for JManagedConnection.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » dbm » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.dbm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas.dbm.JManagedConnection

JManagedConnection
public class JManagedConnection implements Comparable,XAConnection,XAResource,ResourceManagerEvent,Synchronization(Code)
This class represents the physical connection, managed by the pool. It implements the PooledConnection interface, in fact via the derived XAConnection interface.
author:
   durieuxp


Field Summary
 ConnectionactConn
    
 ConnectionManagerds
    
 ConnectionimplConn
    

Constructor Summary
public  JManagedConnection(Connection conn, ConnectionManager ds)
    

Method Summary
public  voidaddConnectionEventListener(ConnectionEventListener listener)
     Add an event listener.
public  voidafterCompletion(int status)
    
public  voidbeforeCompletion()
    
public  voidclose()
     Close the database connection.
public  voidcommit(Xid xid, boolean onePhase)
     Commit the global transaction specified by xid.
public  intcompareTo(Object o)
    
public  voidend(Xid xid, int flags)
     Ends the work performed on behalf of a transaction branch.
public  voidenlistConnection(Transaction transaction)
    
public  voidforget(Xid xid)
     Tell the resource manager to forget about a heuristically completed transaction branch.
public  ConnectiongetConnection()
     Create an object handle for a database connection.
public  intgetIdent()
    
public  intgetOpenCount()
    
public  StringgetRMID()
    
public  intgetTransactionTimeout()
     Obtain the current transaction timeout value set for this XAResource instance.
public  TransactiongetTx()
    
public  XAResourcegetXAResource()
     Return an XA resource to the caller.
public  voidhold()
    
public  booleaninactive()
     Check if the connection has been unused for too long time.
public  booleanisAged()
    
public  booleanisClosed()
    
public  booleanisOpen()
    
public  booleanisRME()
    
public  booleanisSameRM(XAResource xares)
    
public  voidnotifyClose()
    
public  voidnotifyError(SQLException ex)
    
public  voidnotifyPsClose(JStatement ps)
     A PreparedStatement has been logically closed.
public  intprepare(Xid xid)
     Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
public  PreparedStatementprepareStatement(String sql, int resultSetType, int resultSetConcurrency)
    
public  PreparedStatementprepareStatement(String sql)
    
public  intpsNumber()
    
public  Xid[]recover(int flag)
     Obtain a list of prepared transaction branches from a resource manager.
public  booleanrelease()
    
public  voidremove()
     remove this item, ignoring exception on close.
public  voidremoveConnectionEventListener(ConnectionEventListener listener)
     Remove an event listener.
public  voidrollback(Xid xid)
    
public  voidsetPstmtMax(int max)
    
public  voidsetRME(boolean rme)
    
public  booleansetTransactionTimeout(int seconds)
     Set the current transaction timeout value for this XAResource instance.
Parameters:
  seconds - timeout value, in seconds.
public  voidsetTx(Transaction tx)
    
public  voidstart(Xid xid, int flags)
    

Field Detail
actConn
Connection actConn(Code)



ds
ConnectionManager ds(Code)



implConn
Connection implConn(Code)




Constructor Detail
JManagedConnection
public JManagedConnection(Connection conn, ConnectionManager ds)(Code)




Method Detail
addConnectionEventListener
public void addConnectionEventListener(ConnectionEventListener listener)(Code)
Add an event listener.
Parameters:
  listener - event listener



afterCompletion
public void afterCompletion(int status)(Code)
synchronization implementation



beforeCompletion
public void beforeCompletion()(Code)
synchronization implementation



close
public void close() throws SQLException(Code)
Close the database connection.
exception:
  SQLException - - if a database-access error occurs



commit
public void commit(Xid xid, boolean onePhase) throws XAException(Code)
Commit the global transaction specified by xid.
Parameters:
  xid - transaction xid
Parameters:
  onePhase - true if one phase commit
throws:
  XAException - XA protocol error



compareTo
public int compareTo(Object o)(Code)



end
public void end(Xid xid, int flags) throws XAException(Code)
Ends the work performed on behalf of a transaction branch.
Parameters:
  xid - transaction xid
Parameters:
  flags - currently unused
throws:
  XAException - XA protocol error



enlistConnection
public void enlistConnection(Transaction transaction) throws javax.transaction.SystemException(Code)
implementation of resource manager event



forget
public void forget(Xid xid) throws XAException(Code)
Tell the resource manager to forget about a heuristically completed transaction branch.
Parameters:
  xid - transaction xid
throws:
  XAException - XA protocol error



getConnection
public Connection getConnection() throws SQLException(Code)
Create an object handle for a database connection.
exception:
  SQLException - - if a database-access error occurs



getIdent
public int getIdent()(Code)
The ident of this JManagedConnection



getOpenCount
public int getOpenCount()(Code)
open count



getRMID
public String getRMID()(Code)



getTransactionTimeout
public int getTransactionTimeout() throws XAException(Code)
Obtain the current transaction timeout value set for this XAResource instance. the current transaction timeout in seconds
throws:
  XAException - XA protocol error



getTx
public Transaction getTx()(Code)
the Transaction



getXAResource
public XAResource getXAResource() throws SQLException(Code)
Return an XA resource to the caller. The XAResource
exception:
  SQLException - - if a database-access error occurs



hold
public void hold()(Code)
Notify as opened



inactive
public boolean inactive()(Code)
Check if the connection has been unused for too long time. This occurs usually when the caller forgot to call close(). true if open time has been reached, and not involved in a tx.



isAged
public boolean isAged()(Code)
true if connection max age has expired



isClosed
public boolean isClosed()(Code)
true if connection is closed



isOpen
public boolean isOpen()(Code)
true if connection is still open



isRME
public boolean isRME()(Code)
true if registered as RME



isSameRM
public boolean isSameRM(XAResource xares) throws XAException(Code)
Determine if the resource manager instance represented by the target object is the same as the resource manager instance represented by the parameter xares
Parameters:
  xares - An XAResource object True if same RM instance, otherwise false.
throws:
  XAException - XA protocol error



notifyClose
public void notifyClose()(Code)



notifyError
public void notifyError(SQLException ex)(Code)



notifyPsClose
public void notifyPsClose(JStatement ps)(Code)
A PreparedStatement has been logically closed.



prepare
public int prepare(Xid xid) throws XAException(Code)
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
Parameters:
  xid - transaction xid
throws:
  XAException - XA protocol error



prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code)
Try to find a PreparedStatement in the pool



prepareStatement
public PreparedStatement prepareStatement(String sql) throws SQLException(Code)
Try to find a PreparedStatement in the pool



psNumber
public int psNumber()(Code)



recover
public Xid[] recover(int flag) throws XAException(Code)
Obtain a list of prepared transaction branches from a resource manager. an array of transaction Xids
throws:
  XAException - XA protocol error



release
public boolean release()(Code)
notify as closed true if normal close.



remove
public void remove()(Code)
remove this item, ignoring exception on close.



removeConnectionEventListener
public void removeConnectionEventListener(ConnectionEventListener listener)(Code)
Remove an event listener.
Parameters:
  listener - event listener



rollback
public void rollback(Xid xid) throws XAException(Code)
Inform the resource manager to roll back work done on behalf of a transaction branch
Parameters:
  xid - transaction xid
throws:
  XAException - XA protocol error



setPstmtMax
public void setPstmtMax(int max)(Code)
Dynamically change the prepared statement pool size



setRME
public void setRME(boolean rme)(Code)
set/unset as RME



setTransactionTimeout
public boolean setTransactionTimeout(int seconds) throws XAException(Code)
Set the current transaction timeout value for this XAResource instance.
Parameters:
  seconds - timeout value, in seconds. always true
throws:
  XAException - XA protocol error



setTx
public void setTx(Transaction tx)(Code)
Set the associated transaction
Parameters:
  tx - Transaction



start
public void start(Xid xid, int flags) throws XAException(Code)
Start work on behalf of a transaction branch specified in xid
Parameters:
  xid - transaction xid
throws:
  XAException - XA protocol error



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.