Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 840
Barn Avatar asked May 09 '11 11:05

Barn


1 Answers

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.

like image 68
Barn Avatar answered Jan 09 '23 03:01

Barn