remove a bug

This commit is contained in:
Tienan Chen 2013-10-08 13:31:27 +08:00
parent dc8f85a09a
commit 87885469ff
1 changed files with 1 additions and 17 deletions

View File

@ -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)