tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45764] New: Embedded fails to configure hosts with HostConfig
Date Mon, 08 Sep 2008 19:21:30 GMT

           Summary: Embedded fails to configure hosts with HostConfig
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina

I admit that I am new to Tomcat, but the following seems like a bug. 

When attempting to launch Tomcat embedded, hosts (specifically StandardHosts)
created are not configured with a HostConfig. Consequently, all deployment
flags for WAR deployment like autoDeploy and deployOnStartup are ignored. I
recommend adding the following to the implementation of createHost(..) in the
Embedded class:

    public Host createHost(String name, String appBase) {

        ... // logging code

        StandardHost host = new StandardHost();


       +// Host config should listen for lifecycle changes in host (notably the
start event)
       +HostConfig deployer = new HostConfig();

        return (host);

The implementation of createContext() is similarly designed to use the
ContextConfig, so I assume this was omitted on accident. Otherwise, those
wanting the auto deployment capabilities when running embedded must override
the createHost() method or create a HostConfig listener manually. This change
seems well in line with the API documentation, which details that this function
should "Create, configure, and return a Host...".

If however, this was purposefully omitted, please let me know why.

Mike Huffman

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message