org.openorb.ots.xa

Class XAVirtualConnection

public class XAVirtualConnection extends Object implements XAConnection

This class provides a virtual XA connection to manage an XA session without a jdbc driver that includes optional packages of JDBC 2.0

Author: Jerome Daniel

Constructor Summary
XAVirtualConnection(Connection connection, XAVirtualDataSource xa_datasource)
Constructor
Method Summary
voidaddConnectionEventListener(ConnectionEventListener listener)
Add an event listener
voidclose()
Close an XA connection
voidcloseEvent()
This operation is called to notify to all registered listener a close event.
voiderrorEvent(SQLException ex)
This operation is called to notify to all registered listener an error event.
ConnectiongetConnection()
Return the connection for SQL statements
StringgetDataSourceMetaData()
Return the DataSource meta data
XAResourcegetXAResource()
This operation is called by the SessionManager to get an XA Resource on the database.
voidremoveConnectionEventListener(ConnectionEventListener listener)
Remove an event listener

Constructor Detail

XAVirtualConnection

public XAVirtualConnection(Connection connection, XAVirtualDataSource xa_datasource)
Constructor

Method Detail

addConnectionEventListener

public void addConnectionEventListener(ConnectionEventListener listener)
Add an event listener

close

public void close()
Close an XA connection

closeEvent

public void closeEvent()
This operation is called to notify to all registered listener a close event.

errorEvent

public void errorEvent(SQLException ex)
This operation is called to notify to all registered listener an error event.

getConnection

public Connection getConnection()
Return the connection for SQL statements

getDataSourceMetaData

public String getDataSourceMetaData()
Return the DataSource meta data

getXAResource

public XAResource getXAResource()
This operation is called by the SessionManager to get an XA Resource on the database.

removeConnectionEventListener

public void removeConnectionEventListener(ConnectionEventListener listener)
Remove an event listener