Skip to content

Commit

Permalink
Merge pull request #101 from GoogleCloudPlatform:jetty-server-dump
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 617659640
Change-Id: Ice346a55d54a66d5d2606282fe6464bd8f3a48e7
  • Loading branch information
gae-java-bot committed Mar 20, 2024
2 parents 196a354 + f9e1e57 commit a29bbfd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
import com.google.apphosting.runtime.AppVersion;
import com.google.apphosting.runtime.SessionStore;
import com.google.apphosting.runtime.SessionStoreFactory;
import java.util.Objects;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.handler.HotSwapHandler;
import org.eclipse.jetty.session.SessionManager;

import java.util.Objects;

/**
* {@code AppVersionHandlerMap} is a {@code HandlerContainer} that identifies each child {@code
* Handler} with a particular {@code AppVersionKey}.
Expand All @@ -37,7 +38,6 @@
public class AppVersionHandler extends HotSwapHandler {
private final AppVersionHandlerFactory appVersionHandlerFactory;
private AppVersion appVersion;
private org.eclipse.jetty.server.Handler handler;

public AppVersionHandler(AppVersionHandlerFactory appVersionHandlerFactory) {
this.appVersionHandlerFactory = appVersionHandlerFactory;
Expand Down Expand Up @@ -78,6 +78,10 @@ public synchronized boolean ensureHandler(AppVersionKey appVersionKey) throws Ex
if (handler == null) {
handler = appVersionHandlerFactory.createHandler(appVersion);
setHandler(handler);

if (Boolean.getBoolean("jetty.server.dumpAfterStart")) {
handler.getServer().dumpStdErr();
}
}
return (handler != null);
}
Expand Down

0 comments on commit a29bbfd

Please sign in to comment.