Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 78343 invoked from network); 3 Jan 2003 10:40:55 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Jan 2003 10:40:55 -0000 Received: (qmail 9108 invoked by uid 97); 3 Jan 2003 10:42:02 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 9092 invoked by uid 97); 3 Jan 2003 10:42:01 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 9080 invoked by uid 98); 3 Jan 2003 10:42:00 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <02ea01c2b314$b4dd1220$c30310ac@mgarg> From: "Mohit Garg" To: "Tomcat Users List" References: <0DE15D4633A6D4119CDF001083FD00FD980C27@cust.64-52-133.165.ip.bal.ebrb.net> Subject: Re: Two instances of servlet gets created Date: Fri, 3 Jan 2003 16:11:43 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-OriginalArrivalTime: 03 Jan 2003 10:40:41.0468 (UTC) FILETIME=[8FE543C0:01C2B314] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N In my case if the request comes from within the same context, it works fine and does not creates two instances. But if I have another application deployed in different context and sending a request to my servlet, then, there is new instance of servlet gets created. I tried with one example, creating link in HTML file to call my servlet. And tried to call my servlet by copying this file into both the contexts and then clicking this link Dummy workflow TimedWfTesting_1 wf.Handler.user is the name of my servlet. The result remain same. For the different context, another instance gets created for my servlet. Is this the behaviors of servlets ? How can I control it for only one instance creation ? ----- Original Message ----- From: "Gavin, Rick" To: "Tomcat Users List" Sent: Thursday, January 02, 2003 7:37 PM Subject: RE: Two instances of servlet gets created > I have also been seeing this, I think since I have upgraded > from 4.1.12. I have a startup servlet that creates a > singleton object i use for system properties, and it calls > the createInstance of the singleton twice at startup now. > > Rick > > -----Original Message----- > From: Mohit Garg [mailto:mgarg@ggn.aithent.com] > Sent: Thursday, January 02, 2003 3:52 AM > To: Tomcat Users List > Subject: Two instances of servlet gets created > > > I have startup servlet for which one instance is created as soon as my > tomcat starts. But on the first request to the servlet there is another > instance created. i.e Another time init() is called for the servlet. > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: