You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/12/10 15:10:56 UTC

DO NOT REPLY [Bug 48366] New: Class HostConfig uses File.list() method result to deploy webapp

https://issues.apache.org/bugzilla/show_bug.cgi?id=48366

           Summary: Class HostConfig uses File.list() method result to
                    deploy webapp
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: buffoonguo@gmail.com


The method ,File.list(),is not always returned a sorted array of String. In my
test, under WinXPSP3/SunJDK1.5 or Debian5.02/SunJDK1.6 or AIX5.3/IBMJDK1.5, it
works well. But, under RHEL4/SunJDK1.5, this method returned an out-of-order
array of String. My webapps need to be loaded in order. This result let them
breakdown.
So,I think HostConfig.java should be modified like this:
HostConfig.java Line490:
before
        // Deploy XML descriptors from configBase
        deployDescriptors(configBase, configBase.list());
        // Deploy WARs, and loop if additional descriptors are found
        deployWARs(appBase, appBase.list());
        // Deploy expanded folders
        deployDirectories(appBase, appBase.list());
after
        // Deploy XML descriptors from configBase
        String[] configFiles = configBase.list();
        Arrays.sort(configFiles, 0, configFiles.length);
        deployDescriptors(configBase, configFiles);
        // Deploy WARs, and loop if additional descriptors are found
        String[] appFiles = appBase.list();
        Arrays.sort(appFiles, 0, appFiles.length);
        deployWARs(appBase, appFiles);
        // Deploy expanded folders
        deployDirectories(appBase, appFiles);

-- 
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


DO NOT REPLY [Bug 48366] Class HostConfig uses File.list() method's result to deploy webapp

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48366

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Mark Thomas <ma...@apache.org> 2009-12-10 06:27:35 GMT ---
Web applications are meant to be independent. There is no guarantee on load
order.

There are better ways to achieve what you are trying to achieve. These have
been discussed several times on the users list. Please ask any further
questions you have on this topic there.

-- 
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


DO NOT REPLY [Bug 48366] Class HostConfig uses File.list() method's result to deploy webapp

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48366

HellyGuo <bu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Class HostConfig uses       |Class HostConfig uses
                   |File.list() method result   |File.list() method's result
                   |to deploy webapp            |to deploy webapp

-- 
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