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 44E6610E57 for ; Thu, 16 Jan 2014 19:42:05 +0000 (UTC) Received: (qmail 61570 invoked by uid 500); 16 Jan 2014 19:41:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 61535 invoked by uid 500); 16 Jan 2014 19:41:56 -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 61443 invoked by uid 99); 16 Jan 2014 19:41:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jan 2014 19:41:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Ilya.Kazakevich@jetbrains.com designates 46.137.178.215 as permitted sender) Received: from [46.137.178.215] (HELO mail1.intellij.net) (46.137.178.215) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jan 2014 19:41:45 +0000 Received: (qmail 8248 invoked by uid 89); 16 Jan 2014 19:41:23 -0000 Received: from unknown (HELO UNIT489) (Ilya.Kazakevich@JetBrains.com@81.3.129.2) by ip-10-62-119-91.eu-west-1.compute.internal with ESMTPA; 16 Jan 2014 19:41:22 -0000 From: "Ilya Kazakevich" To: References: <011901cf12e0$b7047290$250d57b0$@JetBrains.com> In-Reply-To: Subject: RE: Connect ApacheMQ with web application using JMS Date: Thu, 16 Jan 2014 23:40:23 +0400 Organization: JetBrains Message-ID: <012f01cf12f2$cc9adb00$65d09100$@JetBrains.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFMSUlhM8rbpM63vtvTYJ8vMz4DKgHaNca/m35+q1A= Content-Language: ru X-Virus-Checked: Checked by ClamAV on apache.org Hello,=20 >-----Original Message----- >From: Jose Mar=EDa Zaragoza [mailto:demablogia@gmail.com] >Sent: Thursday, January 16, 2014 11:30 PM >To: users >Subject: Re: Connect ApacheMQ with web application using JMS .... >A Connection is thread safe, but Sessions, MessageProducers, and >MessageConsumers are not. The recommended strategy is to use one = Session per >application thread. Thank you. So, I can store session and consumer in HTTP session and synchronize = access to it (to prevent access from several browser tabs), right? Would not it be too heavy to have 200 sessions and 400 consumers (for = 200 users)? Or should I get all messages in one thread and then pass them to user threads? Ilya.