Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface ConnectionPoolDefinitionIF
ProxoolFacade
.
String alias = "myPool"; ConnectionPoolDefinitionIF cpd = ProxoolFacade.getConnectionPoolDefinition(alias);If you want to update the definition you should either update the properties definition next time you
ask
for a connection or call
Proxool
directly.
Field Summary | |
static int | |
static int | |
static int |
|
static int |
|
static int | |
static int |
|
static int |
|
static int | |
static int | |
static int | |
static int | |
static int | |
static String | |
static String | |
static String |
Method Summary | |
String |
|
String |
|
int |
|
Properties |
|
String |
|
String | |
String |
|
Set |
|
long |
|
String |
|
String |
|
Class |
|
Class |
|
Class |
|
Class |
|
String | |
String |
|
String |
|
long |
|
int |
|
long |
|
int |
|
int |
|
String |
|
long |
|
String |
|
Properties |
|
int |
|
String |
|
long |
|
String |
|
String |
|
String |
|
int |
|
String |
|
String |
|
String |
|
String |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
public static final int DEBUG_LEVEL_LOUD
- Field Value:
- 1
public static final int DEBUG_LEVEL_QUIET
- Field Value:
- 0
public static final int DEFAULT_HOUSE_KEEPING_SLEEP_TIME
30000 (30 Seconds)
- Field Value:
- 30000
public static final int DEFAULT_MAXIMUM_ACTIVE_TIME
300000 (5 minutes)
- Field Value:
- 300000
public static final int DEFAULT_MAXIMUM_CONNECTION_COUNT
15
- Field Value:
- 15
public static final int DEFAULT_MAXIMUM_CONNECTION_LIFETIME
4 * 60 * 60 * 1000 (4 hours)
- Field Value:
- 14400000
public static final int DEFAULT_MAXIMUM_NEW_CONNECTIONS
Deprecated. use
DEFAULT_SIMULTANEOUS_BUILD_THROTTLE
instead10
- Field Value:
- 10
public static final int DEFAULT_MINIMUM_CONNECTION_COUNT
0
- Field Value:
- 0
public static final int DEFAULT_OVERLOAD_WITHOUT_REFUSAL_THRESHOLD
60000
- Field Value:
- 60000
public static final int DEFAULT_PROTOTYPE_COUNT
0
- Field Value:
- 0
public static final int DEFAULT_RECENTLY_STARTED_THRESHOLD
60000
- Field Value:
- 60000
public static final int DEFAULT_SIMULTANEOUS_BUILD_THROTTLE
10
- Field Value:
- 10
public static final String FATAL_SQL_EXCEPTIONS_DELIMITER
- See Also:
getFatalSqlExceptions()
public static final String PASSWORD_PROPERTY
public static final String USER_PROPERTY
public String getAlias()
The name associated with this connection pool. This is how you identify this pool when you need to use it.
public String getCompleteUrl()
The URL that was used to define this pool. For example: proxool:org.hsqldb.jdbcDriver:jdbc:hsqldb:test
- Returns:
- the complete url
public Properties getDelegateProperties()
Get all of the properties that are defined on the delegated driver.
- Returns:
- the delegate properties
public String getDelegateProperty(String name)
public String getDriver()
public String getFatalSqlExceptionWrapper()
If this is not-null then any fatal SQLException is wrapped up inside an instance of this class. If null, then the original exception is thrown. Range: any valid class name that is a subclass of SQLException or RuntimeException Default: null (original exception is thrown)
- Returns:
- the class name to use for fatal SQL exceptions
public Set getFatalSqlExceptions()
Get the list of fatal SQL exception (Strings) fragments that will trigger the death of a Connection. All SQLExceptions are caught and tested for containing this text fragment. If it matches than this connection is considered useless and it is discarded. Regardless of what happens the exception is always thrown back to the user.
- Returns:
- the list of exception fragments (String)
- See Also:
FATAL_SQL_EXCEPTIONS_DELIMITER
public long getHouseKeepingSleepTime()
This is the time the house keeping thread sleeps for between checks. (milliseconds)
public String getHouseKeepingTestSql()
The test SQL that we perform to see if a connection is alright. Should be fast and robust.
- Returns:
- house keeping test SQL
public String getInitialContextFactory()
JNDI property
- Returns:
- the initial context factory
public Class getInjectableCallableStatementInterface()
The class name of an interface that should be injected everytime we make a CallableStatement. Use this when you want to access methods on a concrete class in the vendor's CallableStatement object that aren't declared in a public interface. Without this, the CallableStatement that is provided will only give you access to public interfaces (like CallableStatement and any other vendor provided ones)
- Returns:
- the interface
public Class getInjectableConnectionInterface()
The class name of an interface that should be injected everytime we make a Connection. Use this when you want to access methods on a concrete class in the vendor's Connection object that aren't declared in a public interface. Without this, the connection that gets served will only give you access to public interfaces (like Connection and any other vendor provided ones)
- Returns:
- the interface
public Class getInjectablePreparedStatementInterface()
The class name of an interface that should be injected everytime we make a PreparedStatement. Use this when you want to access methods on a concrete class in the vendor's PreparedStatement object that aren't declared in a public interface. Without this, the PreparedStatement that is provided will only give you access to public interfaces (like PreparedStatement and any other vendor provided ones)
- Returns:
- the interface
public Class getInjectableStatementInterface()
The class name of an interface that should be injected everytime we make a Statement. Use this when you want to access methods on a concrete class in the vendor's Statement object that aren't declared in a public interface. Without this, the statement that is provided will only give you access to public interfaces (like Statement and any other vendor provided ones)
- Returns:
- the interface
public String getJdbcDriverVersion()
public String getJmxAgentId()
Get a comma separated list of JMX agent ids (as used byMBeanServerFactory.findMBeanServer(String agentId)
) to register the pool to.
- Returns:
- a comma separated list of JMX agent ids (as used by
MBeanServerFactory.findMBeanServer(String agentId)
) to register the pool to.
public String getJndiName()
JNDI property
- Returns:
- JNDI name
public long getMaximumActiveTime()
If the housekeeper comes across a thread that has been active for longer than this then it will kill it. So make sure you set this to a number bigger than your slowest expected response!
public int getMaximumConnectionCount()
The maximum number of connections to the database
public long getMaximumConnectionLifetime()
The maximum amount of time that a connection exists for before it is killed (recycled). (milliseconds)
public int getMaximumNewConnections()
Deprecated. use more descriptive
getSimultaneousBuildThrottle()
insteadIn order to prevent overloading, this is the maximum number of connections that you can have that are in the progress of being made. That is, ones we have started to make but haven't finished yet.
public int getMinimumConnectionCount()
The minimum number of connections we will keep open, regardless of whether anyone needs them or not.
public long getOverloadWithoutRefusalLifetime()
This is the time in milliseconds after the last time that we refused a connection that we still consider ourselves to be overloaded. We have to do this because, even when overloaded, it's not impossible for the available connection count to be high and it's possible to be serving a lot of connections. Recognising an overload is easy (we refuse a connection) - it's recognising when we stop being overloaded that is hard. Hence this fudge :)
public String getPassword()
The password to use to login to the database
public Properties getProperties()
Deprecated. use less ambiguous
getDelegateProperties()
insteadGet all of the properties that are defined on the delegated driver.
- Returns:
- the delegate properties
public int getPrototypeCount()
This is the number of spare connections we will strive to have. So, if we have a prototypeCount of 5 but only 3 spare connections the prototyper will make an additional 2. This is important because it can take around a seconds to establish a connection, and if we are being very strict about killing connections when they get too old it happens a fair bit.
public String getProviderUrl()
JNDI property
- Returns:
- provider URL
public long getRecentlyStartedThreshold()
As long as we have one connection that was started within this threshold then we consider the pool to be up. (That is, not down). This allows us to differentiate between having all the connections frozen and just being really busy.
public String getSecurityAuthentication()
JNDI property
- Returns:
- security authentication
public String getSecurityCredentials()
JNDI property
- Returns:
- security credentials
public String getSecurityPrincipal()
JNDI property
- Returns:
- security principal
public int getSimultaneousBuildThrottle()
In order to prevent overloading, this is the maximum number of connections that you can have that are in the progress of being made. That is, ones we have started to make but haven't finished yet.
public String getStatistics()
The sample length (in seconds) when taking statistical information, or null to disable statistics. Default is null. You can comma delimit a series of periods. The suffix for the period is either "s" (seconds), "m" (minutes), "h" (hours) or "d" (days). For example: "15s,1h" would give two separate sample rates: every 15 seconds and every hour.
- Returns:
- statistics definition
public String getStatisticsLogLevel()
Whether statistics are logged as they are produced. Range: DEBUG, INFO, WARN, ERROR, FATAL. Default is null (no logging)
- Returns:
- statisticsLogLevel
public String getUrl()
This is the URL used to connect to the database. e.g. driver:@host:port:database.
public String getUser()
public boolean isJmx()
Indicate wether this pool should be registered with JMX or not.
- Returns:
- wether this pool should be registered with JMX or not.
public boolean isTestAfterUse()
Whether we test each connection after it is closed (that is, returned to the pool)
- Returns:
- true if we do the test
- See Also:
getHouseKeepingTestSql()
public boolean isTestBeforeUse()
Whether we test each connection before it is served
- Returns:
- true if we do the test
- See Also:
getHouseKeepingTestSql()
public boolean isTrace()
if this is true then we will log each execution. The SQL used and the execution time.
- Returns:
- true if we should log each execution
public boolean isVerbose()
If this is true then we start logging a lot of stuff everytime we serve a connection and everytime the house keeper and prototyper run. Be prepared for a lot of debug!
- Returns:
- true if in verbose mode