Class SimpleConnectionFactory

java.lang.Object
org.infinispan.persistence.jdbc.common.connectionfactory.ConnectionFactory
org.infinispan.persistence.jdbc.common.impl.connectionfactory.SimpleConnectionFactory

public class SimpleConnectionFactory extends ConnectionFactory
Connection factory implementation that will create database connection on a per invocation basis. Not recommended in production, PooledConnectionFactory or ManagedConnectionFactory should rather be used.
Author:
Mircea.Markus@jboss.com
  • Constructor Details

    • SimpleConnectionFactory

      public SimpleConnectionFactory()
  • Method Details

    • start

      public void start(ConnectionFactoryConfiguration config, ClassLoader classLoader) throws org.infinispan.persistence.spi.PersistenceException
      Description copied from class: ConnectionFactory
      Starts the connection factory. A pooled factory might be create connections here.
      Specified by:
      start in class ConnectionFactory
      Throws:
      org.infinispan.persistence.spi.PersistenceException
    • stop

      public void stop()
      Description copied from class: ConnectionFactory
      Closes the connection factory, including all allocated connections etc.
      Specified by:
      stop in class ConnectionFactory
    • getConnection

      public Connection getConnection() throws org.infinispan.persistence.spi.PersistenceException
      Description copied from class: ConnectionFactory
      Fetches a connection from the factory.
      Specified by:
      getConnection in class ConnectionFactory
      Throws:
      org.infinispan.persistence.spi.PersistenceException
    • releaseConnection

      public void releaseConnection(Connection conn)
      Description copied from class: ConnectionFactory
      Destroys a connection. Important: null might be passed in, as an valid argument.
      Specified by:
      releaseConnection in class ConnectionFactory
    • getConnectionUrl

      public String getConnectionUrl()
    • getUserName

      public String getUserName()
    • getPassword

      public String getPassword()
    • getConnectionCount

      public int getConnectionCount()
    • toString

      public String toString()
      Overrides:
      toString in class Object