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
-
Method Summary
Modifier and TypeMethodDescriptionabstract Connection
Fetches a connection from the factory.static ConnectionFactory
getConnectionFactory
(Class<? extends ConnectionFactory> connectionFactoryClass) Constructs aConnectionFactory
based on the supplied class name.abstract void
releaseConnection
(Connection conn) Destroys a connection.abstract void
start
(ConnectionFactoryConfiguration factoryConfiguration, ClassLoader classLoader) Starts the connection factory.abstract void
stop()
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 aConnectionFactory
based 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.
-