public class ERXJDBCConnectionBroker extends Object implements ERXJDBCAdaptor.ConnectionBroker
dbSomePropertyGLOBAL
, ModelName.DBSomeProperty
or as
someProperty
in the connection dictionary.
ERXConfigurationManager
adds these entries to each
EOModels connectionDictionary.
Usage: check out a connection:
java.sql.Connection con = ERXJDBCConnectionBroker.connectionBrokerForModel(myModel).getConnection();
try {
java.sql.Statement s = con.createStatement();
//now do something with the Statement
} finally {
ERXJDBCConnectionBroker.connectionBrokerForModel(myModel).freeConnection(con);
}
Modifier and Type | Method and Description |
---|---|
static ERXJDBCConnectionBroker |
connectionBrokerForAdaptor(EOAdaptor adaptor) |
static ERXJDBCConnectionBroker |
connectionBrokerForEntityNamed(String ename) |
static ERXJDBCConnectionBroker |
connectionBrokerForEoInEditingContext(EOEnterpriseObject eo) |
static ERXJDBCConnectionBroker |
connectionBrokerForModel(EOModel model) |
static ERXJDBCConnectionBroker |
connectionBrokerForModelWithName(String modelName) |
void |
freeConnection(Connection conn)
Frees a connection.
|
Connection |
getConnection()
This method hands out the connections in round-robin order.
|
boolean |
supportsTransaction() |
String |
toString() |
public static ERXJDBCConnectionBroker connectionBrokerForModelWithName(String modelName)
public static ERXJDBCConnectionBroker connectionBrokerForModel(EOModel model)
public static ERXJDBCConnectionBroker connectionBrokerForEoInEditingContext(EOEnterpriseObject eo)
public static ERXJDBCConnectionBroker connectionBrokerForEntityNamed(String ename)
public static ERXJDBCConnectionBroker connectionBrokerForAdaptor(EOAdaptor adaptor)
public Connection getConnection()
getConnection
in interface ERXJDBCAdaptor.ConnectionBroker
public void freeConnection(Connection conn)
freeConnection
in interface ERXJDBCAdaptor.ConnectionBroker
public boolean supportsTransaction()
Copyright © 2002 – 2024 Project Wonder.