Skip to content

Commit

Permalink
Issue #4654 Hazelcast configurationLocation is not configurable via m…
Browse files Browse the repository at this point in the history
…od files (#4655)

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
  • Loading branch information
olamy authored Mar 24, 2020
1 parent 48cc21c commit e913ed2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<Set name="scavengeZombies"><Property name="jetty.session.hazelcast.scavengeZombies" 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="configurationLocation"><Property name="jetty.session.hazelcast.configurationLocation" default="" /></Set>
</New>
</Arg>
</Call>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<Set name="savePeriodSec"><Property name="jetty.session.savePeriod.seconds" default="0" /></Set>
<Set name="onlyClient"><Property name="jetty.session.hazelcast.onlyClient" default="true" /></Set>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
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}
Expand Down Expand Up @@ -82,7 +83,7 @@ public SessionDataStore getSessionDataStore(SessionHandler handler)
{
if (onlyClient)
{
if (configurationLocation == null)
if (StringUtil.isEmpty(configurationLocation))
{
ClientConfig config = new ClientConfig();

Expand All @@ -106,7 +107,7 @@ public SessionDataStore getSessionDataStore(SessionHandler handler)
else
{
Config config;
if (configurationLocation == null)
if (StringUtil.isEmpty(configurationLocation))
{

SerializerConfig sc = new SerializerConfig()
Expand Down

0 comments on commit e913ed2

Please sign in to comment.