Apache Tomcat7
- http://tomcat.apache.org/download-70.cgi
Apache Maven 3.2.1
- http://maven.apache.org/download.cgi
Hazelcast 3.3-EA2
- http://hazelcast.com/products/hazelcast-enterprise/
Extract .zip file. Drop hazelcast-3.3-EA2-ee.jar and hazelcast-sessions-tomcat7-3.3-EA2.jar to your tomcat-installation-path/lib. They are under /lib of extracted folder.
Next, you must put hazelcast.xml file to tomcat-installation-directory/lib . You can find a sample hazelcast.xml file under extracted-hazelcast-folder/bin. Additionally, in hazelcast.xml, put your license key between "license-key" and "/license-key" tags.
Finally, open tomcat7-installation-folder/conf/context.xml file and add this line
<Manager className="com.hazelcast.session.HazelcastSessionManager" sticky="true"/>
in "Context" and "/Context" tags.
BEFORE-STARTING : Make sure tomcat-installation-path/startup.sh and tomcat-installation-path/shutdown.sh are executable. You can make them executable via chmod +x startup.sh
and chmod +x shutdown.sh
if your working directory is tomcat-installation-path.
-
go to tomcat-installation-path/bin and run startup.sh shell file from terminal.
-
clone the repository via
git clone https://github.com/hazelcastInternsSummer14/sessionReplicationApp.git
-
then go to sessionReplicationApp/firsthot folder.
-
run maven via sudo
mvn tomcat:deploy
-
maven creates firstshot.war file under sessionReplicationApp/firsthot/target folder.
-
copy firstshot.war file to tomcat7-installation-path/webapps folder
-
open a browser and enter
localhost:8080/firstshot/hazelcast