org.apache.openjpa.slice.jdbc
public class DistributedDataSource extends DecoratingDataSource implements java.lang.Iterable<javax.sql.DataSource>
Constructor and Description |
---|
DistributedDataSource(java.util.List<javax.sql.DataSource> dataSources) |
Modifier and Type | Method and Description |
---|---|
void |
addDataSource(javax.sql.DataSource ds) |
protected void |
enforceAbstract()
Marker to enforce that subclasses of this class are abstract.
|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
java.util.Iterator<javax.sql.DataSource> |
iterator() |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
addDecorator, addDecorators, clearDecorators, getDecorators, newDecoratingDataSource, removeDecorator
appendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, newInstance, toString, unwrap
public DistributedDataSource(java.util.List<javax.sql.DataSource> dataSources)
public void addDataSource(javax.sql.DataSource ds)
public java.util.Iterator<javax.sql.DataSource> iterator()
iterator
in interface java.lang.Iterable<javax.sql.DataSource>
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class DecoratingDataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class DecoratingDataSource
java.sql.SQLException
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
getLogWriter
in class DelegatingDataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
getLoginTimeout
in class DelegatingDataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
setLogWriter
in class DelegatingDataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
setLoginTimeout
in class DelegatingDataSource
java.sql.SQLException
protected void enforceAbstract()
DelegatingDataSource
enforceAbstract
in class DelegatingDataSource
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
java.sql.SQLFeatureNotSupportedException