Class ManagedConnectionFactory
java.lang.Object
org.infinispan.persistence.jdbc.common.connectionfactory.ConnectionFactory
org.infinispan.persistence.jdbc.common.impl.connectionfactory.ManagedConnectionFactory
Connection factory that can be used when on managed environments, like application servers. It knows how to look into
the JNDI tree at a certain location (configurable) and delegate connection management to the DataSource. In order to
enable it one should set the following two properties in any Jdbc cache store:
- Author:
- Mircea.Markus@jboss.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetches a connection from the factory.voidreleaseConnection(Connection conn) Destroys a connection.voidstart(ConnectionFactoryConfiguration factoryConfiguration, ClassLoader classLoader) Starts the connection factory.voidstop()Closes the connection factory, including all allocated connections etc.Methods inherited from class org.infinispan.persistence.jdbc.common.connectionfactory.ConnectionFactory
getConnectionFactory
-
Constructor Details
-
ManagedConnectionFactory
public ManagedConnectionFactory()
-
-
Method Details
-
start
public void start(ConnectionFactoryConfiguration factoryConfiguration, ClassLoader classLoader) throws org.infinispan.persistence.spi.PersistenceException Description copied from class:ConnectionFactoryStarts the connection factory. A pooled factory might be create connections here.- Specified by:
startin classConnectionFactory- Throws:
org.infinispan.persistence.spi.PersistenceException
-
stop
public void stop()Description copied from class:ConnectionFactoryCloses the connection factory, including all allocated connections etc.- Specified by:
stopin classConnectionFactory
-
getConnection
Description copied from class:ConnectionFactoryFetches a connection from the factory.- Specified by:
getConnectionin classConnectionFactory- Throws:
org.infinispan.persistence.spi.PersistenceException
-
releaseConnection
Description copied from class:ConnectionFactoryDestroys a connection. Important: null might be passed in, as an valid argument.- Specified by:
releaseConnectionin classConnectionFactory
-