|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.ConnectionProviderPriorityList
public class ConnectionProviderPriorityList
Utility class for Failover
| Constructor Summary | |
|---|---|
ConnectionProviderPriorityList()
|
|
| Method Summary | |
|---|---|
java.sql.Connection |
getConnection(javax.sql.DataSource[] ds)
Obtain a connection from the datasources, starting on the first datasource, and if unable to obtain a connection skips to the next one on the list, and try again until the list is exhausted. |
void |
setFailOnError(boolean flag)
Flag if an error causes the operation to thrown an exception, or false to skip to next DataSource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionProviderPriorityList()
| Method Detail |
|---|
public void setFailOnError(boolean flag)
ConnectionProvider
setFailOnError in interface ConnectionProviderflag - true if to fail on error
public java.sql.Connection getConnection(javax.sql.DataSource[] ds)
throws java.sql.SQLException
getConnection in interface ConnectionProviderds - the array of datasources. An ordered list of datasources
ds is null, or null if the DataSources has returned a null as connection
java.sql.SQLException - in case of error and failOnError is true or the error occurs while obtaining a connection with the last
DataSource on the list
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||