mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
brought over agent ping uses the same db connection
This commit is contained in:
parent
10ac7753ed
commit
1b56808be5
@ -18,6 +18,7 @@
|
|||||||
package com.cloud.agent.manager;
|
package com.cloud.agent.manager;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
@ -74,12 +75,15 @@ public class AgentMonitor extends Thread implements Listener {
|
|||||||
_dcDao = dcDao;
|
_dcDao = dcDao;
|
||||||
_podDao = podDao;
|
_podDao = podDao;
|
||||||
_alertMgr = alertMgr;
|
_alertMgr = alertMgr;
|
||||||
Connection conn = Transaction.getStandaloneConnection();
|
try {
|
||||||
if (conn == null) {
|
Connection conn = Transaction.getStandaloneConnectionWithException();
|
||||||
throw new CloudRuntimeException("Unable to get a db connection.");
|
conn.setAutoCommit(true);
|
||||||
|
conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
|
||||||
|
_concierge = new ConnectionConcierge("AgentMonitor", conn, true);
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new CloudRuntimeException("Unable to get a db connection", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
_concierge = new ConnectionConcierge("AgentMonitor", conn, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO : use host machine time is not safe in clustering environment
|
// TODO : use host machine time is not safe in clustering environment
|
||||||
|
|||||||
@ -160,6 +160,7 @@ ALTER TABLE `cloud`.`disk_offering` ADD INDEX `i_disk_offering__removed`(`remove
|
|||||||
ALTER TABLE `cloud`.`storage_pool` ADD INDEX `i_storage_pool__removed`(`removed`);
|
ALTER TABLE `cloud`.`storage_pool` ADD INDEX `i_storage_pool__removed`(`removed`);
|
||||||
ALTER TABLE `cloud`.`instance_group` ADD INDEX `i_instance_group__removed`(`removed`);
|
ALTER TABLE `cloud`.`instance_group` ADD INDEX `i_instance_group__removed`(`removed`);
|
||||||
|
|
||||||
|
ALTER TABLE `cloud`.`sync_queue_item__queue_proc_number` ADD INDEX `i_sync_queue_item__queue_proc_number`(`queue_proc_number`);
|
||||||
|
ALTER TABLE `cloud`.`sync_queue_item__queue_proc_number` ADD INDEX `i_sync_queue_item__queue_proc_msid`(`queue_proc_msid`);
|
||||||
|
ALTER TABLE `cloud`.`op_nwgrp_work` ADD INDEX `i_op_nwgrp_work__taken`(`taken`);
|
||||||
|
|
||||||
|
|||||||
2
thirdparty/.classpath
vendored
2
thirdparty/.classpath
vendored
@ -2,5 +2,7 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry exported="true" kind="lib" path="jnetpcap.jar"/>
|
<classpathentry exported="true" kind="lib" path="jnetpcap.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="selenium-java-client-driver.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="selenium-server.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user