Fix #11553 restore startWebapp (#11554)

Fix #11553 restore startWebapp to allow interception of the start sequence after MetaData.resolve
This commit is contained in:
Greg Wilkins 2024-03-22 03:41:14 -07:00 committed by GitHub
parent 51fc906d37
commit 6529fb2430
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 4 deletions

View File

@ -1220,14 +1220,14 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
{
//resolve the metadata
_metadata.resolve(this);
super.startContext();
startWebapp();
}
}
@Override
protected void stopContext() throws Exception
{
super.stopContext();
stopWebapp();
try
{
for (int i = _configurations.size(); i-- > 0; )
@ -1253,6 +1253,24 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
}
}
/**
* Continue the {@link #startContext()} before calling {@code super.startContext()}.
* @throws Exception If there was a problem starting
*/
protected void startWebapp() throws Exception
{
super.startContext();
}
/**
* Continue the {@link #stopContext()} before calling {@code super.stopContext()}.
* @throws Exception If there was a problem stopping
*/
protected void stopWebapp() throws Exception
{
super.stopContext();
}
@Override
public Set<String> setServletSecurity(Dynamic registration, ServletSecurityElement servletSecurityElement)
{

View File

@ -1294,14 +1294,14 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
{
//resolve the metadata
_metadata.resolve(this);
super.startContext();
startWebapp();
}
}
@Override
protected void stopContext() throws Exception
{
super.stopContext();
stopWebapp();
try
{
for (int i = _configurations.size(); i-- > 0; )
@ -1327,6 +1327,24 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
}
}
/**
* Continue the {@link #startContext()} before calling {@code super.startContext()}.
* @throws Exception If there was a problem starting
*/
protected void startWebapp() throws Exception
{
super.startContext();
}
/**
* Continue the {@link #stopContext()} before calling {@code super.stopContext()}.
* @throws Exception If there was a problem stopping
*/
protected void stopWebapp() throws Exception
{
super.stopContext();
}
@Override
public Set<String> setServletSecurity(Dynamic registration, ServletSecurityElement servletSecurityElement)
{