Chapter 4. Running The Tutorial GUI
The GUI is run by:
- Changing to the
${JBOSSCACHE_HOME}/tutorial
directory (e.g.,cd ${JBOSSCACHE_HOME}/tutorial
) - And then running the ant script (e.g.,
ant run
)
This will cause a GUI window to appear, giving you a tree view of the cache in the top pane and a BeanShell view of the JVM in the lower pane.
The BeanShell view is preset with the following variables:
cache
: a reference to theorg.jboss.cache.Cache
interface, used by the GUI instance.root
: a reference to the rootorg.jboss.cache.Node
instance for the above cache.transactionManager
: a reference to the registeredjavax.transaction.TransactionManager
instance.
The references made available to the BeanShell window point to the same cache instance used by the tree view in the GUI above.
To run the GUI as a replicated tutorial, it is useful to start another command line window and run the ant script again as you did above. Now you will have two cache instances running in two separate GUIs, replicating state to each other.