public final class ConnectionFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static Connection |
getConnection(ConnectionProperties poolSpec)
Return a Connection instance from a pool that manages JDBC driver based connections.
|
static Connection |
getConnection(String jndiName)
Return a Connection instance for a JNDI managed JDBC connection.
|
static void |
reset()
Resets the internal state of the factory.
|
public static Connection getConnection(String jndiName) throws FactoryException
jndiName - The JNDI connection nameFactoryException - When the connection cannot be retrieved from JNDIpublic static Connection getConnection(ConnectionProperties poolSpec) throws FactoryException
poolSpec - A connection pool spec that has the driver and url configured as non-empty stringsFactoryException - When the connection cannot be retrieved from the pool, or the pool cannot be createdpublic static void reset()
Copyright © 2014–2015 Michael Beiter