activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: ActiveMQ Ajax not closing Mysql Connection
Date Mon, 31 Jul 2006 18:30:32 GMT
If you are doing struts stuff in Ajax then this has nothing to do wtih
ActiveMQ at all :)

On 7/31/06, jefetech <info@jefetech.com> wrote:
>
> 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.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message