use of com.cloud.utils.db.ConnectionConcierge in project CloudStack-archive by CloudStack-extras.
the class SimulatorManagerImpl method configure.
@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
try {
Connection conn = Transaction.getStandaloneConnectionWithException();
conn.setAutoCommit(true);
_concierge = new ConnectionConcierge("SimulatorConnection", conn, true);
} catch (SQLException e) {
throw new CloudRuntimeException("Unable to get a db connection", e);
}
return true;
}
use of com.cloud.utils.db.ConnectionConcierge in project cloudstack by apache.
the class ClusterManagerImpl method getHeartbeatConnection.
private Connection getHeartbeatConnection() throws SQLException {
if (_heartbeatConnection == null) {
final Connection conn = TransactionLegacy.getStandaloneConnectionWithException();
_heartbeatConnection = new ConnectionConcierge("ClusterManagerHeartbeat", conn, false);
}
return _heartbeatConnection.conn();
}
Aggregations