Package org.ofbiz.core.entity
Class ConnectionFactory
java.lang.Object
org.ofbiz.core.entity.ConnectionFactory
ConnectionFactory - central source for JDBC connections
- Since:
- 2.0
- Version:
- $Revision: 1.1 $
- Author:
- David E. Jones, Andy Zeneski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final ConnectionProviderConvenience reference to an adapter for the ConnectionProvider interface. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectiongetConnection(String helperName) static voidremoveDatasource(String helperName) Remove the datasource by the given name if one was configuredstatic ConnectiontryGenericConnectionSources(String helperName, JdbcDatasourceInfo jdbcDatasource)
-
Field Details
-
module
-
provider
Convenience reference to an adapter for the ConnectionProvider interface.
-
-
Constructor Details
-
ConnectionFactory
public ConnectionFactory()
-
-
Method Details
-
getConnection
public static Connection getConnection(String helperName) throws SQLException, GenericEntityException - Throws:
SQLExceptionGenericEntityException
-
tryGenericConnectionSources
public static Connection tryGenericConnectionSources(String helperName, JdbcDatasourceInfo jdbcDatasource) throws SQLException, GenericEntityException - Throws:
SQLExceptionGenericEntityException
-
removeDatasource
Remove the datasource by the given name if one was configured- Parameters:
helperName- The datasource to remove
-