Top Fields Constructors Methods
org.apache.derby.impl.tools.ij

pack-priv Class xaHelper

Additional top-level class in compilation unit: ijXid.

extends Object
implements xaAbstractHelper
Class Inheritance
All Implemented Interfaces
org.apache.derby.impl.tools.ij.xaAbstractHelper
Imports
org.apache.derby.iapi.tools.i18n.LocalizedResource, java.io.UnsupportedEncodingException, java.sql.Connection, .SQLException, java.util.Locale, .Vector, javax.transaction.xa.Xid, .XAException, javax.sql.PooledConnection, .XAConnection, .XADataSource, .DataSource, .ConnectionPoolDataSource

Field Summary

Modifier and TypeField and Description
private static final Class<T>[]
private ConnectionPoolDataSource
private DataSource
private PooledConnection
private XAConnection
private XADataSource
private String
private String
private static final Class<T>[]
private boolean
private boolean
private static final Class<T>[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public Connection
public Connection
public void
public void
private XADataSource

Returns:

XADataSource object
getXADataSource
()

Get a DataSource that supports distributed transactions.

private SQLException

Returns:

An SQLException.
handleException
(Throwable
exception to handle
t
)

Handles the given throwable.

private Xid
makeXid(int xid)

public void
public ijResult
public void
private static void
setDataSourceProperty(Object ds, String property, int value)

private static void
private static void
setDataSourceProperty(Object ds, String property, boolean value)

public void
public void
public void
public void
public void
public Connection
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BOOLEAN_Pback to summary
private static final Class<T>[] BOOLEAN_P
currentCPDataSourceback to summary
private ConnectionPoolDataSource currentCPDataSource
currentDataSourceback to summary
private DataSource currentDataSource
currentPooledConnectionback to summary
private PooledConnection currentPooledConnection
currentXAConnectionback to summary
private XAConnection currentXAConnection
currentXADataSourceback to summary
private XADataSource currentXADataSource
databaseNameback to summary
private String databaseName
frameworkback to summary
private String framework
INT_Pback to summary
private static final Class<T>[] INT_P
isJCCback to summary
private boolean isJCC
isNetClientback to summary
private boolean isNetClient
STRING_Pback to summary
private static final Class<T>[] STRING_P

Constructor Detail

xaHelperback to summary
public xaHelper()

Method Detail

CommitStatementback to summary
public void CommitStatement(ij parser, Token onePhase, Token twoPhase, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.CommitStatement.

CPConnectStatementback to summary
public void CPConnectStatement(ij parser, Token userT, Token passT, String n) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.CPConnectStatement.

CPDataSourceStatementback to summary
public void CPDataSourceStatement(ij parser, Token dbname, Token protocol) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.CPDataSourceStatement.

CPDisconnectStatementback to summary
public void CPDisconnectStatement(ij parser, String n) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.CPDisconnectStatement.

CPGetConnectionStatementback to summary
public Connection CPGetConnectionStatement(ij parser, String n) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.CPGetConnectionStatement.

DataSourceStatementback to summary
public Connection DataSourceStatement(ij parser, Token dbname, Token protocol, Token userT, Token passT, String id) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.DataSourceStatement.

EndStatementback to summary
public void EndStatement(ij parser, int flag, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.EndStatement.

ForgetStatementback to summary
public void ForgetStatement(ij parser, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.ForgetStatement.

getXADataSourceback to summary
private XADataSource getXADataSource() throws Exception

Get a DataSource that supports distributed transactions.

Returns:XADataSource

XADataSource object

Exceptions
Exception:
if XaDataSource is not in class path.
handleExceptionback to summary
private SQLException handleException(Throwable t)

Handles the given throwable.

If possible, an SQLException is returned. Otherwise the appropriate actions are taken and a RuntimeException is thrown.

Parameters
t:Throwable

exception to handle

Returns:SQLException

An SQLException.

Exceptions
RuntimeException:
if the throwable isn't an SQLException
makeXidback to summary
private Xid makeXid(int xid)
PrepareStatementback to summary
public void PrepareStatement(ij parser, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.PrepareStatement.

RecoverStatementback to summary
public ijResult RecoverStatement(ij parser, int flag) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.RecoverStatement.

RollbackStatementback to summary
public void RollbackStatement(ij parser, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.RollbackStatement.

setDataSourcePropertyback to summary
private static void setDataSourceProperty(Object ds, String property, int value) throws SQLException
setDataSourcePropertyback to summary
private static void setDataSourceProperty(Object ds, String property, String value) throws SQLException
setDataSourcePropertyback to summary
private static void setDataSourceProperty(Object ds, String property, boolean value) throws SQLException
setFrameworkback to summary
public void setFramework(String fm)

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.setFramework.

StartStatementback to summary
public void StartStatement(ij parser, int flag, int xid) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.StartStatement.

XAConnectStatementback to summary
public void XAConnectStatement(ij parser, Token user, Token pass, String id) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.XAConnectStatement.

XADataSourceStatementback to summary
public void XADataSourceStatement(ij parser, Token dbname, Token shutdown, String create) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.XADataSourceStatement.

XADisconnectStatementback to summary
public void XADisconnectStatement(ij parser, String n) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.XADisconnectStatement.

XAGetConnectionStatementback to summary
public Connection XAGetConnectionStatement(ij parser, String n) throws SQLException

Implements org.apache.derby.impl.tools.ij.xaAbstractHelper.XAGetConnectionStatement.