Commit 8bb9a4c2 authored by Matija Obreza's avatar Matija Obreza
Browse files

<hz:aws needs enabled="true"

parent 1ed2b8ab
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.1.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</hazelcast>
......@@ -33,6 +33,6 @@ log4j.rootLogger=info, stdout
#log4j.category.org.springframework.security.access=trace
#log4j.category.org.springframework.security.acl=trace
#log4j.category.org.springframework.expression=trace
log4j.category.com.hazelcast=warn
#log4j.category.com.hazelcast=warn
#log4j.category.com.hazelcast.web=debug
#log4j.category.com.hazelcast.aws=debug
#log4j.category.com.hazelcast.aws=trace
......@@ -38,25 +38,45 @@
<property name="fallbackToNoOpCache" value="true" />
</bean>
<bean id="hazelcastWebFilter" class="com.hazelcast.web.WebFilter">
<constructor-arg>
<props>
<prop key="use-client">false</prop>
<prop key="map-name">jetty-sessions</prop>
<prop key="sticky-session">false</prop>
<prop key="cookie-name">hz-session-id</prop>
<prop key="cookie-secure">false</prop>
<prop key="cookie-http-only">true</prop>
<prop key="debug">true</prop>
<prop key="instance-name">genesys</prop>
<prop key="shutdown-on-destroy">true</prop>
</props>
</constructor-arg>
</bean>
<beans profile="aws">
<hz:hazelcast id="theHazelcast">
<hz:config>
<hz:instance-name>genesys</hz:instance-name>
<hz:group name="${hazelcast.name}" password="${hazelcast.password}" />
<hz:properties>
<hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.logging.type">log4j</hz:property>
<hz:property name="hazelcast.icmp.enabled">true</hz:property>
</hz:properties>
<hz:network port="${hazelcast.port}" port-auto-increment="true">
<hz:network port="${hazelcast.port}" port-auto-increment="false">
<hz:join>
<hz:multicast enabled="false" />
<hz:tcp-ip enabled="true" />
<hz:aws access-key="${hazelcast.aws.access-key}" region="${hazelcast.aws.region}"
<hz:tcp-ip connection-timeout-seconds="20" enabled="false" />
<hz:aws connection-timeout-seconds="5" enabled="true" access-key="${hazelcast.aws.access-key}" region="${hazelcast.aws.region}"
secret-key="${hazelcast.aws.secret-key}" security-group-name="${hazelcast.aws.security-group}" />
</hz:join>
</hz:network>
<hz:map name="default" max-idle-seconds="3600" max-size="5000" time-to-live-seconds="0" eviction-policy="LRU" />
<hz:map name="default" max-idle-seconds="3600" max-size="5000"
time-to-live-seconds="0" eviction-policy="LRU" />
</hz:config>
</hz:hazelcast>
......@@ -64,7 +84,7 @@
<constructor-arg ref="theHazelcast" />
</bean>
</beans>
<beans profile="dev">
<hz:hazelcast id="theHazelcast">
......@@ -81,7 +101,8 @@
<hz:tcp-ip enabled="false" />
</hz:join>
</hz:network>
<hz:map name="default" max-idle-seconds="300" max-size="1000" time-to-live-seconds="0" eviction-policy="LRU" />
<hz:map name="default" max-idle-seconds="300" max-size="1000"
time-to-live-seconds="0" eviction-policy="LRU" />
</hz:config>
</hz:hazelcast>
......
......@@ -26,123 +26,7 @@
<param-value>classpath:spring/application-context.xml</param-value>
</context-param>
<filter>
<filter-name>hazelcast-filter</filter-name>
<filter-class>com.hazelcast.web.WebFilter</filter-class>
<!--
Name of the distributed map storing
your web session objects
-->
<init-param>
<param-name>map-name</param-name>
<param-value>my-sessions</param-value>
</init-param>
<!--
How is your load-balancer configured?
stick-session means all requests of a session
is routed to the node where the session is first created.
This is excellent for performance.
If sticky-session is set to false, when a session is updated
on a node, entry for this session on all other nodes is invalidated.
You have to know how your load-balancer is configured before
setting this parameter. Default is true.
-->
<init-param>
<param-name>sticky-session</param-name>
<param-value>false</param-value>
</init-param>
<!--
Name of session id cookie
-->
<init-param>
<param-name>cookie-name</param-name>
<param-value>hazelcast.sessionId</param-value>
</init-param>
<!--
Domain of session id cookie. Default is based on incoming request.
<init-param>
<param-name>cookie-domain</param-name>
<param-value>.mywebsite.com</param-value>
</init-param>
-->
<!--
Should cookie only be sent using a secure protocol? Default is false.
-->
<init-param>
<param-name>cookie-secure</param-name>
<param-value>false</param-value>
</init-param>
<!--
Should HttpOnly attribute be set on cookie ? Default is false.
-->
<init-param>
<param-name>cookie-http-only</param-name>
<param-value>false</param-value>
</init-param>
<!--
Are you debugging? Default is false.
-->
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<!--
Configuration xml location;
* as servlet resource OR
* as classpath resource OR
* as URL
Default is one of hazelcast-default.xml
or hazelcast.xml in classpath.
<init-param>
<param-name>config-location</param-name>
<param-value>/WEB-INF/hazelcast.xml</param-value>
</init-param>
-->
<!--
Do you want to use an existing HazelcastInstance?
Default is null.
-->
<init-param>
<param-name>instance-name</param-name>
<param-value>theHazelcast</param-value>
</init-param>
<!--
Do you want to connect as a client to an existing cluster?
Default is false.
-->
<init-param>
<param-name>use-client</param-name>
<param-value>false</param-value>
</init-param>
<!--
Client configuration location;
* as servlet resource OR
* as classpath resource OR
* as URL
Default is null.
<init-param>
<param-name>client-config-location</param-name>
<param-value>/WEB-INF/hazelcast-client.properties</param-value>
</init-param>
-->
<!--
Do you want to shutdown HazelcastInstance during
web application undeploy process?
Default is true.
-->
<init-param>
<param-name>shutdown-on-destroy</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>hazelcast-filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.hazelcast.web.SessionListener</listener-class>
</listener>
......@@ -170,6 +54,19 @@
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>hazelcastWebFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>hazelcastWebFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>org.springframework.security.filterChainProxy</filter-name>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment