assert transactionManager != null;
assert trackedConnectionAssociator != null;
assert jettyContainer != null;
SessionHandler sessionHandler = handlerFactory == null ? new SessionHandler() : handlerFactory.createHandler();
//TODO construct an interceptor chain inside one of the Handlers.
JettySecurityHandler securityHandler = null;
if (securityRealmName != null) {
securityHandler = new JettySecurityHandler();
InternalJAASJettyRealm internalJAASJettyRealm = jettyContainer.addRealm(securityRealmName);
//wrap jetty realm with something that knows the dumb realmName
JAASJettyRealm realm = new JAASJettyRealm(realmName, internalJAASJettyRealm);
securityHandler.setUserRealm(realm);
securityHandler.init(policyContextID, defaultPrincipal, checkedPermissions, excludedPermissions, classLoader);
}
PreHandler preHandler = null == preHandlerFactory ? null : preHandlerFactory.createHandler();
ServletHandler servletHandler = new JettyServletHandler(preHandler);