Get rid of the concierge holding standalone connection

This commit is contained in:
Prasanna Santhanam 2012-08-27 14:38:21 -04:00
parent 9d2cf01717
commit 84caa636cf

View File

@ -109,6 +109,7 @@ public class SimulatorManagerImpl implements SimulatorManager {
private ConnectionConcierge _concierge; private ConnectionConcierge _concierge;
@Override @Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException { public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
/*
try { try {
Connection conn = Transaction.getStandaloneConnectionWithException(); Connection conn = Transaction.getStandaloneConnectionWithException();
conn.setAutoCommit(true); conn.setAutoCommit(true);
@ -116,6 +117,7 @@ public class SimulatorManagerImpl implements SimulatorManager {
} catch (SQLException e) { } catch (SQLException e) {
throw new CloudRuntimeException("Unable to get a db connection", e); throw new CloudRuntimeException("Unable to get a db connection", e);
} }
*/
return true; return true;
} }
@ -152,8 +154,8 @@ public class SimulatorManagerImpl implements SimulatorManager {
@DB @DB
@Override @Override
public Answer simulate(Command cmd, String hostGuid) { public Answer simulate(Command cmd, String hostGuid) {
Transaction txn = Transaction.currentTxn(); Transaction txn = Transaction.open(Transaction.SIMULATOR_DB);
txn.transitToUserManagedConnection(_concierge.conn()); // txn.transitToUserManagedConnection(_concierge.conn());
try { try {
MockHost host = _mockHost.findByGuid(hostGuid); MockHost host = _mockHost.findByGuid(hostGuid);