I may be confused here, but I shoudn't be using ActiveMQ's data source.
Since from the JavaScript I'm making an Asyn call to a struts application
which is doing the hibernate stuff and just spitting back plain text, why is
ActiveMQ controlling the connection? This is the simple logic in the
struts app:
public static List getUsers() {
Session session = null;
List callerList = null;
try{
// This step will read hibernate.cfg.xml and prepare hibernate
for use
SessionFactory sessionFactory = new
Configuration().configure().buildSessionFactory();
session =sessionFactory.openSession();
//Using from Clause
String SQL_QUERY = SQL.getUsers;
Query query = session.createQuery(SQL_QUERY);
callerList = query.list();
session.flush();
session.close();
}catch(Exception e){
//System.out.println(e.getMessage());
}finally{
try {
if (session != null) {
session.flush();
session.close();
}
} catch (Exception e) {}
}
return callerList;
}
--
View this message in context:
http://www.nabble.com/ActiveMQ-Ajax-not-closing-Mysql-Connection-tf2029061.html#a5581183
Sent from the ActiveMQ - User forum at Nabble.com.