org.ofbiz.entity.jdbc
Class ConnectionFactory

java.lang.Object
  extended by org.ofbiz.entity.jdbc.ConnectionFactory

public class ConnectionFactory
extends java.lang.Object

ConnectionFactory - central source for JDBC connections


Field Summary
static java.lang.String module
           
 
Constructor Summary
ConnectionFactory()
           
 
Method Summary
static void closeAllManagedConnections()
           
static java.sql.Connection getConnection(java.lang.String helperName)
           
static java.sql.Connection getConnection(java.lang.String connectionUrl, java.util.Properties props)
           
static java.sql.Connection getConnection(java.lang.String driverName, java.lang.String connectionUrl, java.util.Properties props, java.lang.String userName, java.lang.String password)
           
static java.sql.Connection getConnection(java.lang.String connectionUrl, java.lang.String userName, java.lang.String password)
           
static java.sql.Connection getManagedConnection(java.lang.String helperName, org.w3c.dom.Element inlineJdbcElement)
           
static ConnectionFactoryInterface getManagedConnectionFactory()
           
static void loadDriver(java.lang.String driverName)
           
static java.sql.Connection tryGenericConnectionSources(java.lang.String helperName, org.w3c.dom.Element inlineJdbcElement)
          Deprecated. 
static void unloadDriver(java.lang.String driverName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module
Constructor Detail

ConnectionFactory

public ConnectionFactory()
Method Detail

getConnection

public static java.sql.Connection getConnection(java.lang.String driverName,
                                                java.lang.String connectionUrl,
                                                java.util.Properties props,
                                                java.lang.String userName,
                                                java.lang.String password)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public static java.sql.Connection getConnection(java.lang.String connectionUrl,
                                                java.lang.String userName,
                                                java.lang.String password)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public static java.sql.Connection getConnection(java.lang.String connectionUrl,
                                                java.util.Properties props)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public static java.sql.Connection getConnection(java.lang.String helperName)
                                         throws java.sql.SQLException,
                                                GenericEntityException
Throws:
java.sql.SQLException
GenericEntityException

tryGenericConnectionSources

@Deprecated
public static java.sql.Connection tryGenericConnectionSources(java.lang.String helperName,
                                                                         org.w3c.dom.Element inlineJdbcElement)
                                                       throws java.sql.SQLException,
                                                              GenericEntityException
Deprecated. 

Throws:
java.sql.SQLException
GenericEntityException

getManagedConnectionFactory

public static ConnectionFactoryInterface getManagedConnectionFactory()

getManagedConnection

public static java.sql.Connection getManagedConnection(java.lang.String helperName,
                                                       org.w3c.dom.Element inlineJdbcElement)
                                                throws java.sql.SQLException,
                                                       GenericEntityException
Throws:
java.sql.SQLException
GenericEntityException

closeAllManagedConnections

public static void closeAllManagedConnections()

loadDriver

public static void loadDriver(java.lang.String driverName)
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

unloadDriver

public static void unloadDriver(java.lang.String driverName)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException