Skip to content

Commit

Permalink
Fix #11553 restore startWebapp
Browse files Browse the repository at this point in the history
Fix #11553 restore startWebapp to allow interception of the start sequence after MetaData.resolve
  • Loading branch information
gregw committed Mar 22, 2024
1 parent 51fc906 commit 95576e7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1220,14 +1220,14 @@ protected void startContext()
{
//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; )
Expand All @@ -1253,6 +1253,24 @@ protected void stopContext() throws Exception
}
}

/**
* 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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1294,14 +1294,14 @@ protected void startContext()
{
//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; )
Expand All @@ -1327,6 +1327,24 @@ protected void stopContext() throws Exception
}
}

/**
* 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)
{
Expand Down

0 comments on commit 95576e7

Please sign in to comment.