[infinispan-commits] Infinispan SVN: r984 - in trunk: demos/gui and 8 other directories.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Oct 22 08:20:13 EDT 2009
Author: manik.surtani at jboss.com
Date: 2009-10-22 08:20:12 -0400 (Thu, 22 Oct 2009)
New Revision: 984
Added:
trunk/demos/gui/pom.xml
trunk/demos/gui/src/
trunk/demos/gui/src/main/
trunk/demos/gui/src/main/java/
trunk/demos/gui/src/main/java/org/
trunk/demos/gui/src/main/java/org/infinispan/
trunk/demos/gui/src/main/java/org/infinispan/demo/
trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.form
trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java
trunk/demos/gui/src/main/resources/
trunk/demos/gui/src/main/resources/config-samples/
trunk/demos/gui/src/main/resources/config-samples/gui-demo-cache-config.xml
trunk/demos/gui/src/main/resources/runGuiDemo.bat
trunk/demos/gui/src/main/resources/runGuiDemo.sh
Removed:
trunk/gui-demo/
Modified:
trunk/pom.xml
Log:
Reorganised GUI demo module
Copied: trunk/demos/gui/pom.xml (from rev 982, trunk/gui-demo/pom.xml)
===================================================================
--- trunk/demos/gui/pom.xml (rev 0)
+++ trunk/demos/gui/pom.xml 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>infinispan-gui-demo</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Infinispan GUI Demo</name>
+ <description>Infinispan - GUI Demo</description>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>infinispan-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>jgoodies</groupId>
+ <artifactId>forms</artifactId>
+ <version>1.0.5</version>
+ </dependency>
+ <dependency>
+ <groupId>com.intellij</groupId>
+ <artifactId>forms_rt</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ideauidesigner-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>javac2</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <fork>true</fork>
+ <debug>true</debug>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Property changes on: trunk/demos/gui/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.form (from rev 982, trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.form)
===================================================================
--- trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.form (rev 0)
+++ trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.form 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,518 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.infinispan.demo.InfinispanDemo">
+ <grid id="27dc6" binding="panel1" default-binding="true" layout-manager="FormLayout">
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:600px:grow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <colspec value="fill:800px:grow"/>
+ <colspec value="left:4dlu:noGrow"/>
+ <colspec value="fill:100px:grow"/>
+ <constraints>
+ <xy x="20" y="20" width="1011" height="661"/>
+ </constraints>
+ <properties/>
+ <border type="line" title="Infinispan GUI Demo Application">
+ <font size="14" style="3"/>
+ <title-color color="-16750951"/>
+ <color color="-16750951"/>
+ </border>
+ <children>
+ <tabbedpane id="d853c" binding="mainPane">
+ <constraints>
+ <grid row="2" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
+ <preferred-size width="200" height="200"/>
+ </grid>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ <properties/>
+ <border type="none"/>
+ <children>
+ <grid id="7aed3" binding="controlPanelTab" layout-manager="FormLayout">
+ <rowspec value="center:m:noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:d:grow"/>
+ <colspec value="fill:d:noGrow"/>
+ <colspec value="left:4dlu:noGrow"/>
+ <colspec value="fill:max(d;4px):noGrow"/>
+ <colspec value="left:4dlu:noGrow"/>
+ <colspec value="fill:d:grow"/>
+ <constraints>
+ <tabbedpane title="Control panel">
+ <tooltip value="This tab contains cache controls and general information about the cache configuration."/>
+ </tabbedpane>
+ </constraints>
+ <properties>
+ <toolTipText value=""/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <component id="953e7" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ <properties>
+ <font style="1"/>
+ <text value="Command"/>
+ </properties>
+ </component>
+ <component id="82b76" class="javax.swing.JButton" binding="actionButton">
+ <constraints>
+ <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ <properties>
+ <text value="Button"/>
+ </properties>
+ </component>
+ <vspacer id="8cdf4">
+ <constraints>
+ <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ <component id="458fc" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ <properties>
+ <font style="1"/>
+ <text value="Cache configuration file"/>
+ </properties>
+ </component>
+ <component id="1eef8" class="javax.swing.JLabel" binding="configFileName">
+ <constraints>
+ <grid row="2" column="2" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ <properties>
+ <font style="3"/>
+ <text value=" "/>
+ </properties>
+ </component>
+ <scrollpane id="4638">
+ <constraints>
+ <grid row="4" column="2" row-span="1" col-span="3" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false" defaultalign-vert="false"/>
+ </constraints>
+ <properties/>
+ <border type="none"/>
+ <children>
+ <component id="ded97" class="javax.swing.JTextArea" binding="configFileContents">
+ <constraints/>
+ <properties>
+ <background color="-3355444"/>
+ <font name="Courier New" size="10"/>
+ <text value=""/>
+ </properties>
+ </component>
+ </children>
+ </scrollpane>
+ <component id="17832" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <font size="12" style="2"/>
+ <text value="Note that you can specify a configuration file to use by passing in -Dinfinispan.demo.cfg=file:/path/to/config.xml"/>
+ </properties>
+ </component>
+ </children>
+ </grid>
+ <grid id="73867" binding="dataViewTab" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+ <margin top="0" left="0" bottom="0" right="0"/>
+ <constraints>
+ <tabbedpane title="Data view" enabled="false">
+ <tooltip value="This tab contains a view of all the data in the cache."/>
+ </tabbedpane>
+ </constraints>
+ <properties>
+ <enabled value="true"/>
+ <toolTipText value=""/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <scrollpane id="1b795">
+ <constraints>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+ </constraints>
+ <properties>
+ <background color="-1118482"/>
+ <horizontalScrollBarPolicy value="30"/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <component id="90e0f" class="javax.swing.JTable" binding="dataTable" custom-create="true">
+ <constraints/>
+ <properties/>
+ </component>
+ </children>
+ </scrollpane>
+ <grid id="9cc33" binding="dataViewControlPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+ <margin top="0" left="0" bottom="0" right="0"/>
+ <constraints>
+ <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+ </constraints>
+ <properties/>
+ <border type="none"/>
+ <children>
+ <vspacer id="71737">
+ <constraints>
+ <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ </constraints>
+ </vspacer>
+ <component id="ae7a5" class="javax.swing.JButton" binding="refreshButton">
+ <constraints>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
+ <preferred-size width="100" height="-1"/>
+ <maximum-size width="150" height="-1"/>
+ </grid>
+ </constraints>
+ <properties>
+ <text value="Refresh view"/>
+ </properties>
+ </component>
+ <component id="3ef4b" class="javax.swing.JLabel" binding="cacheContentsSizeLabel">
+ <constraints>
+ <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ </constraints>
+ <properties>
+ <text value="Blah"/>
+ </properties>
+ </component>
+ </children>
+ </grid>
+ </children>
+ </grid>
+ <grid id="b4b20" binding="clusterViewTab" layout-manager="FormLayout">
+ <rowspec value="center:d:grow"/>
+ <colspec value="fill:d:grow"/>
+ <constraints>
+ <tabbedpane title="Cluster view" enabled="false">
+ <tooltip value="This tab contains a view of the cluster topology"/>
+ </tabbedpane>
+ </constraints>
+ <properties>
+ <toolTipText value=""/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <scrollpane id="b9d5f">
+ <constraints>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false" defaultalign-vert="false"/>
+ </constraints>
+ <properties>
+ <background color="-1118482"/>
+ <horizontalScrollBarPolicy value="30"/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <component id="d96d2" class="javax.swing.JTable" binding="clusterTable">
+ <constraints/>
+ <properties>
+ <background color="-992313"/>
+ <gridColor color="-16777216"/>
+ <intercellSpacing width="3" height="3"/>
+ <showHorizontalLines value="true"/>
+ <showVerticalLines value="false"/>
+ </properties>
+ </component>
+ </children>
+ </scrollpane>
+ </children>
+ </grid>
+ <grid id="54b2f" binding="dataGeneratorTab" layout-manager="FormLayout">
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:d:grow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:d:grow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:max(d;4px):noGrow"/>
+ <rowspec value="top:3dlu:noGrow"/>
+ <rowspec value="center:d:grow"/>
+ <colspec value="fill:d:noGrow"/>
+ <colspec value="left:4dlu:noGrow"/>
+ <colspec value="fill:200px:noGrow"/>
+ <colspec value="left:4dlu:noGrow"/>
+ <colspec value="fill:200px:grow"/>
+ <constraints>
+ <tabbedpane title="Manipulate data" enabled="false">
+ <tooltip value="This tab provides you with the ability to add or remove data from the cache."/>
+ </tabbedpane>
+ </constraints>
+ <properties>
+ <toolTipText value=""/>
+ </properties>
+ <border type="none"/>
+ <children>
+ <component id="7917a" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <labelFor value="4e02"/>
+ <text value="Key"/>
+ </properties>
+ </component>
+ <component id="b834" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <labelFor value="5eb9b"/>
+ <text value="Value"/>
+ </properties>
+ </component>
+ <component id="4e02" class="javax.swing.JTextField" binding="keyTextField" default-binding="true">
+ <constraints>
+ <grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+ <preferred-size width="150" height="-1"/>
+ </grid>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <toolTipText value="Cached entry key"/>
+ </properties>
+ </component>
+ <component id="5eb9b" class="javax.swing.JTextField" binding="valueTextField" default-binding="true">
+ <constraints>
+ <grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+ <preferred-size width="150" height="-1"/>
+ </grid>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <toolTipText value="Cached entry value"/>
+ </properties>
+ </component>
+ <component id="24ed" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <font style="3"/>
+ <text value="Single entry manipulator"/>
+ </properties>
+ </component>
+ <component id="aacea" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <font style="3"/>
+ <text value="Random data generator"/>
+ </properties>
+ </component>
+ <component id="c9835" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="14" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="Max entries"/>
+ </properties>
+ </component>
+ <component id="43cf0" class="javax.swing.JButton" binding="cacheClearButton">
+ <constraints>
+ <grid row="20" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <text value="C&lear cache"/>
+ <toolTipText value="Clears all caches"/>
+ </properties>
+ </component>
+ <component id="dae1c" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="18" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <font style="3"/>
+ <text value="Clear cache"/>
+ </properties>
+ </component>
+ <component id="402fc" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="MaxIdle (millis)"/>
+ </properties>
+ </component>
+ <component id="6a9f0" class="javax.swing.JLabel">
+ <constraints>
+ <grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="Lifespan (millis)"/>
+ </properties>
+ </component>
+ <component id="ca2af" class="javax.swing.JRadioButton" binding="putEntryRadioButton">
+ <constraints>
+ <grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <selected value="true"/>
+ <text value="&Put Entry"/>
+ <toolTipText value="Adds a new entry or overwrites an existing one"/>
+ </properties>
+ </component>
+ <component id="f10d0" class="javax.swing.JRadioButton" binding="getEntryRadioButton" default-binding="true">
+ <constraints>
+ <grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="&Get Entry"/>
+ <toolTipText value="Retrieves a cache entry, potentially from a remote cache"/>
+ </properties>
+ </component>
+ <component id="e9453" class="javax.swing.JRadioButton" binding="removeEntryRadioButton">
+ <constraints>
+ <grid row="6" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <text value="&Remove Entry"/>
+ <toolTipText value="Removes an entry from the cache"/>
+ </properties>
+ </component>
+ <component id="11f60" class="javax.swing.JButton" binding="goButton" default-binding="true">
+ <constraints>
+ <grid row="8" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <text value="&Go"/>
+ <toolTipText value="Perform operation"/>
+ </properties>
+ </component>
+ <component id="32377" class="javax.swing.JButton" binding="randomGeneratorButton">
+ <constraints>
+ <grid row="14" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <text value="Ge&nerate"/>
+ <toolTipText value="Generates random data"/>
+ </properties>
+ </component>
+ <component id="7a363" class="javax.swing.JSlider" binding="generateSlider">
+ <constraints>
+ <grid row="14" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <maximum value="1000"/>
+ <minimum value="1"/>
+ <minorTickSpacing value="100"/>
+ <paintLabels value="true"/>
+ <paintTicks value="true"/>
+ <valueIsAdjusting value="true"/>
+ </properties>
+ </component>
+ <component id="1e4f0" class="javax.swing.JSpinner" binding="lifespanSpinner">
+ <constraints>
+ <grid row="6" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <toolTipText value="Lifespan of the cache entry, in milliseconds. Defaults to what is declared in XML config. -1 is immortal."/>
+ </properties>
+ </component>
+ <component id="10b2a" class="javax.swing.JSpinner" binding="maxIdleSpinner">
+ <constraints>
+ <grid row="8" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <toolTipText value="MaxIdle of the cache entry, in milliseconds. Defaults to what is declared in XML config. -1 is immortal."/>
+ </properties>
+ </component>
+ <vspacer id="de3e7">
+ <constraints>
+ <grid row="22" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ <vspacer id="3df43">
+ <constraints>
+ <grid row="16" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ <vspacer id="767c9">
+ <constraints>
+ <grid row="10" column="0" row-span="1" col-span="5" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-vert="false"/>
+ </constraints>
+ </vspacer>
+ </children>
+ </grid>
+ </children>
+ </tabbedpane>
+ <component id="97005" class="javax.swing.JLabel" binding="cacheStatus">
+ <constraints>
+ <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms/>
+ </constraints>
+ <properties>
+ <font style="3"/>
+ <text value="Initializing"/>
+ <toolTipText value="Cache status"/>
+ <verticalAlignment value="3"/>
+ </properties>
+ </component>
+ <component id="4afab" class="javax.swing.JProgressBar" binding="cacheStatusProgressBar">
+ <constraints>
+ <grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <forms defaultalign-horz="false"/>
+ </constraints>
+ <properties>
+ <indeterminate value="true"/>
+ <orientation value="0"/>
+ </properties>
+ </component>
+ </children>
+ </grid>
+ <buttonGroups>
+ <group name="cacheFunction">
+ <member id="ca2af"/>
+ <member id="e9453"/>
+ <member id="f9bf"/>
+ <member id="f2b07"/>
+ <member id="41b43"/>
+ <member id="f10d0"/>
+ </group>
+ </buttonGroups>
+</form>
Copied: trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java (from rev 982, trunk/gui-demo/src/main/java/org/infinispan/demo/InfinispanDemo.java)
===================================================================
--- trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java (rev 0)
+++ trunk/demos/gui/src/main/java/org/infinispan/demo/InfinispanDemo.java 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,606 @@
+package org.infinispan.demo;
+
+import org.infinispan.Cache;
+import org.infinispan.container.entries.InternalCacheEntry;
+import org.infinispan.lifecycle.ComponentStatus;
+import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.notifications.Listener;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryEvicted;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
+import org.infinispan.notifications.cachelistener.annotation.CacheEntryRemoved;
+import org.infinispan.notifications.cachelistener.event.Event;
+import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged;
+import org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent;
+import org.infinispan.remoting.transport.Address;
+import org.infinispan.util.logging.Log;
+import org.infinispan.util.logging.LogFactory;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableCellRenderer;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * @author Manik Surtani
+ */
+public class InfinispanDemo {
+ private static Log log = LogFactory.getLog(InfinispanDemo.class);
+ private static JFrame frame;
+ private JTabbedPane mainPane;
+ private JPanel panel1;
+ private JLabel cacheStatus;
+ private JPanel dataGeneratorTab;
+ private JPanel clusterViewTab;
+ private JPanel dataViewTab;
+ private JPanel controlPanelTab;
+ private JTable clusterTable;
+ private JButton actionButton;
+ private JLabel configFileName;
+ private JProgressBar cacheStatusProgressBar;
+ private JTextField keyTextField;
+ private JTextField valueTextField;
+ private JRadioButton putEntryRadioButton;
+ private JRadioButton removeEntryRadioButton;
+ private JRadioButton getEntryRadioButton;
+ private JButton goButton;
+ private JButton randomGeneratorButton;
+ private JButton cacheClearButton;
+ private JTextArea configFileContents;
+ private String cacheConfigFile;
+ private Cache<String, String> cache;
+ private String startCacheButtonLabel = "Start Cache", stopCacheButtonLabel = "Stop Cache";
+ private String statusStarting = "Starting Cache ... ", statusStarted = "Cache Running.", statusStopping = "Stopping Cache ...", statusStopped = "Cache Stopped.";
+ private ExecutorService asyncExecutor;
+ private final AtomicInteger updateCounter = new AtomicInteger(0);
+ private JTable dataTable;
+ private JSlider generateSlider;
+ private JSpinner lifespanSpinner;
+ private JSpinner maxIdleSpinner;
+ private JButton refreshButton;
+ private JPanel dataViewControlPanel;
+ private JLabel cacheContentsSizeLabel;
+ private Random r = new Random();
+ private ClusterTableModel clusterTableModel;
+ private CachedDataTableModel cachedDataTableModel;
+
+ public static void main(String[] args) {
+ String cfgFileName = System.getProperty("infinispan.demo.cfg", "config-samples/gui-demo-cache-config.xml");
+ frame = new JFrame("Infinispan GUI Demo (STOPPED)");
+ frame.setContentPane(new InfinispanDemo(cfgFileName).panel1);
+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ frame.pack();
+ frame.setVisible(true);
+ frame.setResizable(true);
+ }
+
+ public InfinispanDemo(String cfgFileName) {
+ asyncExecutor = Executors.newFixedThreadPool(1);
+
+ cacheConfigFile = cfgFileName;
+ cacheStatusProgressBar.setVisible(false);
+ cacheStatusProgressBar.setEnabled(false);
+ configFileName.setText(cacheConfigFile);
+
+ // data tables
+ clusterTableModel = new ClusterTableModel();
+ clusterTable.setModel(clusterTableModel);
+ cachedDataTableModel = new CachedDataTableModel();
+ dataTable.setModel(cachedDataTableModel);
+
+ // default state of the action button should be unstarted.
+ actionButton.setText(startCacheButtonLabel);
+ cacheStatus.setText(statusStopped);
+
+ // when we start up scan the classpath for a file named
+ actionButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ if (actionButton.getText().equals(startCacheButtonLabel)) {
+ // start cache
+ startCache();
+ } else if (actionButton.getText().equals(stopCacheButtonLabel)) {
+ // stop cache
+ stopCache();
+ }
+ }
+ });
+
+ goButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ processAction(goButton, true);
+
+ // do this in a separate thread
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ // based on the value of the radio button:
+ if (putEntryRadioButton.isSelected()) {
+ cache.put(keyTextField.getText(), valueTextField.getText(), lifespan(), TimeUnit.MILLISECONDS, maxIdle(), TimeUnit.MILLISECONDS);
+ } else if (removeEntryRadioButton.isSelected()) {
+ cache.remove(keyTextField.getText());
+ } else if (getEntryRadioButton.isSelected()) {
+ cache.get(keyTextField.getText());
+ }
+ dataViewTab.repaint();
+ processAction(goButton, false);
+
+ // reset these values
+ lifespanSpinner.setValue(cache.getConfiguration().getExpirationLifespan());
+ maxIdleSpinner.setValue(cache.getConfiguration().getExpirationMaxIdle());
+ // now switch to the data pane
+ mainPane.setSelectedIndex(1);
+ }
+
+ private long lifespan() {
+ try {
+ String s = lifespanSpinner.getValue().toString();
+ return Long.parseLong(s);
+ } catch (Exception e) {
+ return cache.getConfiguration().getExpirationLifespan();
+ }
+ }
+
+ private long maxIdle() {
+ try {
+ String s = maxIdleSpinner.getValue().toString();
+ return Long.parseLong(s);
+ } catch (Exception e) {
+ return cache.getConfiguration().getExpirationMaxIdle();
+ }
+ }
+ });
+ }
+ });
+
+ removeEntryRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ keyTextField.setEnabled(true);
+ valueTextField.setEnabled(false);
+ lifespanSpinner.setEnabled(false);
+ maxIdleSpinner.setEnabled(false);
+ }
+ });
+
+ putEntryRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ keyTextField.setEnabled(true);
+ valueTextField.setEnabled(true);
+ lifespanSpinner.setEnabled(true);
+ maxIdleSpinner.setEnabled(true);
+ }
+ });
+
+ getEntryRadioButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ keyTextField.setEnabled(true);
+ valueTextField.setEnabled(false);
+ lifespanSpinner.setEnabled(false);
+ maxIdleSpinner.setEnabled(false);
+ }
+ });
+
+ generateSlider.addChangeListener(new ChangeListener() {
+
+ public void stateChanged(ChangeEvent e) {
+ randomGeneratorButton.setText("Generate " + generateSlider.getValue() + " Random Entries");
+ }
+ });
+
+ randomGeneratorButton.setText("Generate " + generateSlider.getValue() + " Random Entries");
+
+ randomGeneratorButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ processAction(randomGeneratorButton, true);
+
+ // process this asynchronously
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ int entries = generateSlider.getValue();
+
+ Map<String, String> rand = new HashMap<String, String>();
+ while (rand.size() < entries) rand.put(randomString(), randomString());
+
+ cache.putAll(rand);
+
+ processAction(randomGeneratorButton, false);
+ generateSlider.setValue(50);
+ // now switch to the data pane
+ mainPane.setSelectedIndex(1);
+ }
+ });
+ }
+
+ private String randomString() {
+ return Integer.toHexString(r.nextInt(Integer.MAX_VALUE)).toUpperCase();
+ }
+ });
+ cacheClearButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ processAction(cacheClearButton, true);
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ cache.clear();
+ processAction(cacheClearButton, false);
+ // now switch to the data pane
+ mainPane.setSelectedIndex(1);
+ }
+ });
+ }
+ });
+
+ refreshButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ processAction(refreshButton, true);
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ InfinispanDemo.this.updateCachedDataTable();
+ processAction(refreshButton, false);
+ // now switch to the data pane
+ mainPane.setSelectedIndex(1);
+ }
+ });
+ }
+ });
+ }
+
+ private void moveCacheToState(ComponentStatus state) {
+ switch (state) {
+ case INITIALIZING:
+ cacheStatus.setText(statusStarting);
+ processAction(actionButton, true);
+ break;
+ case RUNNING:
+ setCacheTabsStatus(true);
+ actionButton.setText(stopCacheButtonLabel);
+ processAction(actionButton, false);
+ cacheStatus.setText(statusStarted);
+ updateTitleBar();
+ break;
+ case STOPPING:
+ cacheStatus.setText(statusStopping);
+ processAction(actionButton, true);
+ break;
+ case TERMINATED:
+ setCacheTabsStatus(false);
+ actionButton.setText(startCacheButtonLabel);
+ processAction(actionButton, false);
+ cacheStatus.setText(statusStopped);
+ updateTitleBar();
+ }
+ controlPanelTab.repaint();
+ }
+
+ private void processAction(JButton button, boolean start) {
+ button.setEnabled(!start);
+ cacheStatusProgressBar.setVisible(start);
+ cacheStatusProgressBar.setEnabled(start);
+ }
+
+ private String readContents(InputStream is) throws IOException {
+ BufferedReader r = new BufferedReader(new InputStreamReader(is));
+ String s;
+ StringBuilder sb = new StringBuilder();
+ while ((s = r.readLine()) != null) {
+ sb.append(s);
+ sb.append("\n");
+ }
+ return sb.toString();
+ }
+
+ private void startCache() {
+ moveCacheToState(ComponentStatus.INITIALIZING);
+
+ // actually start the cache asynchronously.
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ try {
+ URL resource = getClass().getClassLoader().getResource(cacheConfigFile);
+ if (resource == null) resource = new URL(cacheConfigFile);
+
+ if (cache == null) {
+ // update config file display
+ cache = new DefaultCacheManager(resource.openStream()).getCache();
+ } else {
+ cache.start();
+ }
+
+ // repaint the cfg file display
+ configFileName.setText(resource.toString());
+ configFileName.repaint();
+
+ try {
+ configFileContents.setText(readContents(resource.openStream()));
+ configFileContents.setEditable(false);
+ }
+ catch (Exception e) {
+ log.warn("Unable to open config file [" + cacheConfigFile + "] for display", e);
+ }
+ configFileContents.repaint();
+
+
+ CacheListener cl = new CacheListener();
+ cache.addListener(cl);
+ cache.getCacheManager().addListener(cl);
+ updateClusterTable(cache.getCacheManager().getMembers());
+
+ lifespanSpinner.setValue(cache.getConfiguration().getExpirationLifespan());
+ maxIdleSpinner.setValue(cache.getConfiguration().getExpirationMaxIdle());
+ cacheContentsSizeLabel.setText("Cache contains " + cache.size() + " entries");
+
+ moveCacheToState(ComponentStatus.RUNNING);
+ } catch (Exception e) {
+ log.error("Unable to start cache!", e);
+ throw new RuntimeException(e);
+ }
+ }
+ });
+ }
+
+ private void stopCache() {
+ moveCacheToState(ComponentStatus.STOPPING);
+ // actually stop the cache asynchronously
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ if (cache != null) cache.stop();
+ cachedDataTableModel.reset();
+ configFileContents.setText("");
+ configFileContents.repaint();
+ configFileName.setText("");
+ configFileName.repaint();
+ moveCacheToState(ComponentStatus.TERMINATED);
+ }
+ });
+ }
+
+ private void setCacheTabsStatus(boolean enabled) {
+ int numTabs = mainPane.getTabCount();
+ for (int i = 1; i < numTabs; i++) mainPane.setEnabledAt(i, enabled);
+ panel1.repaint();
+ }
+
+ private void updateClusterTable(List<Address> members) {
+ log.debug("Updating cluster table with new member list " + members);
+ clusterTableModel.setMembers(members);
+ updateTitleBar();
+ }
+
+ private void updateTitleBar() {
+ String title = "Infinispan GUI Demo";
+ if (cache != null && cache.getStatus() == ComponentStatus.RUNNING) {
+ title += " (STARTED) " + getLocalAddress() + " Cluster size: " + getClusterSize();
+ } else {
+ title += " (STOPPED)";
+ }
+ frame.setTitle(title);
+ }
+
+ private String getLocalAddress() {
+ Address a = cache.getCacheManager().getAddress();
+ if (a == null) return "(LOCAL mode)";
+ else return a.toString();
+ }
+
+ private String getClusterSize() {
+ List<Address> members = cache.getCacheManager().getMembers();
+ return members == null || members.isEmpty() ? "N/A" : "" + members.size();
+ }
+
+ private void createUIComponents() {
+ dataTable = new AlternateColorTable();
+
+ }
+
+ public static class AlternateColorTable extends JTable {
+
+ final Color c1 = new Color(0xEE, 0xEE, 0xEE);
+ final Color c2 = new Color(0xFF, 0xFF, 0xEE);
+
+ /**
+ * Returns the appropriate background color for the given row.
+ */
+ protected Color colorForRow(int row) {
+ return (row % 2 == 0) ? c1 : c2;
+ }
+
+ /**
+ * Shades alternate rows in different colors.
+ */
+ @Override
+ public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
+ Component c = super.prepareRenderer(renderer, row, column);
+ if (!isCellSelected(row, column)) {
+ c.setBackground(colorForRow(row));
+ c.setForeground(UIManager.getColor("Table.foreground"));
+ } else {
+ c.setBackground(UIManager.getColor("Table.selectionBackground"));
+ c.setForeground(UIManager.getColor("Table.selectionForeground"));
+ }
+ return c;
+ }
+ }
+
+ @Listener
+ public class CacheListener {
+ @ViewChanged
+ public void viewChangeEvent(ViewChangedEvent e) {
+ updateClusterTable(e.getNewMembers());
+ }
+
+ @CacheEntryModified
+ @CacheEntryRemoved
+ @CacheEntryEvicted
+ public void removed(Event e) {
+ if (!e.isPre()) updateCachedDataTable();
+ }
+ }
+
+ private void updateCachedDataTable() {
+ updateCounter.incrementAndGet();
+ asyncExecutor.execute(new Runnable() {
+ public void run() {
+ if (updateCounter.decrementAndGet() == 0) cachedDataTableModel.update();
+ }
+ });
+ }
+
+ public class ClusterTableModel extends AbstractTableModel {
+ List<String> members = new ArrayList<String>();
+ List<String> memberStates = new ArrayList<String>();
+
+ public void setMembers(List<Address> m) {
+ if (m != null && !m.isEmpty()) {
+ members = new ArrayList<String>(m.size());
+ for (Address ma : m) members.add(ma.toString());
+
+ memberStates = new ArrayList<String>(m.size());
+ for (Address a : m) {
+ String extraInfo = "Member";
+ // if this is the first member then this is the coordinator
+ if (memberStates.isEmpty()) extraInfo += " (coord)";
+ if (a.equals(cache.getCacheManager().getAddress()))
+ extraInfo += " (me)";
+
+ memberStates.add(extraInfo);
+ }
+ } else {
+ members = Collections.singletonList("me!");
+ memberStates = Collections.singletonList("(local mode)");
+ }
+
+ fireTableDataChanged();
+ }
+
+ public int getRowCount() {
+ return members.size();
+ }
+
+ public int getColumnCount() {
+ return 2;
+ }
+
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ switch (columnIndex) {
+ case 0:
+ return members.get(rowIndex);
+ case 1:
+ return memberStates.get(rowIndex);
+ }
+ return "NULL!";
+ }
+
+ @Override
+ public String getColumnName(int c) {
+ if (c == 0) return "Member Address";
+ if (c == 1) return "Member Info";
+ return "NULL!";
+ }
+ }
+
+ public class CachedDataTableModel extends AbstractTableModel {
+
+ List<InternalCacheEntry> data = new LinkedList<InternalCacheEntry>();
+
+ public int getRowCount() {
+ return data.size();
+ }
+
+ public int getColumnCount() {
+ return 4;
+ }
+
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ if (data.size() > rowIndex) {
+ InternalCacheEntry e = data.get(rowIndex);
+ switch (columnIndex) {
+ case 0:
+ return e.getKey();
+ case 1:
+ return e.getValue();
+ case 2:
+ return e.getLifespan();
+ case 3:
+ return e.getMaxIdle();
+ }
+ }
+ return "NULL!";
+ }
+
+ @Override
+ public String getColumnName(int c) {
+ switch (c) {
+ case 0:
+ return "Key";
+ case 1:
+ return "Value";
+ case 2:
+ return "Lifespan";
+ case 3:
+ return "MaxIdle";
+ }
+ return "NULL!";
+ }
+
+ public void update() {
+ // whew - expensive stuff.
+ data.clear();
+ for (InternalCacheEntry ice : cache.getAdvancedCache().getDataContainer()) {
+ if (!ice.isExpired()) data.add(ice);
+ }
+ cacheContentsSizeLabel.setText("Cache contains " + data.size() + " entries");
+ fireTableDataChanged();
+ }
+
+ public void reset() {
+ data.clear();
+ cacheContentsSizeLabel.setText("Cache contains " + data.size() + " entries");
+ fireTableDataChanged();
+ }
+ }
+
+ class CachedEntry {
+ String key, value;
+ long lifespan = -1, maxIdle = -1;
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ CachedEntry that = (CachedEntry) o;
+
+ if (lifespan != that.lifespan) return false;
+ if (maxIdle != that.maxIdle) return false;
+ if (key != null ? !key.equals(that.key) : that.key != null) return false;
+ if (value != null ? !value.equals(that.value) : that.value != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = key != null ? key.hashCode() : 0;
+ result = 31 * result + (value != null ? value.hashCode() : 0);
+ result = 31 * result + (int) (lifespan ^ (lifespan >>> 32));
+ result = 31 * result + (int) (maxIdle ^ (maxIdle >>> 32));
+ return result;
+ }
+ }
+}
Copied: trunk/demos/gui/src/main/resources/config-samples/gui-demo-cache-config.xml (from rev 982, trunk/gui-demo/src/main/resources/config-samples/gui-demo-cache-config.xml)
===================================================================
--- trunk/demos/gui/src/main/resources/config-samples/gui-demo-cache-config.xml (rev 0)
+++ trunk/demos/gui/src/main/resources/config-samples/gui-demo-cache-config.xml 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:infinispan:config:4.0">
+ <global>
+ <transport clusterName="demoCluster"/>
+ </global>
+
+ <default>
+ <clustering mode="distribution">
+ <l1 enabled="true" lifespan="60000"/>
+ <hash numOwners="2" rehashRpcTimeout="120000"/>
+ <sync/>
+ </clustering>
+ </default>
+</infinispan>
Property changes on: trunk/demos/gui/src/main/resources/config-samples/gui-demo-cache-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/demos/gui/src/main/resources/runGuiDemo.bat (from rev 982, trunk/gui-demo/src/main/resources/runGuiDemo.bat)
===================================================================
--- trunk/demos/gui/src/main/resources/runGuiDemo.bat (rev 0)
+++ trunk/demos/gui/src/main/resources/runGuiDemo.bat 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,29 @@
+ at echo off
+
+:noenvreset
+set my_classpath=
+for /f "tokens=* delims=" %%f in ('dir /s /b /a-d "..\modules\core\lib\*.jar"') do (
+ call set my_classpath=%%my_classpath%%;%%~f)
+ )
+set my_classpath=%my_classpath:~1%
+
+for /f "tokens=* delims=" %%f in ('dir /s /b /a-d "..\modules\core\*.jar"') do (
+ call set my_classpath=%%my_classpath%%;%%~f)
+ )
+set my_classpath=%my_classpath:~1%
+
+
+for /f "tokens=* delims=" %%f in ('dir /s /b /a-d "..\modules\gui-demo\*.jar"') do (
+ call set my_classpath=%%my_classpath%%;%%~f)
+ )
+set my_classpath=%my_classpath:~1%
+
+
+for /f "tokens=* delims=" %%f in ('dir /s /b /a-d "..\modules\gui-demo\lib\*.jar"') do (
+ call set my_classpath=%%my_classpath%%;%%~f)
+ )
+set my_classpath=%my_classpath:~1%
+
+java -cp %my_classpath% -Dbind.address=127.0.0.1 -Djava.net.preferIPv4Stack=true -Dlog4j.configuration=..\etc\log4j.xml org.infinispan.demo.InfinispanDemo
+
+
Copied: trunk/demos/gui/src/main/resources/runGuiDemo.sh (from rev 982, trunk/gui-demo/src/main/resources/runGuiDemo.sh)
===================================================================
--- trunk/demos/gui/src/main/resources/runGuiDemo.sh (rev 0)
+++ trunk/demos/gui/src/main/resources/runGuiDemo.sh 2009-10-22 12:20:12 UTC (rev 984)
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+DIRNAME=`dirname $0`
+
+# Setup ISPN_HOME
+if [ "x$ISPN_HOME" = "x" ]; then
+ # get the full path (without any relative bits)
+ ISPN_HOME=`cd $DIRNAME/..; pwd`
+fi
+export ISPN_HOME
+
+CP=${CP}:${ISPN_HOME}/etc
+
+for i in ${ISPN_HOME}/modules/core/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in ${ISPN_HOME}/modules/core/lib/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in ${ISPN_HOME}/modules/gui-demo/*.jar ; do
+ CP=${i}:${CP}
+done
+
+for i in ${ISPN_HOME}/modules/gui-demo/lib/*.jar ; do
+ CP=${i}:${CP}
+done
+
+JVM_PARAMS="${JVM_PARAMS} -Dbind.address=127.0.0.1 -Djava.net.preferIPv4Stack=true -Dlog4j.configuration=file:${ISPN_HOME}/etc/log4j.xml"
+
+# Sample JPDA settings for remote socket debuging
+#JVM_PARAMS="$JVM_PARAMS -Xrunjdwp:transport=dt_socket,address=8686,server=y,suspend=n"
+
+java -cp ${CP} ${JVM_PARAMS} org.infinispan.demo.InfinispanDemo &
Property changes on: trunk/demos/gui/src/main/resources/runGuiDemo.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-10-22 12:14:16 UTC (rev 983)
+++ trunk/pom.xml 2009-10-22 12:20:12 UTC (rev 984)
@@ -29,7 +29,7 @@
<module>cachestore/jdbm</module>
<module>server/rest</module>
<module>jopr-plugin</module>
- <module>gui-demo</module>
+ <module>demos/gui</module>
<module>tools</module>
</modules>
More information about the infinispan-commits
mailing list