Merge branch 'jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
b7a4fb7f7e
|
@ -15,7 +15,8 @@
|
|||
<Set name="hazelcastInstanceName" property="jetty.session.hazelcast.hazelcastInstanceName"/>
|
||||
<Set name="scavengeZombies" property="jetty.session.hazelcast.scavengeZombies"/>
|
||||
<Set name="gracePeriodSec"><Property name="jetty.session.gracePeriod.seconds" default="3600" /></Set>
|
||||
<Set name="savePeriodSec" property="jetty.session.savePeriod.seconds"/>
|
||||
<Set name="savePeriodSec"><Property name="jetty.session.savePeriod.seconds" default="0" /></Set>
|
||||
<Set name="configurationLocation"><Property name="jetty.session.hazelcast.configurationLocation" default="" /></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
<Set name="addresses">
|
||||
<Property name="jetty.session.hazelcast.addresses" default="" />
|
||||
</Set>
|
||||
<Set name="configurationLocation">
|
||||
<Property name="jetty.session.hazelcast.configurationLocation" default="" />
|
||||
</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
|
|
@ -34,3 +34,4 @@ jetty.session.hazelcast.hazelcastInstanceName=JETTY_DISTRIBUTED_SESSION_INSTANCE
|
|||
jetty.session.hazelcast.scavengeZombies=false
|
||||
jetty.session.gracePeriod.seconds=3600
|
||||
jetty.session.savePeriod.seconds=0
|
||||
#jetty.session.hazelcast.configurationLocation
|
||||
|
|
|
@ -36,4 +36,5 @@ jetty.session.hazelcast.onlyClient=true
|
|||
jetty.session.hazelcast.scavengeZombies=false
|
||||
jetty.session.gracePeriod.seconds=3600
|
||||
jetty.session.savePeriod.seconds=0
|
||||
#jetty.session.hazelcast.configurationLocation
|
||||
#jetty.session.hazelcast.addresses=
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.eclipse.jetty.server.session.SessionData;
|
|||
import org.eclipse.jetty.server.session.SessionDataStore;
|
||||
import org.eclipse.jetty.server.session.SessionDataStoreFactory;
|
||||
import org.eclipse.jetty.server.session.SessionHandler;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
|
||||
/**
|
||||
* Factory to construct {@link HazelcastSessionDataStore}
|
||||
|
@ -82,7 +83,7 @@ public class HazelcastSessionDataStoreFactory
|
|||
{
|
||||
if (onlyClient)
|
||||
{
|
||||
if (configurationLocation == null)
|
||||
if (StringUtil.isEmpty(configurationLocation))
|
||||
{
|
||||
ClientConfig config = new ClientConfig();
|
||||
|
||||
|
@ -106,7 +107,7 @@ public class HazelcastSessionDataStoreFactory
|
|||
else
|
||||
{
|
||||
Config config;
|
||||
if (configurationLocation == null)
|
||||
if (StringUtil.isEmpty(configurationLocation))
|
||||
{
|
||||
|
||||
SerializerConfig sc = new SerializerConfig()
|
||||
|
|
|
@ -529,7 +529,7 @@ public class Response implements HttpServletResponse
|
|||
resetBuffer();
|
||||
setHeader(HttpHeader.LOCATION, location);
|
||||
setStatus(code);
|
||||
completeOutput();
|
||||
closeOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -849,7 +849,7 @@ public class Response implements HttpServletResponse
|
|||
{
|
||||
try
|
||||
{
|
||||
completeOutput();
|
||||
closeOutput();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
@ -887,7 +887,7 @@ public class Response implements HttpServletResponse
|
|||
return (_contentLength < 0 || written >= _contentLength);
|
||||
}
|
||||
|
||||
public void completeOutput() throws IOException
|
||||
public void closeOutput() throws IOException
|
||||
{
|
||||
if (_outputType == OutputType.WRITER)
|
||||
_writer.close();
|
||||
|
@ -895,6 +895,17 @@ public class Response implements HttpServletResponse
|
|||
_out.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* close the output
|
||||
*
|
||||
* @deprecated Use {@link #closeOutput()}
|
||||
*/
|
||||
@Deprecated
|
||||
public void completeOutput() throws IOException
|
||||
{
|
||||
closeOutput();
|
||||
}
|
||||
|
||||
public void completeOutput(Callback callback)
|
||||
{
|
||||
if (_outputType == OutputType.WRITER)
|
||||
|
|
Loading…
Reference in New Issue