Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
This commit is contained in:
commit
71a1e419fa
|
@ -10,49 +10,26 @@
|
|||
<Call name="addBean">
|
||||
<Arg>
|
||||
<New id="sessionDataStoreFactory" class="org.eclipse.jetty.gcloud.session.GCloudSessionDataStoreFactory">
|
||||
<Set name="gracePeriodSec"><Property name="jetty.session.gracePeriod.seconds" default="3600" /></Set>
|
||||
<Set name="gracePeriodSec" property="jetty.session.gracePeriod.seconds"/>
|
||||
<Set name="savePeriodSec" property="jetty.session.savePeriod.seconds"/>
|
||||
<Set name="maxRetries"><Property name="jetty.session.gcloud.maxRetries" default="5"/></Set>
|
||||
<Set name="maxRetries" property="jetty.session.gcloud.maxRetries"/>
|
||||
<Set name="backoffMs" property="jetty.session.gcloud.backoffMs"/>
|
||||
<Set name="namespace" property="jetty.session.gcloud.namespace"/>
|
||||
<Set name="entityDataModel">
|
||||
<New class="org.eclipse.jetty.gcloud.session.GCloudSessionDataStore$EntityDataModel">
|
||||
<Set name="kind">
|
||||
<Property name="jetty.session.gcloud.model.kind" default="GCloudSession" />
|
||||
</Set>
|
||||
<Set name="id">
|
||||
<Property name="jetty.session.gcloud.model.id" default="id" />
|
||||
</Set>
|
||||
<Set name="contextPath">
|
||||
<Property name="jetty.session.gcloud.model.contextPath" default="contextPath" />
|
||||
</Set>
|
||||
<Set name="vhost">
|
||||
<Property name="jetty.session.gcloud.model.vhost" default="vhost" />
|
||||
</Set>
|
||||
<Set name="accessed">
|
||||
<Property name="jetty.session.gcloud.model.accessed" default="accessed" />
|
||||
</Set>
|
||||
<Set name="lastAccessed">
|
||||
<Property name="jetty.session.gcloud.model.lastAccessed" default="lastAccessed" />
|
||||
</Set>
|
||||
<Set name="createTime">
|
||||
<Property name="jetty.session.gcloud.model.createTime" default="createTime" />
|
||||
</Set>
|
||||
<Set name="cookieSetTime">
|
||||
<Property name="jetty.session.gcloud.model.cookieSetTime" default="cookieSetTime" />
|
||||
</Set>
|
||||
<Set name="lastNode">
|
||||
<Property name="jetty.session.gcloud.model.lastNode" default="lastNode" />
|
||||
</Set>
|
||||
<Set name="expiry">
|
||||
<Property name="jetty.session.gcloud.model.expiry" default="expiry" />
|
||||
</Set>
|
||||
<Set name="maxInactive">
|
||||
<Property name="jetty.session.gcloud.model.maxInactive" default="maxInactive" />
|
||||
</Set>
|
||||
<Set name="attributes">
|
||||
<Property name="jetty.session.gcloud.model.attributes" default="attributes" />
|
||||
</Set>
|
||||
<Set name="kind" property="jetty.session.gcloud.model.kind"/>
|
||||
<Set name="id" property="jetty.session.gcloud.model.id"/>
|
||||
<Set name="contextPath" property="jetty.session.gcloud.model.contextPath"/>
|
||||
<Set name="vhost" property="jetty.session.gcloud.model.vhost"/>
|
||||
<Set name="accessed" property="jetty.session.gcloud.model.accessed"/>
|
||||
<Set name="lastAccessed" property="jetty.session.gcloud.model.lastAccessed"/>
|
||||
<Set name="createTime" property="jetty.session.gcloud.model.createTime"/>
|
||||
<Set name="cookieSetTime" property="jetty.session.gcloud.model.cookieSetTime"/>
|
||||
<Set name="lastNode" property="jetty.session.gcloud.model.lastNode"/>
|
||||
<Set name="lastSaved" property="jetty.session.gcloud.model.lastSaved"/>
|
||||
<Set name="expiry" property="jetty.session.gcloud.model.expiry"/>
|
||||
<Set name="maxInactive" property="jetty.session.gcloud.model.maxInactive"/>
|
||||
<Set name="attributes" property="jetty.session.gcloud.model.attributes"/>
|
||||
</New>
|
||||
</Set>
|
||||
</New>
|
||||
|
|
|
@ -42,6 +42,7 @@ etc/sessions/gcloud/session-store.xml
|
|||
#jetty.session.gcloud.model.createTime=createTime
|
||||
#jetty.session.gcloud.model.cookieSetTime=cookieSetTime
|
||||
#jetty.session.gcloud.model.lastNode=lastNode
|
||||
#jetty.session.gcloud.model.lastSaved=lastSaved
|
||||
#jetty.session.gcloud.model.expiry=expiry
|
||||
#jetty.session.gcloud.model.maxInactive=maxInactive
|
||||
#jetty.session.gcloud.model.attributes=attributes
|
||||
|
|
|
@ -55,6 +55,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
|
|||
public static final int DEFAULT_MAX_QUERY_RESULTS = 100;
|
||||
public static final int DEFAULT_MAX_RETRIES = 5;
|
||||
public static final int DEFAULT_BACKOFF_MS = 1000;
|
||||
public static final String DEFAULT_NAMESPACE = "";
|
||||
|
||||
protected Datastore _datastore;
|
||||
protected KeyFactory _keyFactory;
|
||||
|
@ -65,7 +66,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
|
|||
protected boolean _indexesPresent = false;
|
||||
protected EntityDataModel _model;
|
||||
protected boolean _modelProvided;
|
||||
private String _namespace;
|
||||
private String _namespace = DEFAULT_NAMESPACE;
|
||||
|
||||
/**
|
||||
* EntityDataModel
|
||||
|
@ -431,7 +432,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore
|
|||
_namespace = namespace;
|
||||
}
|
||||
|
||||
@ManagedAttribute(value = "gclound namespace", readonly = true)
|
||||
@ManagedAttribute(value = "gcloud namespace", readonly = true)
|
||||
public String getNamespace()
|
||||
{
|
||||
return _namespace;
|
||||
|
|
|
@ -22,9 +22,9 @@ import org.eclipse.jetty.server.session.SessionHandler;
|
|||
*/
|
||||
public class GCloudSessionDataStoreFactory extends AbstractSessionDataStoreFactory
|
||||
{
|
||||
private String _namespace;
|
||||
private int _maxRetries;
|
||||
private int _backoffMs;
|
||||
private String _namespace = GCloudSessionDataStore.DEFAULT_NAMESPACE;
|
||||
private int _maxRetries = GCloudSessionDataStore.DEFAULT_MAX_RETRIES;
|
||||
private int _backoffMs = GCloudSessionDataStore.DEFAULT_BACKOFF_MS;
|
||||
private GCloudSessionDataStore.EntityDataModel _model;
|
||||
|
||||
public GCloudSessionDataStore.EntityDataModel getEntityDataModel()
|
||||
|
@ -80,8 +80,9 @@ public class GCloudSessionDataStoreFactory extends AbstractSessionDataStoreFacto
|
|||
ds.setBackoffMs(getBackoffMs());
|
||||
ds.setMaxRetries(getMaxRetries());
|
||||
ds.setGracePeriodSec(getGracePeriodSec());
|
||||
ds.setNamespace(_namespace);
|
||||
ds.setNamespace(getNamespace());
|
||||
ds.setSavePeriodSec(getSavePeriodSec());
|
||||
ds.setEntityDataModel(getEntityDataModel());
|
||||
return ds;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<Set name="mapName" property="jetty.session.hazelcast.mapName"/>
|
||||
<Set name="hazelcastInstanceName" property="jetty.session.hazelcast.hazelcastInstanceName"/>
|
||||
<Set name="useQueries" property="jetty.session.hazelcast.useQueries"/>
|
||||
<Set name="gracePeriodSec"><Property name="jetty.session.gracePeriod.seconds" default="3600" /></Set>
|
||||
<Set name="savePeriodSec"><Property name="jetty.session.savePeriod.seconds" default="0" /></Set>
|
||||
<Set name="gracePeriodSec" property="jetty.session.gracePeriod.seconds"/>
|
||||
<Set name="savePeriodSec" property="jetty.session.savePeriod.seconds"/>
|
||||
<Set name="configurationLocation"><Property name="jetty.session.hazelcast.configurationLocation" default="" /></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
|
|
|
@ -10,21 +10,11 @@
|
|||
<Call name="addBean">
|
||||
<Arg>
|
||||
<New id="sessionDataStoreFactory" class="org.eclipse.jetty.hazelcast.session.HazelcastSessionDataStoreFactory">
|
||||
<Set name="mapName">
|
||||
<Property name="jetty.session.hazelcast.mapName" default="jetty-distributed-session-map" />
|
||||
</Set>
|
||||
<Set name="hazelcastInstanceName">
|
||||
<Property name="jetty.session.hazelcast.hazelcastInstanceName" default="JETTY_DISTRIBUTED_SESSION_INSTANCE" />
|
||||
</Set>
|
||||
<Set name="useQueries">
|
||||
<Property name="jetty.session.hazelcast.useQueries" default="false" />
|
||||
</Set>
|
||||
<Set name="gracePeriodSec">
|
||||
<Property name="jetty.session.gracePeriod.seconds" default="3600" />
|
||||
</Set>
|
||||
<Set name="savePeriodSec">
|
||||
<Property name="jetty.session.savePeriod.seconds" default="0" />
|
||||
</Set>
|
||||
<Set name="mapName" property="jetty.session.hazelcast.mapName"/>
|
||||
<Set name="hazelcastInstanceName" property="jetty.session.hazelcast.hazelcastInstanceName"/>
|
||||
<Set name="useQueries" property="jetty.session.hazelcast.useQueries"/>
|
||||
<Set name="gracePeriodSec" property="jetty.session.gracePeriod.seconds"/>
|
||||
<Set name="savePeriodSec" property="jetty.session.savePeriod.seconds"/>
|
||||
<Set name="onlyClient">
|
||||
<Property name="jetty.session.hazelcast.onlyClient" default="true" />
|
||||
</Set>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<Set name="maxConcurrentStreams" property="jetty.http2c.maxConcurrentStreams"/>
|
||||
<Set name="initialStreamRecvWindow" property="jetty.http2c.initialStreamRecvWindow"/>
|
||||
<Set name="initialSessionRecvWindow" property="jetty.http2.initialSessionRecvWindow"/>
|
||||
<Set name="maxSettingsKeys"><Property name="jetty.http2.maxSettingsKeys" default="64"/></Set>
|
||||
<Set name="maxSettingsKeys" property="jetty.http2.maxSettingsKeys"/>
|
||||
<Set name="rateControlFactory">
|
||||
<New class="org.eclipse.jetty.http2.parser.WindowRateControl$Factory">
|
||||
<Arg type="int"><Property name="jetty.http2.rateControl.maxEventsPerSecond" default="20"/></Arg>
|
||||
|
|
|
@ -18,13 +18,13 @@ etc/jetty-http2c.xml
|
|||
[ini-template]
|
||||
# tag::documentation[]
|
||||
## Specifies the maximum number of concurrent requests per session.
|
||||
# jetty.http2c.maxConcurrentStreams=1024
|
||||
# jetty.http2c.maxConcurrentStreams=128
|
||||
|
||||
## Specifies the initial stream receive window (client to server) in bytes.
|
||||
# jetty.http2c.initialStreamRecvWindow=65535
|
||||
# jetty.http2c.initialStreamRecvWindow=524288
|
||||
|
||||
## Specifies the initial session receive window (client to server) in bytes.
|
||||
# jetty.http2.initialSessionRecvWindow=1048576
|
||||
# jetty.http2.initialSessionRecvWindow=1232896
|
||||
|
||||
## Specifies the maximum number of keys in all SETTINGS frames received by a session.
|
||||
# jetty.http2.maxSettingsKeys=64
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<New id="Rewrite" class="org.eclipse.jetty.rewrite.RewriteCustomizer">
|
||||
<Set name="rewriteRequestURI" property="jetty.rewrite.rewriteRequestURI"/>
|
||||
<Set name="rewritePathInfo" property="jetty.rewrite.rewritePathInfo"/>
|
||||
<Set name="originalPathAttribute" property="jetty.rewrite.originalPathAttribute"/>
|
||||
<Set name="originalPathAttribute"><Property name="jetty.rewrite.originalPathAttribute" default="requestedPath"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<New class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
|
||||
<Set name="rewriteRequestURI" property="jetty.rewrite.rewriteRequestURI"/>
|
||||
<Set name="rewritePathInfo" property="jetty.rewrite.rewritePathInfo"/>
|
||||
<Set name="originalPathAttribute" property="jetty.rewrite.originalPathAttribute"/>
|
||||
<Set name="originalPathAttribute"><Property name="jetty.rewrite.originalPathAttribute" default="requestedPath"/></Set>
|
||||
|
||||
<!-- Set DispatcherTypes -->
|
||||
<Set name="dispatcherTypes">
|
||||
|
|
|
@ -13,11 +13,7 @@
|
|||
<Arg>
|
||||
<New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
|
||||
<Set name="minGzipSize" property="jetty.gzip.minGzipSize"/>
|
||||
<Set name="checkGzExists" property="jetty.gzip.checkGzExists"/>
|
||||
<Set name="compressionLevel" property="jetty.gzip.compressionLevel"/>
|
||||
<Set name="inflateBufferSize" property="jetty.gzip.inflateBufferSize"/>
|
||||
<Set name="inflaterPoolCapacity" property="jetty.gzip.inflaterPoolCapacity"/>
|
||||
<Set name="deflaterPoolCapacity" property="jetty.gzip.deflaterPoolCapacity"/>
|
||||
<Set name="syncFlush" property="jetty.gzip.syncFlush"/>
|
||||
<Set name="dispatcherTypes" property="jetty.gzip.dispatcherTypes"/>
|
||||
<Set name="includedMethodList" property="jetty.gzip.includedMethodList"/>
|
||||
|
@ -26,6 +22,19 @@
|
|||
<Set name="excludedMimeTypes" property="jetty.gzip.excludedMimeTypeList"/>
|
||||
<Set name="includedPaths" property="jetty.gzip.includedPathList"/>
|
||||
<Set name="excludedPaths" property="jetty.gzip.excludedPathList"/>
|
||||
<Set name="inflaterPool">
|
||||
<New class="org.eclipse.jetty.util.compression.InflaterPool">
|
||||
<Arg type="int"><Property name="jetty.gzip.inflaterPool.capacity" deprecated="jetty.gzip.inflaterPoolCapacity" default="1024"/></Arg>
|
||||
<Arg type="boolean"><Property name="jetty.gzip.inflaterPool.noWrap" default="true"/></Arg>
|
||||
</New>
|
||||
</Set>
|
||||
<Set name="deflaterPool">
|
||||
<New class="org.eclipse.jetty.util.compression.DeflaterPool">
|
||||
<Arg type="int"><Property name="jetty.gzip.deflaterPool.capacity" deprecated="jetty.gzip.deflaterPoolCapacity" default="1024"/></Arg>
|
||||
<Arg type="int"><Property name="jetty.gzip.deflaterPool.compressionLevel" deprecated="jetty.gzip.compressionLevel" default="-1"/></Arg>
|
||||
<Arg type="boolean"><Property name="jetty.gzip.deflaterPool.noWrap" default="true"/></Arg>
|
||||
</New>
|
||||
</Set>
|
||||
|
||||
<!--
|
||||
<Set name="includedMethods">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<Arg>
|
||||
<New id="ThreadLimitHandler" class="org.eclipse.jetty.server.handler.ThreadLimitHandler">
|
||||
<Arg name="forwardedHeader"><Property name="jetty.threadlimit.forwardedHeader"/></Arg>
|
||||
<Set name="enabled" property="jetty.threadlimit.enabled"/>
|
||||
<Set name="enabled"><Property name="jetty.threadlimit.enabled" default="true"/></Set>
|
||||
<Set name="threadLimit" property="jetty.threadlimit.threadLimit"/>
|
||||
</New>
|
||||
</Arg>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<Set name="requestHeaderSize" property="jetty.httpConfig.requestHeaderSize"/>
|
||||
<Set name="responseHeaderSize" property="jetty.httpConfig.responseHeaderSize"/>
|
||||
<Set name="sendServerVersion" property="jetty.httpConfig.sendServerVersion"/>
|
||||
<Set name="sendDateHeader" property="jetty.httpConfig.sendDateHeader"/>
|
||||
<Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" default="false"/></Set>
|
||||
<Set name="headerCacheSize" property="jetty.httpConfig.headerCacheSize"/>
|
||||
<Set name="delayDispatchUntilContent" property="jetty.httpConfig.delayDispatchUntilContent"/>
|
||||
<Set name="maxErrorDispatches" property="jetty.httpConfig.maxErrorDispatches"/>
|
||||
|
@ -105,7 +105,7 @@
|
|||
<!-- =========================================================== -->
|
||||
<!-- extra server options -->
|
||||
<!-- =========================================================== -->
|
||||
<Set name="stopAtShutdown" property="jetty.server.stopAtShutdown"/>
|
||||
<Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
|
||||
<Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
|
||||
<Set name="dumpAfterStart" property="jetty.server.dumpAfterStart"/>
|
||||
<Set name="dumpBeforeStop" property="jetty.server.dumpBeforeStop"/>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<Call name="addBean">
|
||||
<Arg>
|
||||
<New id="sessionDataStoreFactory" class="org.eclipse.jetty.server.session.JDBCSessionDataStoreFactory">
|
||||
<Set name="gracePeriodSec"><Property name="jetty.session.gracePeriod.seconds" default="3600" /></Set>
|
||||
<Set name="savePeriodSec"><Property name="jetty.session.savePeriod.seconds" default="0" /></Set>
|
||||
<Set name="gracePeriodSec" property="jetty.session.gracePeriod.seconds"/>
|
||||
<Set name="savePeriodSec" property="jetty.session.savePeriod.seconds"/>
|
||||
<Set name="databaseAdaptor">
|
||||
<Ref refid="databaseAdaptor" />
|
||||
</Set>
|
||||
|
|
|
@ -21,17 +21,23 @@ etc/jetty-gzip.xml
|
|||
## Check whether a file with *.gz extension exists
|
||||
# jetty.gzip.checkGzExists=false
|
||||
|
||||
## Gzip compression level (-1 for default)
|
||||
# jetty.gzip.compressionLevel=-1
|
||||
|
||||
## Inflate request buffer size, or 0 for no request inflation
|
||||
# jetty.gzip.inflateBufferSize=0
|
||||
|
||||
## Deflater pool max size (-1 for unlimited, 0 for no pooling)
|
||||
# jetty.gzip.deflaterPoolCapacity=-1
|
||||
|
||||
## Inflater pool max size (-1 for unlimited, 0 for no pooling)
|
||||
# jetty.gzip.inflaterPoolCapacity=-1
|
||||
# jetty.gzip.inflaterPool.capacity=1024
|
||||
|
||||
## Inflater pool use GZIP compatible compression
|
||||
#jetty.gzip.inflaterPool.noWrap=true
|
||||
|
||||
## Deflater pool max size (-1 for unlimited, 0 for no pooling)
|
||||
# jetty.gzip.deflaterPool.capacity=1024
|
||||
|
||||
## Gzip compression level (-1 for default)
|
||||
# jetty.gzip.deflaterPool.compressionLevel=-1
|
||||
|
||||
## Deflater pool use GZIP compatible compression
|
||||
# jetty.gzip.deflaterPool.noWrap=true
|
||||
|
||||
## Set the {@link Deflater} flush mode to use.
|
||||
# jetty.gzip.syncFlush=false
|
||||
|
|
|
@ -62,8 +62,8 @@ etc/jetty.xml
|
|||
## HTTP Compliance: RFC7230, RFC7230_LEGACY, RFC2616, RFC2616_LEGACY, LEGACY
|
||||
# jetty.httpConfig.compliance=RFC7230
|
||||
|
||||
## URI Compliance: SAFE, STRICT
|
||||
# jetty.httpConfig.uriCompliance=SAFE
|
||||
## URI Compliance: DEFAULT, LEGACY, RFC3986, UNSAFE
|
||||
# jetty.httpConfig.uriCompliance=DEFAULT
|
||||
|
||||
## Cookie compliance mode for parsing request Cookie headers: RFC2965, RFC6265
|
||||
# jetty.httpConfig.requestCookieCompliance=RFC6265
|
||||
|
|
|
@ -31,11 +31,14 @@ public abstract class AbstractSessionDataStore extends ContainerLifeCycle implem
|
|||
{
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractSessionDataStore.class);
|
||||
|
||||
public static final int DEFAULT_GRACE_PERIOD_SEC = 60 * 60; //default of 1hr
|
||||
public static final int DEFAULT_SAVE_PERIOD_SEC = 0;
|
||||
|
||||
protected SessionContext _context; //context associated with this session data store
|
||||
protected int _gracePeriodSec = 60 * 60; //default of 1hr
|
||||
protected int _gracePeriodSec = DEFAULT_GRACE_PERIOD_SEC;
|
||||
protected long _lastExpiryCheckTime = 0; //last time in ms that getExpired was called
|
||||
protected long _lastOrphanSweepTime = 0; //last time in ms that we deleted orphaned sessions
|
||||
protected int _savePeriodSec = 0; //time in sec between saves
|
||||
protected int _savePeriodSec = DEFAULT_SAVE_PERIOD_SEC; //time in sec between saves
|
||||
|
||||
/**
|
||||
* Small utility class to allow us to
|
||||
|
|
|
@ -19,8 +19,8 @@ package org.eclipse.jetty.server.session;
|
|||
public abstract class AbstractSessionDataStoreFactory implements SessionDataStoreFactory
|
||||
{
|
||||
|
||||
int _gracePeriodSec;
|
||||
int _savePeriodSec;
|
||||
int _gracePeriodSec = AbstractSessionDataStore.DEFAULT_GRACE_PERIOD_SEC;
|
||||
int _savePeriodSec = AbstractSessionDataStore.DEFAULT_SAVE_PERIOD_SEC;
|
||||
|
||||
/**
|
||||
* @return the gracePeriodSec
|
||||
|
|
|
@ -20,7 +20,7 @@ etc/jetty-unixsocket-http2c.xml
|
|||
|
||||
[ini-template]
|
||||
## Max number of concurrent streams per connection
|
||||
# jetty.http2.maxConcurrentStreams=1024
|
||||
# jetty.http2.maxConcurrentStreams=128
|
||||
|
||||
## Initial stream receive window (client to server)
|
||||
# jetty.http2.initialStreamRecvWindow=65535
|
||||
# jetty.http2.initialStreamRecvWindow=524288
|
||||
|
|
Loading…
Reference in New Issue