tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50157] New: a lot of MapperListener is registered as ContainerListener of StandardContext
Date Tue, 26 Oct 2010 07:28:16 GMT
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


Mime
View raw message