Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 47175 invoked from network); 26 Oct 2010 07:28:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Oct 2010 07:28:42 -0000 Received: (qmail 31029 invoked by uid 500); 26 Oct 2010 07:28:42 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 30613 invoked by uid 500); 26 Oct 2010 07:28:39 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 30597 invoked by uid 99); 26 Oct 2010 07:28:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 07:28:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 07:28:37 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9Q7SGpx008605 for ; Tue, 26 Oct 2010 07:28:16 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id o9Q7SGkP008604; Tue, 26 Oct 2010 03:28:16 -0400 (EDT) Date: Tue, 26 Oct 2010 03:28:16 -0400 (EDT) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 50157] New: a lot of MapperListener is registered as ContainerListener of StandardContext X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Connectors X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: mashmk02@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=50157 Summary: a lot of MapperListener is registered as ContainerListener of StandardContext Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: minor Priority: P2 Component: Connectors AssignedTo: dev@tomcat.apache.org ReportedBy: mashmk02@gmail.com Created an attachment (id=26213) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26213) patch for MapperListener.java The same five MapperListener is registered as ContainerListener of StandardContext. At first when I add StandardHost by using "Engine addChild operation" via JMX, same MapperListener is registered as ContainerListener of StandardHost. StandardEngine.addChild() ->StandardEngine.addChildInternal() ->StandardEngine.fireContainerEvent() ->MapperListener.containerEvent() line: 133 <-- here ... ->MapperListener.containerEvent() line: 135 ->MapperListener.registerHost() line: 276 <-- here Therefore, StandardHost has the same two MapperListener as ContainerListener. --- Then, starting StandardHost by using "Host start operation", the same five MapperListener is registered as ContainerListener of StandardContext. (1)LifecycleState of StandardHost is changed to STARTING. StandardHost(LifecycleBase).start() line:140 ->StandardHost(ContainerBase).startInternal() ... ->StandardHost(ContainerBase).fireContainerEvent <-- fireContainerEvent fire two times ... ->MapperListener.containerEvent() line:133 <-- here ... ->MapperListener.containerEvent() line:137 ->MapperListener.registerContext() line:339 <-- here (2)LifecycleState of StandardHost is changed to STARTED. StandardHost(LifecycleBase).start() line:156 ... ->MapperListener.registerHost() line:279 ->MapperListener.registerContext() line:339 <-- here --- I think that the memory is wasted a little because of the above issue. On a related issue, MapperListener is not registered as Container/LifecycleListener for StandardContext on starting up Tomcat. I attached the patch for above issues. Best regards. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org