Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 17464 invoked from network); 3 May 2006 12:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 May 2006 12:16:20 -0000 Received: (qmail 94801 invoked by uid 500); 3 May 2006 12:16:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 94785 invoked by uid 500); 3 May 2006 12:16:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 94774 invoked by uid 99); 3 May 2006 12:16:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 05:16:05 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.227.126.177] (HELO moutng.kundenserver.de) (212.227.126.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 May 2006 05:16:04 -0700 Received: from [172.23.4.159] (helo=pustefix159.kundenserver.de) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2Dk-1FbGGc1HP2-0000is; Wed, 03 May 2006 14:15:42 +0200 Message-Id: <5202139.17301146658526400.JavaMail.servlet@kundenserver> From: gslt@gslweb.de To: Subject: Re: Servlet inter-communication MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 X-Binford: 6100 (more power) X-Mailer: Webmail X-Originating-From: 27073379 X-Routing: DE X-Message-Id: <27073379$1146658486173172.23.4.15932728895@pustefix159.kundenserver.de-1808480904> X-Received: from pustefix159.kundenserver.de by 213.68.186.118 with HTTP id 27073379 for [users@tomcat.apache.org]; Wed, 3 May 2006 14:14:46 CEST Date: Wed, 03 May 2006 14:15:42 +0200 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >> From: Samuli Elomaa [mailto:samuli.elomaa@pp.inet.fi] >> Is there any otherway for two servlets in same tomcat to communicate >> together except by http requests? Eg. could two servlets use >> somekind of shared memory? or send signals to each other? > >Both could in theory rendezvous at a common filename. However, it may >be easier to put a singleton class in shared/lib. I think the standard way would be to use a a session bean, if the communication is limited to a session, or an application bean if not. This is sort of shared memory, but beware of concurrent access and synchronise. Both ways work only if the servlets are in the same webapp. I would refrain from using files in any case. If the servlets are not in the same webapp, then IMHO the only clean way is HTTP. Georg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org