|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.jonas.dbm.JManagedConnection
This class represents the physical connection, managed by the pool. It implements the PooledConnection interface, in fact via the derived XAConnection interface.
| Field Summary |
| Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Constructor Summary | |
JManagedConnection(java.sql.Connection conn,
ConnectionManager ds)
|
|
| Method Summary | |
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener)
Add an event listener. |
void |
afterCompletion(int status)
synchronization implementation |
void |
beforeCompletion()
synchronization implementation |
void |
close()
Close the database connection. |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commit the global transaction specified by xid. |
int |
compareTo(java.lang.Object o)
|
void |
end(javax.transaction.xa.Xid xid,
int flags)
Ends the work performed on behalf of a transaction branch. |
void |
enlistConnection(javax.transaction.Transaction transaction)
implementation of resource manager event |
void |
forget(javax.transaction.xa.Xid xid)
Tell the resource manager to forget about a heuristically completed transaction branch. |
java.sql.Connection |
getConnection()
Create an object handle for a database connection. |
int |
getIdent()
|
int |
getOpenCount()
|
java.lang.String |
getRMID()
|
int |
getTransactionTimeout()
Obtain the current transaction timeout value set for this XAResource instance. |
javax.transaction.Transaction |
getTx()
|
javax.transaction.xa.XAResource |
getXAResource()
Return an XA resource to the caller. |
void |
hold()
Notify as opened |
boolean |
inactive()
Check if the connection has been unused for too long time. |
boolean |
isAged()
|
boolean |
isClosed()
|
boolean |
isOpen()
|
boolean |
isRME()
|
boolean |
isSameRM(javax.transaction.xa.XAResource xares)
Determine if the resource manager instance represented by the target object is the same as the resource manager instance represented by the parameter xares |
void |
notifyClose()
|
void |
notifyError(java.sql.SQLException ex)
|
void |
notifyPsClose(JStatement ps)
A PreparedStatement has been logically closed. |
int |
prepare(javax.transaction.xa.Xid xid)
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Try to find a PreparedStatement in the pool |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Try to find a PreparedStatement in the pool |
int |
psNumber()
|
javax.transaction.xa.Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager. |
boolean |
release()
notify as closed |
void |
remove()
remove this item, ignoring exception on close. |
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
Remove an event listener. |
void |
rollback(javax.transaction.xa.Xid xid)
Inform the resource manager to roll back work done on behalf of a transaction branch |
void |
setPstmtMax(int max)
Dynamically change the prepared statement pool size |
void |
setRME(boolean rme)
set/unset as RME |
boolean |
setTransactionTimeout(int seconds)
Set the current transaction timeout value for this XAResource instance. |
void |
setTx(javax.transaction.Transaction tx)
Set the associated transaction |
void |
start(javax.transaction.xa.Xid xid,
int flags)
Start work on behalf of a transaction branch specified in xid |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JManagedConnection(java.sql.Connection conn,
ConnectionManager ds)
| Method Detail |
public int getIdent()
public void setPstmtMax(int max)
public void commit(javax.transaction.xa.Xid xid,
boolean onePhase)
throws javax.transaction.xa.XAException
commit in interface javax.transaction.xa.XAResourcexid - transaction xidonePhase - true if one phase commit
javax.transaction.xa.XAException - XA protocol error
public void end(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
end in interface javax.transaction.xa.XAResourcexid - transaction xidflags - currently unused
javax.transaction.xa.XAException - XA protocol error
public void forget(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
forget in interface javax.transaction.xa.XAResourcexid - transaction xid
javax.transaction.xa.XAException - XA protocol error
public int getTransactionTimeout()
throws javax.transaction.xa.XAException
getTransactionTimeout in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException - XA protocol error
public boolean isSameRM(javax.transaction.xa.XAResource xares)
throws javax.transaction.xa.XAException
isSameRM in interface javax.transaction.xa.XAResourcexares - An XAResource object
javax.transaction.xa.XAException - XA protocol error
public int prepare(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
prepare in interface javax.transaction.xa.XAResourcexid - transaction xid
javax.transaction.xa.XAException - XA protocol error
public javax.transaction.xa.Xid[] recover(int flag)
throws javax.transaction.xa.XAException
recover in interface javax.transaction.xa.XAResourcejavax.transaction.xa.XAException - XA protocol error
public void rollback(javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
rollback in interface javax.transaction.xa.XAResourcexid - transaction xid
javax.transaction.xa.XAException - XA protocol error
public boolean setTransactionTimeout(int seconds)
throws javax.transaction.xa.XAException
setTransactionTimeout in interface javax.transaction.xa.XAResourceseconds - timeout value, in seconds.
javax.transaction.xa.XAException - XA protocol error
public void start(javax.transaction.xa.Xid xid,
int flags)
throws javax.transaction.xa.XAException
start in interface javax.transaction.xa.XAResourcexid - transaction xid
javax.transaction.xa.XAException - XA protocol error
public javax.transaction.xa.XAResource getXAResource()
throws java.sql.SQLException
getXAResource in interface javax.sql.XAConnectionjava.sql.SQLException - - if a database-access error occurspublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic int psNumber()
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.PooledConnectionjava.sql.SQLException - - if a database-access error occurs
public void close()
throws java.sql.SQLException
close in interface javax.sql.PooledConnectionjava.sql.SQLException - - if a database-access error occurspublic void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener in interface javax.sql.PooledConnectionlistener - event listenerpublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener in interface javax.sql.PooledConnectionlistener - event listener
public void enlistConnection(javax.transaction.Transaction transaction)
throws javax.transaction.SystemException
enlistConnection in interface org.objectweb.transaction.jta.ResourceManagerEventjavax.transaction.SystemExceptionpublic void beforeCompletion()
beforeCompletion in interface javax.transaction.Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface javax.transaction.Synchronizationpublic boolean isAged()
public boolean isOpen()
public int getOpenCount()
public boolean inactive()
public boolean isClosed()
public void hold()
public boolean release()
public void setTx(javax.transaction.Transaction tx)
tx - Transactionpublic javax.transaction.Transaction getTx()
public boolean isRME()
public void setRME(boolean rme)
public void remove()
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void notifyPsClose(JStatement ps)
public java.lang.String getRMID()
public void notifyClose()
public void notifyError(java.sql.SQLException ex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||