Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B71F7106DC for ; Wed, 3 Jul 2013 19:28:19 +0000 (UTC) Received: (qmail 33349 invoked by uid 500); 3 Jul 2013 19:28:19 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 33320 invoked by uid 500); 3 Jul 2013 19:28:19 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 33312 invoked by uid 99); 3 Jul 2013 19:28:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 19:28:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christian.posta@gmail.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-la0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 19:28:12 +0000 Received: by mail-la0-f50.google.com with SMTP id dy20so498412lab.9 for ; Wed, 03 Jul 2013 12:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wnomdbHG/xFpSK3dj2ZBZMbaLHrLplGiTgrV+DirWpc=; b=NQhRcWmZiFnHq5UY+zcz/E88O5D/bUJZKGoj8UW8yma95Kyz68yg1J/NOLN7GQRHmg S5Zqw2reU0p0B3zRMGsQDAUeCJ3w0f/3ONb22SrHl4ZQ5eENKfmviIlA0mFLDfSLUToU Z+z2x1HTvGKq0jjaCCNnIFV5s329NDOMPb7zuyO+eoBtiBwZKYLND63Zo2BRbOAhpkpc dNXnQqrKwbO7VLPkntNU9cg/j/FmASF8h6Tk5/3D0NMozR2NW8u5LvJiFR4rzG7kzC+E gclic/HeAMXGtoOrOfQC32CkipH9OhuD1IQhJPdax3kUxbzWVTC4TPsPgW5eIB7Ws3tU uVKQ== MIME-Version: 1.0 X-Received: by 10.152.120.105 with SMTP id lb9mr1200237lab.20.1372879672132; Wed, 03 Jul 2013 12:27:52 -0700 (PDT) Received: by 10.114.185.37 with HTTP; Wed, 3 Jul 2013 12:27:52 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Jul 2013 15:27:52 -0400 Message-ID: Subject: Re: jmsTemplate + add listener to listener container From: Christian Posta To: "users@activemq.apache.org" Content-Type: multipart/alternative; boundary=089e0122868a2d4d2104e0a07563 X-Virus-Checked: Checked by ClamAV on apache.org --089e0122868a2d4d2104e0a07563 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Those might be good questions to ask in the Spring forum? On Wed, Jul 3, 2013 at 3:11 PM, Jose Mar=EDa Zaragoza wrote: > Hello: > > I'm newbie with Apache ActiveMQ and > I've started using 5.8.0 release + Spring > > > I want that every session created in a servlet container ( Tomcat ), > subscribes itself as consumer/listener for message from a Topic ( create= d > into JMS broker by an admin ) > > I've got some questions: > > If I've got a listener container as > > > ref=3D"queueListener" /> > > > > 1) > > Can I add ( a.k.a MessageListener ) to Listener Container = on > runtime ? > I want to add one listener per web session > How ? > > 2) > > If I can't, > > Can I create a Consumer on runtime and set a MessageListener for it by > using jmsTemplate? > I tried to do it with JMS API in jmsTemplate.execute() with > SessionCallback, > And a Consumer is created but MessageListener never is called and message > is never consumed from Topic. > > Why ? How ? > > > 3) > > If I can't , > > If I use PooledConnectionFactory + JMS API ( no listener-container ) > do I need to close Connection objects and release Consumers/Producers by > hand ? > > Remember I want to create a Consumer per session > > > 4) > > Is there other way to do all these things on an easy mode ? > > > Thanks and regards > --=20 *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta --089e0122868a2d4d2104e0a07563--