Installing Tangosol Coherence

Downloading and Extracting Coherence

For Windows and any other OS supporting the .zip format, Coherence is downloadable as a .zip file; for Unix and Linux, Coherence is also downloadable as a .tar.gz file. If prompted by your browser, choose to save the downloaded file. Once it has completed downloading, expand the .zip file (using WinZip or the unzip command-line utility) or the .tar.gz file (using gunzip and tar) to the location of your choice. On Windows, you can expand it to your c:\ directory; on Unix, it is suggested that you expand it to the /opt directory. Expanding the .zip or .tar.gz will create a tangosol directory with several sub-directories.

To expand the .tar.gz file on Unix, go to the directory into which you want to install, such as /opt, and issue the following command, supplying the path to the .tar.gz file if necessary:

gunzip -dqc coherence-300b315-eval.tar.gz | tar -xvf -

If you expand the .zip file on Unix, you must mark the .sh file(s) in the tangosol/bin directory as executable using the chmod command. (If you expand the .tar.gz file on Unix, the .sh file(s) will automatically be marked as executable when they are untarred.)

Installing Coherence

If you are adding Coherence to an application server, you will need to make sure that tangosol.jar and coherence.jar libraries (found in tangosol/lib/) are in the CLASSPATH (or the equivalent mechanism that your application server uses).

Alternatively, if your application server supports it, you can package the tangosol.jar and coherence.jar libraries into your application's .ear, .jar or .war file.

For purposes of compilation, you will need to make sure that tangosol.jar and coherence.jar libraries are in the CLASSPATH (or the equivalent mechanism that your compiler or IDE uses).

Verifying that multiple nodes and servers are able to form a cluster

Coherence includes a self-contained console application that can be used to verify that installation is successful and that all the servers that are meant to participate in the cluster are indeed capable of joining the cluster. We recommend that you perform this quick test when you first start using Coherence in a particular network and server environment, to verify that the nodes do indeed connect as expected. You can do that by repeating the following set of steps to start Coherence on each server (you can start multiple instances of Coherence on the same server as well):

This is what you should see after you start the first member:


c:\tangosol\lib>java -jar coherence.jar

******************************************************************************
*
* Tangosol Coherence(tm): Enterprise Edition is licensed by Tangosol, Inc.
* License details are available at: http://www.tangosol.com/license.jsp
*
* Licensed for evaluation use with the following restrictions:
*
* Effective Date : 1 Jun 2005 00:00:00 GMT
* Termination Date : 1 Sep 2005 00:00:00 GMT
*
* A production license is required for production use.
*
* Copyright (c) 2000-2005 Tangosol, Inc.
*
******************************************************************************


Tangosol Coherence Version 3.0/315

SafeCluster: Group{Address=224.3.0.0, Port=30315, TTL=4}
MasterMemberSet
(
ThisMember=Member(Id=1, Timestamp=Mon Jun 27 09:28:08 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
OldestMember=Member(Id=1, Timestamp=Mon Jun 27 09:28:08 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
ActualMemberSet=MemberSet(Size=1, BitSetCount=2
Member(Id=1, Timestamp=Mon Jun 27 09:28:08 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
)
RecycleMillis=240000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)
TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.0.247:8088}, Connections=}
ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.0, OldestMemberId=1}

Map (?):

As you can see there is only one member listed in the ActualMemberSet. When the second member is started, you should see something similar to the following at its start up:


c:\tangosol\lib>java -jar coherence.jar

******************************************************************************
*
* Tangosol Coherence(tm): Enterprise Edition is licensed by Tangosol, Inc.
* License details are available at: http://www.tangosol.com/license.jsp
*
* Licensed for evaluation use with the following restrictions:
*
* Effective Date : 1 Jun 2005 00:00:00 GMT
* Termination Date : 1 Sep 2005 00:00:00 GMT
*
* A production license is required for production use.
*
* Copyright (c) 2000-2005 Tangosol, Inc.
*
******************************************************************************


Tangosol Coherence Version 3.0/315

SafeCluster: Group{Address=224.3.0.0, Port=30315, TTL=4}
MasterMemberSet
(
ThisMember=Member(Id=2, Timestamp=Mon Jun 27 09:35:51 EDT 2005, Address=192.168.0.247, Port=8089, MachineId=26871)
OldestMember=Member(Id=1, Timestamp=Mon Jun 27 09:29:10 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
ActualMemberSet=MemberSet(Size=2, BitSetCount=2
Member(Id=1, Timestamp=Mon Jun 27 09:29:10 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
Member(Id=2, Timestamp=Mon Jun 27 09:35:51 EDT 2005, Address=192.168.0.247, Port=8089, MachineId=26871)
)
RecycleMillis=240000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)
TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.0.247:8089}, Connections=}
ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.0, OldestMemberId=1}

Map (?):

If you execute the who command at the Map(?): prompt of the first member after the second member is started, you should see the same two members:


Map (?): who
SafeCluster: Group{Address=224.3.0.0, Port=30315, TTL=4}
MasterMemberSet
(
ThisMember=Member(Id=2, Timestamp=Mon Jun 27 09:35:51 EDT 2005, Address=192.168.0.247, Port=8089, MachineId=26871)
OldestMember=Member(Id=1, Timestamp=Mon Jun 27 09:29:10 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
ActualMemberSet=MemberSet(Size=2, BitSetCount=2
Member(Id=1, Timestamp=Mon Jun 27 09:29:10 EDT 2005, Address=192.168.0.247, Port=8088, MachineId=26871)
Member(Id=2, Timestamp=Mon Jun 27 09:35:51 EDT 2005, Address=192.168.0.247, Port=8089, MachineId=26871)
)
RecycleMillis=240000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)
TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.0.247:8089}, Connections=[1]}
ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.0, OldestMemberId=1}

Map (?):

As more new members are started, you should see their addition reflected in the ActualMemberSet list. If you do not see new members being added, your network may not be properly configured for multicast traffic, you may used the Multicast Test to validate this.