Class ConnectionFactory
java.lang.Object
org.infinispan.persistence.jdbc.common.connectionfactory.ConnectionFactory
Defines the functionality a connection factory should implement.
- Author:
- Mircea.Markus@jboss.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConnectionFetches a connection from the factory.static ConnectionFactorygetConnectionFactory(Class<? extends ConnectionFactory> connectionFactoryClass) Constructs aConnectionFactorybased on the supplied class name.abstract voidreleaseConnection(Connection conn) Destroys a connection.abstract voidstart(ConnectionFactoryConfiguration factoryConfiguration, ClassLoader classLoader) Starts the connection factory.abstract voidstop()Closes the connection factory, including all allocated connections etc.
-
Constructor Details
-
ConnectionFactory
public ConnectionFactory()
-
-
Method Details
-
getConnectionFactory
public static ConnectionFactory getConnectionFactory(Class<? extends ConnectionFactory> connectionFactoryClass) throws PersistenceException Constructs aConnectionFactorybased on the supplied class name.- Throws:
PersistenceException
-
start
public abstract void start(ConnectionFactoryConfiguration factoryConfiguration, ClassLoader classLoader) throws PersistenceException Starts the connection factory. A pooled factory might be create connections here.- Throws:
PersistenceException
-
stop
public abstract void stop()Closes the connection factory, including all allocated connections etc. -
getConnection
Fetches a connection from the factory.- Throws:
PersistenceException
-
releaseConnection
Destroys a connection. Important: null might be passed in, as an valid argument.
-