Skip to content

Commit

Permalink
[#1803] Add TCK tweaks to pax-web-jetty and pax-web-undertow
Browse files Browse the repository at this point in the history
  • Loading branch information
grgrzybek committed Apr 6, 2023
1 parent 1645b35 commit 460363c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1018,8 +1018,8 @@ public void visitOsgiContextModelChange(OsgiContextModelChange change) {
}
}

// and the highest ranked context should be registered as OSGi service (if it wasn't registered)
highestRankedContext.register();
// // and the highest ranked context should be registered as OSGi service (if it wasn't registered)
// highestRankedContext.register();
}

if (hasStopped) {
Expand Down Expand Up @@ -2423,6 +2423,10 @@ private void ensureServletContextStarted(PaxWebServletContextHandler sch) {
}

dynamicContext.rememberAttributesFromSCIs();

// only now, according to https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.war.html#d0e100694
// register the servlet context
highestRankedContext.register();
} catch (Exception e) {
LOG.error(e.getMessage(), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,8 @@ public void visitOsgiContextModelChange(OsgiContextModelChange change) {
}
}

// and the highest ranked context should be registered as OSGi service (if it wasn't registered)
highestRankedContext.register();
// // and the highest ranked context should be registered as OSGi service (if it wasn't registered)
// highestRankedContext.register();
}
DeploymentInfo deploymentInfo = deploymentInfos.get(contextPath);
if (deploymentInfo != null) {
Expand Down Expand Up @@ -2908,6 +2908,10 @@ public String rewriteUrl(String originalUrl, String sessionId) {

// actual registration of "context" in Undertow's path handler.
pathHandler.addPrefixPath(contextPath, handler);

// only now, according to https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.war.html#d0e100694
// register the servlet context
highestRankedContext.register();
} catch (ServletException e) {
throw new IllegalStateException("Can't start Undertow context "
+ contextPath + ": " + e.getMessage(), e);
Expand Down

0 comments on commit 460363c

Please sign in to comment.