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, removeDecoratorappendInfo, close, equals, getDelegate, getInnermostDelegate, hashCode, isWrapperFor, newInstance, toString, unwrappublic 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.DataSourcegetConnection in class DecoratingDataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcegetConnection in class DecoratingDataSourcejava.sql.SQLExceptionpublic java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcegetLogWriter in class DelegatingDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcegetLoginTimeout in class DelegatingDataSourcejava.sql.SQLExceptionpublic void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcesetLogWriter in class DelegatingDataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcesetLoginTimeout in class DelegatingDataSourcejava.sql.SQLExceptionprotected void enforceAbstract()
DelegatingDataSourceenforceAbstract in class DelegatingDataSourcepublic java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
java.sql.SQLFeatureNotSupportedException