Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 72066 invoked from network); 31 Jul 2006 18:19:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jul 2006 18:19:59 -0000 Received: (qmail 36975 invoked by uid 500); 31 Jul 2006 18:19:59 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 36793 invoked by uid 500); 31 Jul 2006 18:19:59 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 36784 invoked by uid 99); 31 Jul 2006 18:19:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 11:19:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2006 11:19:58 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1G7cMc-0005Lp-6Q for activemq-users@geronimo.apache.org; Mon, 31 Jul 2006 11:19:38 -0700 Message-ID: <5581183.post@talk.nabble.com> Date: Mon, 31 Jul 2006 11:19:38 -0700 (PDT) From: jefetech To: activemq-users@geronimo.apache.org Subject: Re: ActiveMQ Ajax not closing Mysql Connection In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: info@jefetech.com X-Nabble-From: jefetech References: <5580663.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.