Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56712
Fix session time comparisons in PersistentManagerBase.
When asking for session times use internal**() methods to avoid an IllegalStateException.

Speed up TestPersistentManager test for BZ 56698 by removing sleep(1000) and fix occasional failures.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1609920 13f79535-47bb-0310-9956-ffa450edef68
Improve changelog message: be more specific on the scope of the change.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1609926 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56658#c3
Fix regression that context reloads were broken.
Correct changelog entries.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610186 13f79535-47bb-0310-9956-ffa450edef68
Combine similar tests into same file. No functional change.
ContextRoot and WelcomeFile mapper tests are moved into TestMapperWebapps class.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610188 13f79535-47bb-0310-9956-ffa450edef68
Test for add/remove ContextVersion. The issue was reported for Tomcat 7 in "Time for 7.0.55" thread on dev mailing list.
I see no failures with Tomcat 8.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610197 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56710
Do not perform wrapper mapping if context is being reloaded,
as such mapping is useless and may fail unexpectedly.
Let mapper know that context is being reloaded.

Ignore removeWrapper(), removeWelcomeFile() calls when context is being reloaded,
as that is useless work.
During undeploy the context should have already been unregistered.
During reload the context will be re-registered via addContextVersion().

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610220 13f79535-47bb-0310-9956-ffa450edef68
Fix "No context found:" warnings from Mapper.addWrappers() -> findContextVersion() during context startup.
If context has not been started yet, its "AFTER_START" lifecycle event will come later.

A typical stacktrace:
SEVERE [main] org.apache.catalina.mapper.Mapper.findContextVersion No context found: 
	at org.apache.catalina.mapper.Mapper.findContextVersion(Mapper.java:372)
	at org.apache.catalina.mapper.Mapper.addWrappers(Mapper.java:401)
	at org.apache.catalina.mapper.MapperListener.registerWrapper(MapperListener.java:430)
	at org.apache.catalina.mapper.MapperListener.containerEvent(MapperListener.java:154)
	at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1186)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:732)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardContext.addChild(StandardContext.java:2738)
	at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1364)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1177)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610244 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56717
Fix duplicate registration of MapperListener during repeated starts of embedded Tomcat.
Properly unregister it when Tomcat stops.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610562 13f79535-47bb-0310-9956-ffa450edef68
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56717
Allow repeated Mapper.addHost() calls for the same host. E.g. if the host has been implicitly added by addContextVersion() call.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1610564 13f79535-47bb-0310-9956-ffa450edef68