Package com.ibm.fhir.persistence.proxy
Class FHIRDebugXADataSource
- java.lang.Object
 - 
- com.ibm.fhir.persistence.proxy.FHIRDebugXADataSource
 
 
- 
- All Implemented Interfaces:
 CommonDataSource,XADataSource
public class FHIRDebugXADataSource extends Object implements XADataSource
Wraps a Derby embedded datasource so we can debug connection handling issues by returning wrapped datasources (and wrapped connections) 
- 
- 
Constructor Summary
Constructors Constructor Description FHIRDebugXADataSource() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XADataSourcegetDelegate()intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()XAConnectiongetXAConnection()XAConnectiongetXAConnection(String tenantId, String dsId)XADataSourcemakeDelegate()This function will return an XADataSource instance that is configured according to the connection properties associated with the FHIRRequestContext info found on thread-local.voidsetLoginTimeout(int seconds)voidsetLogWriter(PrintWriter out)- 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder 
- 
Methods inherited from interface javax.sql.XADataSource
createXAConnectionBuilder 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
 getLogWriterin interfaceCommonDataSource- Specified by:
 getLogWriterin interfaceXADataSource- Throws:
 SQLException
 
- 
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
 setLogWriterin interfaceCommonDataSource- Specified by:
 setLogWriterin interfaceXADataSource- Throws:
 SQLException
 
- 
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException- Specified by:
 setLoginTimeoutin interfaceCommonDataSource- Specified by:
 setLoginTimeoutin interfaceXADataSource- Throws:
 SQLException
 
- 
getLoginTimeout
public int getLoginTimeout() throws SQLException- Specified by:
 getLoginTimeoutin interfaceCommonDataSource- Specified by:
 getLoginTimeoutin interfaceXADataSource- Throws:
 SQLException
 
- 
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
 getParentLoggerin interfaceCommonDataSource- Throws:
 SQLFeatureNotSupportedException
 
- 
getXAConnection
public XAConnection getXAConnection() throws SQLException
- Specified by:
 getXAConnectionin interfaceXADataSource- Throws:
 SQLException
 
- 
getXAConnection
public XAConnection getXAConnection(String tenantId, String dsId) throws SQLException
- Specified by:
 getXAConnectionin interfaceXADataSource- Throws:
 SQLException
 
- 
getDelegate
public XADataSource getDelegate() throws SQLException
- Throws:
 SQLException
 
- 
makeDelegate
public XADataSource makeDelegate() throws SQLException
This function will return an XADataSource instance that is configured according to the connection properties associated with the FHIRRequestContext info found on thread-local. Note: this function is declared as public for testing purposes. Normally, this function is only called internally.- Throws:
 SQLException
 
 - 
 
 -