org.firebirdsql.ds
Class FBXADataSource

java.lang.Object
  extended by org.firebirdsql.ds.RootCommonDataSource
      extended by org.firebirdsql.ds.FBAbstractCommonDataSource
          extended by org.firebirdsql.ds.FBXADataSource
All Implemented Interfaces:
javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.XADataSource, FirebirdConnectionProperties

public class FBXADataSource
extends FBAbstractCommonDataSource
implements javax.sql.XADataSource, javax.naming.Referenceable

Bare-bones implementation of XADataSource.

Use this class instead of the broken implementation of FBConnectionPoolDataSource.

Since:
2.2
Author:
Mark Rotteveel

Field Summary
 
Fields inherited from class org.firebirdsql.ds.FBAbstractCommonDataSource
lock, REF_DATABASE_NAME, REF_DESCRIPTION, REF_PORT_NUMBER, REF_PROPERTIES, REF_SERVER_NAME
 
Constructor Summary
FBXADataSource()
           
 
Method Summary
protected  void checkNotStarted()
          Method to check if this DataSource has not yet started.
 javax.naming.Reference getReference()
           
 javax.sql.XAConnection getXAConnection()
           
 javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password)
           
 
Methods inherited from class org.firebirdsql.ds.FBAbstractCommonDataSource
getBlobBufferSize, getBuffersNumber, getCharSet, getConnectionProperties, getConnectTimeout, getDatabase, getDatabaseName, getDatabaseParameterBuffer, getDefaultIsolation, getDefaultTransactionIsolation, getDescription, getEncoding, getLoginTimeout, getNonStandardProperty, getPassword, getPortNumber, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getSqlDialect, getTpbMapping, getTransactionParameters, getType, getUser, getUserName, getUseTranslation, isDefaultResultSetHoldable, isTimestampUsesLocalTimezone, isUseFirebirdAutocommit, isUseStandardUdf, isUseStreamBlobs, setBlobBufferSize, setBuffersNumber, setCharSet, setConnectionProperties, setConnectTimeout, setDatabase, setDatabase, setDatabaseName, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setDescription, setEncoding, setLoginTimeout, setNonStandardProperty, setNonStandardProperty, setPassword, setPortNumber, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setSqlDialect, setTimestampUsesLocalTimezone, setTpbMapping, setTransactionParameters, setType, setUseFirebirdAutocommit, setUser, setUserName, setUseStandardUdf, setUseStreamBlobs, setUseTranslation, updateReference
 
Methods inherited from class org.firebirdsql.ds.RootCommonDataSource
getLogWriter, getParentLogger, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

FBXADataSource

public FBXADataSource()
Method Detail

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                              java.lang.String password)
                                       throws java.sql.SQLException
Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException

checkNotStarted

protected void checkNotStarted()
                        throws java.lang.IllegalStateException
Description copied from class: FBAbstractCommonDataSource
Method to check if this DataSource has not yet started.

Implementations should throw IllegalStateException when the DataSource is already in use and modifying properties is not allowed.

Specified by:
checkNotStarted in class FBAbstractCommonDataSource
Throws:
java.lang.IllegalStateException - When the DataSource is already in use

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.