Reputation: 745
I made simple J2SE App join cluster with running coherence.cmd without running cache-server.cmd and I run same App with running both coherence.cmd and cache-server.cmd and this joining the cluster, so what is the differences?
I want to know the difference between running cache-server.cmd and running coherence.cmd.
Upvotes: 0
Views: 1394
Reputation: 164
I'll give you an overview, not going into details. In default configuration given by oracle when you install coherence, cache-server.cmd is default script which starts coherence storage node. When we want to run coherence we start several "cache-servers" = coherence storage nodes (by default it builds coherence cluster).
Coherence.cmd default script also starts coherence node which is connected to cluster as client. We can run some basic operations on coherence when we run it but this is not production tool.
I think that your problem is connected with "app that runs cache-server or coherence.cmd". This is not the way that it works. To work with coherence properly, you have to build app that uses coherence api. For example in Java easiest way is to build maven app, add coherence.jar dependency. Then you have to import classes:
import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;
then in one line of code you create cache test or conect to it if it exists:
NamedCache cache = CacheFactory.getCache("test")
Then you can work with cache. When app runs this line of code it become coherence-node. When you have coherence installed on your machine with default settings it'll join cluster (if you started cache-server).
This is an 1000 foot view.
Upvotes: 1