remove a bug
This commit is contained in:
parent
dc8f85a09a
commit
87885469ff
|
@ -119,21 +119,6 @@ public class AgentService {
|
|||
}
|
||||
}
|
||||
|
||||
public Agent getAgentByHostName(String hostName) {
|
||||
Session session = this.getSessionHelper().openSession();
|
||||
try {
|
||||
return (Agent) session.createCriteria(Agent.class)
|
||||
.add(Restrictions.eq("hostName", hostName)).uniqueResult();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} finally {
|
||||
if (session != null) {
|
||||
session.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean recomputeRemainLoadOfAgent(Agent agent) {
|
||||
return false;
|
||||
}
|
||||
|
@ -212,8 +197,7 @@ public class AgentService {
|
|||
|
||||
public boolean resetAgent(Agent agentInParam) {
|
||||
Session session = this.getSessionHelper().openSession();
|
||||
Transaction transaction = sessionHelper.openSession()
|
||||
.beginTransaction();
|
||||
Transaction transaction = session.beginTransaction();
|
||||
try {
|
||||
Agent agentFromDB = (Agent) session
|
||||
.createCriteria(Agent.class)
|
||||
|
|
Loading…
Reference in New Issue