Barn
Barn

Reputation: 954

Is there a tool to inspect / debug contents of Oracle Coherence caches?

I'm new to Oracle Coherence, and I'm trying to find a development / debug tool to help me validate my application.

It feels like there should be a straight-forward way of viewing the keys and/or values of a cache (and possibly even run ad-hoc queries and functions?). However I can't find anything except (Oracle Coherence Cache Viewer)[http://www.sl.com/products/coherenceviewer.shtml].

Otherwise I can write something to interrogate the Coherence JMX MBean, use the Coherence command-line interface, or write code myself to query my cache, but this feels like a problem which has been encountered before - hopefully I can recycle something rather than write from scratch?

Upvotes: 15

Views: 9326

Answers (4)

cpurdy
cpurdy

Reputation: 1236

See also "Using Coherence Query Language": http://docs.oracle.com/cd/E15357_01/coh.360/e15723/api_cq.htm

Upvotes: 2

Flynn
Flynn

Reputation: 61

I've been working on a command line tool based on the Coherence C++ client library here:

https://github.com/actsasflinn/coherence-tool

No CohQL yet but supports the following usage which covers most everything I'd want:

./run.sh <cache-name> get <key1> [key2] ...
./run.sh <cache-name> mget
./run.sh <cache-name> put <key> <value>
./run.sh <cache-name> mput <key1> <value1> [<key2> <value2>] ...
./run.sh <cache-name> delete <key> [key2] ...
./run.sh <cache-name> size
./run.sh <cache-name> keys
./run.sh <cache-name> values
./run.sh <cache-name> key_exists <key>
./run.sh <cache-name> value_exists <value>
./run.sh <cache-name> clear

Upvotes: 2

Vitaliy.Zhivko
Vitaliy.Zhivko

Reputation: 31

GUI for QueryPlus: http://code.google.com/p/zh-coherence-viewer/ It can execute CohQL script and show it in table or text pane.

Upvotes: 3

Barn
Barn

Reputation: 954

The best tool I can find is the QueryPlus command-line tool shipped with a full Coherence install %COHERENCE_HOME%\bin\query.cmd or $COHERENCE_HOME/bin/query.sh.

You need to point it to your Coherence config files by setting properties on the JVM:

java -Dtangosol.coherence.cacheconfig=META-INF/wlevs/coherence/coherence-cache-config.xml -Dtangosol.pof.config=my-pof-config.xml ...

You also need to add all jars required to load your user types to the classpath, and get a tangosol-coherence-override.xml in the classpath to define the cluster to join to.

Upvotes: 9

Related Questions