JBoss Cache SVN: r5254 - benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-29 12:01:11 -0500 (Tue, 29 Jan 2008)
New Revision: 5254
Modified:
benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async.xml
Log:
cluster-stop is bad, as it might interfere with after report generation running barrier, and leave the cluster in an inconsistent state
Modified: benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async.xml 2008-01-29 15:33:11 UTC (rev 5253)
+++ benchmarks/benchmark-fwk/trunk/cache-products/jbosscache-2.1.0/conf/pess-repl-async.xml 2008-01-29 17:01:11 UTC (rev 5254)
@@ -20,52 +20,121 @@
<attribute name="ClusterName">JBossCache-Cluster</attribute>
<attribute name="ClusterConfig">
<config>
- <UDP mcast_addr="232.10.10.10"
- mcast_port="45599"
- tos="8"
- ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
- mcast_recv_buf_size="25000000"
- mcast_send_buf_size="640000"
+ <TCP start_port="7580"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="true"
+ enable_diagnostics="true"
+ thread_naming_pattern="cl"
+
+ use_concurrent_stack="true"
+
+ recv_buf_size="20000000"
+ send_buf_size="20000000"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="2"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="100000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="4"
+ oob_thread_pool.max_threads="8"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <MPING timeout="2000" mcast_addr="232.1.2.3"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="30000"
+ min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="1000" max_tries="2" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="1000000"/>
+ <VIEW_SYNC avg_send_interval="60000" />
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="false"
+ view_bundling="true"/>
+ <FC max_credits="10000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STATE_TRANSFER />
+
+ </config>
+
+
+ <attribute name="ClusterConfig">
+ <config>
+ <TCP recv_buf_size="20000000" use_send_queues="false"
loopback="false"
discard_incompatible_packets="true"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
- use_outgoing_packet_handler="false"
- ip_ttl="2"
- down_thread="false" up_thread="false"
- enable_bundling="false"/>
- <PING timeout="2000"
- down_thread="false" up_thread="false" num_initial_members="3"/>
- <MERGE2 max_interval="100000"
- down_thread="false" up_thread="false" min_interval="20000"/>
- <FD_SOCK down_thread="false" up_thread="false"/>
- <FD timeout="1000" max_tries="2" shun="true"/>
- <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ enable_bundling="true"
+ enable_unicast_bundling="true"
+ enable_diagnostics="true"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="4"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="2"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <!--<PING timeout="2000" num_initial_members="3"/>-->
+ <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
- down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"
- down_thread="false" up_thread="false"/>
+ <!--<UNICAST timeout="30,60,120,300,600,1200,2400,3600"/>-->
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- down_thread="false" up_thread="false"
max_bytes="400000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="3000" use_flush="true" flush_timeout="3000"
- down_thread="false" up_thread="false"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
join_retry_timeout="2000" shun="false"
- view_bundling="true"/>
- <FC max_credits="2000000" down_thread="false" up_thread="false"
- min_threshold="0.20"/>
- <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
- <!-- <pbcast.STREAMING_STATE_TRANSFER down_thread="false" up_thread="false"
- use_flush="true" flush_timeout="3000" use_reading_thread="true"/> -->
- <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="true" flush_timeout="3000"/>
- <pbcast.FLUSH down_thread="false" up_thread="false" timeout="8000" auto_flush_conf="false"/>
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
</config>
</attribute>
+
+ </attribute>
<attribute name="FetchInMemoryState">false</attribute>
<attribute name="InitialStateRetrievalTimeout">15000</attribute>
<attribute name="SyncReplTimeout">60000</attribute>
16 years, 11 months
JBoss Cache SVN: r5253 - support/trunk/common.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-29 10:33:11 -0500 (Tue, 29 Jan 2008)
New Revision: 5253
Modified:
support/trunk/common/pom.xml
Log:
Excludes xml and properties files from the jar
Modified: support/trunk/common/pom.xml
===================================================================
--- support/trunk/common/pom.xml 2008-01-29 00:22:13 UTC (rev 5252)
+++ support/trunk/common/pom.xml 2008-01-29 15:33:11 UTC (rev 5253)
@@ -1,215 +1,199 @@
-<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.jboss.cache</groupId>
- <artifactId>jbosscache-support</artifactId>
- <version>1.1-SNAPSHOT</version>
- </parent>
-
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-common-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>JBoss Cache Common Parent</name>
- <description>The parent POM for all JBoss Cache modules.</description>
- <url>http://labs.jboss.org/jbosscache</url>
-
- <organization>
- <name>JBoss, a division of Red Hat</name>
- <url>http://labs.jboss.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>GNU Lesser General Public License</name>
- <url>http://www.gnu.org/copyleft/lesser.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbosscache/core/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbosscache/core/trunk</developerConnection>
- <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/</url>
- </scm>
-
- <issueManagement>
- <system>jira</system>
- <url>http://jira.jboss.com/jira/browse/JBCACHE</url>
- </issueManagement>
-
- <ciManagement>
- <system>cruisecontrol</system>
- <url>http://cruisecontrol.jboss.com/cc/</url>
- <notifiers>
- <notifier>
- <type>mail</type>
- <address>jbosscache-dev(a)lists.jboss.org</address>
- </notifier>
- </notifiers>
- </ciManagement>
-
- <mailingLists>
- <mailingList>
- <name>JBoss Cache Announcements</name>
- <post>jbosscache-announce(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
- </mailingList>
- <mailingList>
- <name>JBoss Cache Commit Notificatons</name>
- <post>jbosscache-commits(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/jbosscache-commits/</archive>
- </mailingList>
- <mailingList>
- <name>JBoss Cache Developers</name>
- <post>jbosscache-dev(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
- </mailingList>
- <mailingList>
- <name>JBoss Cache Issue Notifications</name>
- <post>jbosscache-issues(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/jbosscache-issues/</archive>
- </mailingList>
- </mailingLists>
-
- <build>
- <plugins>
- <!-- require at least JDK 1.5 to run the build -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-3</version>
- <executions>
- <execution>
- <id>enforce-java</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireJavaVersion>
- <version>[1.5,)</version>
- </requireJavaVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- by default, compile to JDK 1.5 compatibility (individual modules and/or user can override) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
-
- <!-- add specification/implementation details to the manifests -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+<?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.jboss.cache</groupId>
+ <artifactId>jbosscache-support</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-common-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Cache Common Parent</name>
+ <description>The parent POM for all JBoss Cache modules.</description>
+ <url>http://labs.jboss.org/jbosscache</url>
+ <organization>
+ <name>JBoss, a division of Red Hat</name>
+ <url>http://labs.jboss.org</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/copyleft/lesser.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbosscache/core/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbosscache/core/trunk</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/</url>
+ </scm>
+ <issueManagement>
+ <system>jira</system>
+ <url>http://jira.jboss.com/jira/browse/JBCACHE</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ <url>http://cruisecontrol.jboss.com/cc/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <address>jbosscache-dev(a)lists.jboss.org</address>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <mailingLists>
+ <mailingList>
+ <name>JBoss Cache Announcements</name>
+ <post>jbosscache-announce(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-announce</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>JBoss Cache Commit Notificatons</name>
+ <post>jbosscache-commits(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-commits</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/jbosscache-commits/</archive>
+ </mailingList>
+ <mailingList>
+ <name>JBoss Cache Developers</name>
+ <post>jbosscache-dev(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-dev</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/jbosscache-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>JBoss Cache Issue Notifications</name>
+ <post>jbosscache-issues(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/jbosscache-issues</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/jbosscache-issues/</archive>
+ </mailingList>
+ </mailingLists>
+ <build>
+ <plugins>
+<!-- require at least JDK 1.5 to run the build -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-3</version>
+ <executions>
+ <execution>
+ <id>enforce-java</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+<!-- by default, compile to JDK 1.5 compatibility (individual modules and/or user can override) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+<!-- add specification/implementation details to the manifests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/*.xml</exclude>
+ <exclude>**/*.properties</exclude>
+ </excludes>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.jboss.cache.Version</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>bind.address</name>
+ <value>127.0.0.1</value>
+ </property>
+ <property>
+ <name>jgroups.stack</name>
+ <value>udp</value>
+ </property>
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ </systemProperties>
+ <groups>functional</groups>
+ <forkMode>always</forkMode>
+<!-- increasing JVM heap size -->
+ <argLine>-Xmx1024M</argLine>
+<!-- Warning, this does not work right on 2.4-SNAPSHOT, (see SUREFIRE-349) -->
+<!-- This seems to fail in some cases on 2.3 as well, disable for now -->
+ <redirectTestOutputToFile>false</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+<!-- javadocs : we want these run in the 'package' lifecycle phase-->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <configuration>
+ <aggregate>${jbosscache.reports.aggregate}</aggregate>
+ <links>
+ <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
+ <link>http://java.sun.com/javaee/5/docs/api/</link>
+ </links>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+<!-- Eclipse -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <buildOutputDirectory>${basedir}/eclipse-output</buildOutputDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ <finalName>${artifactId}</finalName>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+<!-- DISABLE - Maven doesn't build the classpath correctly
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <systemProperties>
- <property>
- <name>bind.address</name>
- <value>127.0.0.1</value>
- </property>
- <property>
- <name>jgroups.stack</name>
- <value>udp</value>
- </property>
- <property>
- <name>java.net.preferIPv4Stack</name>
- <value>true</value>
- </property>
- </systemProperties>
- <groups>functional</groups>
- <forkMode>always</forkMode>
- <!-- increasing JVM heap size -->
- <argLine>-Xmx1024M</argLine>
-
- <!-- Warning, this does not work right on 2.4-SNAPSHOT, (see SUREFIRE-349) -->
- <!-- This seems to fail in some cases on 2.3 as well, disable for now -->
- <redirectTestOutputToFile>false</redirectTestOutputToFile>
- </configuration>
- </plugin>
-
- <!-- javadocs : we want these run in the 'package' lifecycle phase-->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>javadoc</goal>
- </goals>
- <configuration>
- <aggregate>${jbosscache.reports.aggregate}</aggregate>
- <links>
- <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
- <link>http://java.sun.com/javaee/5/docs/api/</link>
- </links>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- Eclipse -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
<configuration>
- <buildOutputDirectory>${basedir}/eclipse-output</buildOutputDirectory>
- </configuration>
- </plugin>
- </plugins>
-
- <finalName>${artifactId}</finalName>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.3</version>
- </plugin>
-
- <!-- DISABLE - Maven doesn't build the classpath correctly
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
<aggregate>${jbosscache.reports.aggregate}</aggregate>
<links>
<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
@@ -218,200 +202,185 @@
</configuration>
</plugin>
-->
-
- <!-- JXR - links from javadocs and junit reports to an html representation of the code -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>${jbosscache.reports.aggregate}</aggregate>
- </configuration>
- </plugin>
-
- <!-- PMD code analysis reports -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <aggregate>${jbosscache.reports.aggregate}</aggregate>
- <linkXref>true</linkXref>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <configuration>
- <aggregate>${jbosscache.reports.aggregate}</aggregate>
- <tags>
- <tag>@FIXME</tag>
- <tag>@fixme</tag>
- <tag>FIXME</tag>
- <tag>fixme</tag>
- <tag>@TODO</tag>
- <tag>@todo</tag>
- <tag>TODO</tag>
- <tag>todo</tag>
- </tags>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javancss-maven-plugin</artifactId>
- </plugin>
- <!-- Findbugs report -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <onlyAnalyze>org.jboss.cache.*</onlyAnalyze>
- </configuration>
- </plugin>
-
- </plugins>
- </reporting>
-
- <properties>
- <!-- for now, at least, lets aggregate them -->
- <jbosscache.reports.aggregate>true</jbosscache.reports.aggregate>
- </properties>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
-
- <repository>
- <id>snapshots.jboss.org</id>
- <url>http://snapshots.jboss.org/maven2</url>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>Main Maven Repo</id>
- <url>http://repo1.maven.org/maven2/</url>
- </pluginRepository>
-
+<!-- JXR - links from javadocs and junit reports to an html representation of the code -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <aggregate>${jbosscache.reports.aggregate}</aggregate>
+ </configuration>
+ </plugin>
+<!-- PMD code analysis reports -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <aggregate>${jbosscache.reports.aggregate}</aggregate>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <configuration>
+ <aggregate>${jbosscache.reports.aggregate}</aggregate>
+ <tags>
+ <tag>@FIXME</tag>
+ <tag>@fixme</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>@TODO</tag>
+ <tag>@todo</tag>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ </tags>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javancss-maven-plugin</artifactId>
+ </plugin>
+<!-- Findbugs report -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <onlyAnalyze>org.jboss.cache.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <properties>
+<!-- for now, at least, lets aggregate them -->
+ <jbosscache.reports.aggregate>true</jbosscache.reports.aggregate>
+ </properties>
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>Main Maven Repo</id>
+ <url>http://repo1.maven.org/maven2/</url>
+ </pluginRepository>
<!-- Avoid enabling this, it brings in unstable plugins
<pluginRepository>
<id>apache.snapshots</id>
<url>http://people.apache.org/repo/m2-snapshot-repository/</url>
</pluginRepository>
-->
- <pluginRepository>
- <id>repository.jboss.org</id>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
-
- <pluginRepository>
- <id>snapshots.jboss.org</id>
- <url>http://snapshots.jboss.org/maven2</url>
- </pluginRepository>
-
- </pluginRepositories>
-
- <dependencies>
- <!-- test dependencies to run the test suites -->
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.1</version>
- <scope>test</scope>
- <classifier>jdk15</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.2.2.0</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <!-- Profiles, used for test permutations -->
- <profiles>
- <profile>
- <id>jgroups-tcp</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <systemProperties>
- <property>
- <name>bind.address</name>
- <value>127.0.0.1</value>
- </property>
- <property>
- <name>jgroups.stack</name>
- <value>tcp</value>
- </property>
- </systemProperties>
- <groups>jgroups</groups>
- <reportsDirectory>${project.build.directory}/jgroups-tcp-reports</reportsDirectory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <reportsDirectory>${project.build.directory}/jgroups-tcp-reports</reportsDirectory>
- <outputName>jgroups-tcp-report</outputName>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>transaction-jbossjta</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>bind.address</name>
- <value>127.0.0.1</value>
- </property>
- <property>
- <name>jgroups.stack</name>
- <value>udp</value>
- </property>
- <property>
- <name>org.jboss.cache.test.tm</name>
- <value>jboss-jta</value>
- </property>
- </systemProperties>
- <groups>transaction</groups>
- <reportsDirectory>${project.build.directory}/transaction-jbossjta-reports</reportsDirectory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <configuration>
- <reportsDirectory>${project.build.directory}/transaction-jbossjta-reports</reportsDirectory>
- <outputName>transaction-jbossjta-report</outputName>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>snapshots.jboss.org</id>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+<!-- test dependencies to run the test suites -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.1</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.2.2.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+<!-- Profiles, used for test permutations -->
+ <profiles>
+ <profile>
+ <id>jgroups-tcp</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>bind.address</name>
+ <value>127.0.0.1</value>
+ </property>
+ <property>
+ <name>jgroups.stack</name>
+ <value>tcp</value>
+ </property>
+ </systemProperties>
+ <groups>jgroups</groups>
+ <reportsDirectory>${project.build.directory}/jgroups-tcp-reports</reportsDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <reportsDirectory>${project.build.directory}/jgroups-tcp-reports</reportsDirectory>
+ <outputName>jgroups-tcp-report</outputName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>transaction-jbossjta</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>bind.address</name>
+ <value>127.0.0.1</value>
+ </property>
+ <property>
+ <name>jgroups.stack</name>
+ <value>udp</value>
+ </property>
+ <property>
+ <name>org.jboss.cache.test.tm</name>
+ <value>jboss-jta</value>
+ </property>
+ </systemProperties>
+ <groups>transaction</groups>
+ <reportsDirectory>${project.build.directory}/transaction-jbossjta-reports</reportsDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <configuration>
+ <reportsDirectory>${project.build.directory}/transaction-jbossjta-reports</reportsDirectory>
+ <outputName>transaction-jbossjta-report</outputName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
16 years, 11 months
JBoss Cache SVN: r5252 - core/trunk/src/test/resources/META-INF/conf-test.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 19:22:13 -0500 (Mon, 28 Jan 2008)
New Revision: 5252
Added:
core/trunk/src/test/resources/META-INF/conf-test/clonable-config-service.xml
Log:
fixed tests
Added: core/trunk/src/test/resources/META-INF/conf-test/clonable-config-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/conf-test/clonable-config-service.xml (rev 0)
+++ core/trunk/src/test/resources/META-INF/conf-test/clonable-config-service.xml 2008-01-29 00:22:13 UTC (rev 5252)
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Cache configuration file that attempts to utilize all known elements.
+ Intent here is not to create such a cache; rather it is to create
+ a Configuration and then see if that Configuration can be cloned.
+ Basically just for testing the clone() method of the various
+ configuration elements.
+-->
+
+<server>
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=testTreeCache">
+
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+ <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
+ <attribute name="IsolationLevel">SERIALIZABLE</attribute>
+ <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
+
+ <attribute name="ClusterName">CloneCluster</attribute>
+
+ <!-- Use both a stack name and a ClusterConfig so we can test both -->
+ <attribute name="MultiplexerStack">udp</attribute>
+ <attribute name="ClusterConfig">
+ <config>
+ <UDP mcast_addr="228.10.10.10"
+ mcast_port="45588"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="2"
+ enable_bundling="false"
+ enable_diagnostics="true"
+
+ use_concurrent_stack="true"
+
+ thread_naming_pattern="pl"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="30000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="10"
+ thread_pool.rejection_policy="Run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="4"
+ oob_thread_pool.keep_alive_time="10000"
+ oob_thread_pool.queue_enabled="true"
+ oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run"/>
+
+ <PING timeout="2000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD timeout="10000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ view_bundling="true" view_ack_collection_timeout="5000"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
+ </config>
+ </attribute>
+
+ <attribute name="FetchInMemoryState">false</attribute>
+ <attribute name="StateRetrievalTimeout">3</attribute>
+ <attribute name="SyncReplTimeout">2</attribute>
+ <attribute name="LockAcquisitionTimeout">1</attribute>
+
+
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>true</buddyReplicationEnabled>
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <buddyLocatorProperties>
+ numBuddies = 11
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <buddyPoolName>cloneGroup</buddyPoolName>
+ <buddyCommunicationTimeout>7</buddyCommunicationTimeout>
+
+ <autoDataGravitation>false</autoDataGravitation>
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">45</attribute>
+ <attribute name="eventQueueSize">4</attribute>
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <attribute name="maxAge">15000</attribute>
+ </region>
+ <region name="/fifo" policyClass="org.jboss.cache.eviction.FIFOPolicy">
+ <attribute name="maxNodes">5000</attribute>
+ </region>
+ <region name="/mru" policyClass="org.jboss.cache.eviction.MRUPolicy">
+ <attribute name="maxNodes">10000</attribute>
+ </region>
+ <region name="/lfu" policyClass="org.jboss.cache.eviction.LFUPolicy">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute name="minNodes">4000</attribute>
+ </region>
+ </config>
+ </attribute>
+
+ <attribute name="CacheLoaderConfig">
+ <config>
+ <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
+ <passivation>false</passivation>
+ <preload>/</preload>
+ <shared>true</shared>
+
+ <!-- we can now have multiple cache loaders, which get chained -->
+ <cacheloader>
+ <class>org.jboss.cache.loader.FileCacheLoader</class>
+ <properties>
+ location=/tmp/FileCacheLoader
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>true</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.bdbje.BdbjeCacheLoader</class>
+ <properties>
+ location=/tmp/BdbjeCacheLoader
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.jdbm.JdbmCacheLoader</class>
+ <properties>
+ location=/tmp/JdbmCacheLoader
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.JDBCCacheLoader</class>
+ <properties>
+ cache.jdbc.driver=com.foo.jdbc.Driver
+ cache.jdbc.url=foo://driver
+ cache.jdbc.user=sa
+ cache.jdbc.password=secret
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.TcpDelegatingCacheLoader</class>
+ <properties>
+ host=127.0.0.1\nport=12121
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.ClusteredCacheLoader</class>
+ <properties>
+ timeout=500
+ </properties>
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.-->
+ <fetchPersistentState>false</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <singletonStore>
+ <enabled>false</enabled>
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=5000
+ </properties>
+ </singletonStore>
+ </cacheloader>
+
+ </config>
+ </attribute>
+
+ </mbean>
+
+
+</server>
16 years, 11 months
JBoss Cache SVN: r5251 - in core/trunk/src/test: java/org/jboss/cache/config and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 19:15:28 -0500 (Mon, 28 Jan 2008)
New Revision: 5251
Added:
core/trunk/src/test/resources/META-INF/conf-test/local-passivation-service.xml
Modified:
core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
core/trunk/src/test/java/org/jboss/cache/config/ConfigurationCloningTest.java
core/trunk/src/test/java/org/jboss/cache/invocationcontext/TransactionTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java
core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
Log:
fixed tests
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeMoveAPITest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -46,7 +46,7 @@
public void setUp() throws Exception
{
// start a single cache instance
- cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("/META-INF/news/local-cache-service.xml", false);
+ cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("META-INF/conf-test/local-tx-service.xml", false);
cache.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache.start();
rootNode = cache.getRoot();
Modified: core/trunk/src/test/java/org/jboss/cache/config/ConfigurationCloningTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/ConfigurationCloningTest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/config/ConfigurationCloningTest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -36,7 +36,7 @@
public class ConfigurationCloningTest
{
/** A file that includes every configuration element I could think of */
- public static final String DEFAULT_CONFIGURATION_FILE = "META-INF/clonable-config-service.xml";
+ public static final String DEFAULT_CONFIGURATION_FILE = "META-INF/conf-test/clonable-config-service.xml";
private static final Log log = LogFactory.getLog(ConfigurationCloningTest.class);
Modified: core/trunk/src/test/java/org/jboss/cache/invocationcontext/TransactionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/invocationcontext/TransactionTest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/invocationcontext/TransactionTest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -25,7 +25,7 @@
@BeforeMethod(alwaysRun = true)
public void setUp()
{
- cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("/META-INF/news/local-cache-service.xml");
+ cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("META-INF/conf-test/local-tx-service.xml");
tm = cache.getTransactionManager();
}
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/BasicPassivationTest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -12,6 +12,7 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.factories.XmlConfigurationParser;
+import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.notifications.annotation.CacheListener;
@@ -59,7 +60,7 @@
private void initCaches()
{
CacheFactory<String, String> instance = new DefaultCacheFactory();
- cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/jdbCacheLoader-passivation-service.xml"), false);
+ cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/conf-test/local-passivation-service.xml"), false);
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
Object listener = new TestCacheListener();
cache.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setClassName(DummyInMemoryCacheLoader.class.getName());
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/ConcurrentPassivationTest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -47,7 +47,7 @@
private void initCaches()
{
CacheFactory<Integer, String> instance = new DefaultCacheFactory();
- cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/jdbCacheLoader-passivation-service.xml"), false);
+ cache = (CacheSPI) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/conf-test/local-passivation-service.xml"), false);
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setClassName(DummyInMemoryCacheLoader.class.getName());
cache.start();
Modified: core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java 2008-01-28 23:55:57 UTC (rev 5250)
+++ core/trunk/src/test/java/org/jboss/cache/passivation/LocalPassivationIntegrationTest.java 2008-01-29 00:15:28 UTC (rev 5251)
@@ -44,7 +44,7 @@
public void setUp() throws Exception
{
CacheFactory<String, String> instance = new DefaultCacheFactory();
- cache = (CacheSPI<String, String>) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/jdbCacheLoader-passivation-service.xml"), false);
+ cache = (CacheSPI<String, String>) instance.createCache(new XmlConfigurationParser().parseFile("META-INF/conf-test/local-passivation-service.xml"), false);
cache.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
cache.getConfiguration().getCacheLoaderConfig().getFirstCacheLoaderConfig().setClassName(DummyInMemoryCacheLoader.class.getName());
cache.getConfiguration().setUseRegionBasedMarshalling(true);
Added: core/trunk/src/test/resources/META-INF/conf-test/local-passivation-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/conf-test/local-passivation-service.xml (rev 0)
+++ core/trunk/src/test/resources/META-INF/conf-test/local-passivation-service.xml 2008-01-29 00:15:28 UTC (rev 5251)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=TreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+ <!--
+ Configure the TransactionManager
+ -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ -->
+ <attribute name="CacheMode">LOCAL</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!--Uncomment next three statements to enable JGroups multiplexer.
+This configuration is dependent on the JGroups multiplexer being
+registered in an MBean server such as JBossAS. -->
+ <!--
+ <depends>jgroups.mux:name=Multiplexer</depends>
+ <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
+ <attribute name="MultiplexerStack">fc-fast-minimalthreads</attribute>
+ -->
+
+
+ <!-- JGroups protocol stack properties NOT NEEDED since CacheMode is LOCAL -->
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">20000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- This defaults to 200000 if not specified -->
+ <attribute name="eventQueueSize">200000</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute name="timeToLiveSeconds">3</attribute>
+ </region>
+ <region name="/org/jboss/test/data">
+ <attribute name="maxNodes">100</attribute>
+ <attribute name="timeToLiveSeconds">3</attribute>
+ </region>
+ </config>
+ </attribute>
+
+ <!-- New 1.3.x cache loader config block -->
+ <attribute name="CacheLoaderConfig">
+ <config>
+ <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
+ <passivation>true</passivation>
+ <preload>/</preload>
+ <shared>false</shared>
+
+ <!-- we can now have multiple cache loaders, which get chained -->
+ <cacheloader>
+ <class>org.jboss.cache.loader.FileCacheLoader</class>
+ <!-- same as the old CacheLoaderConfig attribute
+ location=/tmp this can be part of the properties.
+ location=/tmp/JBossCacheFileCacheLoader
+ -->
+ <properties>
+ </properties>
+ <!-- whether the cache loader writes are asynchronous -->
+ <async>false</async>
+ <!-- only one cache loader in the chain may set fetchPersistentState to true.
+ An exception is thrown if more than one cache loader sets this to true. -->
+ <fetchPersistentState>true</fetchPersistentState>
+ <!-- determines whether this cache loader ignores writes - defaults to false. -->
+ <ignoreModifications>false</ignoreModifications>
+ </cacheloader>
+
+ </config>
+ </attribute>
+
+ </mbean>
+
+
+</server>
16 years, 11 months
JBoss Cache SVN: r5250 - in core/trunk/src: test/java/org/jboss/cache/api and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 18:55:57 -0500 (Mon, 28 Jan 2008)
New Revision: 5250
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java
core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
Log:
fixed tests and added an an rolledback the mark node as deleted behavior, in order to supress notifications for temporary created nodes
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-28 22:40:44 UTC (rev 5249)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-28 23:55:57 UTC (rev 5250)
@@ -231,7 +231,7 @@
protected Object handleRemoveNodeMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, boolean createUndoOps) throws Throwable
{
// need to make a note of ALL nodes created here!!
- List<Fqn> createdNodes = new LinkedList<Fqn>();
+ List<NodeSPI> createdNodes = new LinkedList<NodeSPI>();
// we need to mark new nodes created as deleted since they are only created to form a path to the node being removed, to
// create a lock.
boolean created = acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, true, false, createdNodes, true);
@@ -239,7 +239,11 @@
{
TransactionEntry entry = tx_table.get(ctx.getGlobalTransaction());
entry.addRemovedNode(fqn);
- for (Fqn f : createdNodes) entry.addRemovedNode(f);
+ for (NodeSPI nodeSPI : createdNodes)
+ {
+ entry.addRemovedNode(nodeSPI.getFqn());
+ nodeSPI.markAsDeleted(true);
+ }
}
acquireLocksOnChildren(peekNode(ctx, fqn, false, false, false), NodeLock.LockType.WRITE, ctx);
Object retVal = nextInterceptor(ctx);
@@ -248,7 +252,7 @@
if (ctx.getGlobalTransaction() == null)
{
- for (Fqn f : createdNodes) cacheImpl.realRemove(f, true);
+ for (NodeSPI nodeSPI : createdNodes) cacheImpl.realRemove(nodeSPI.getFqn(), true);
cacheImpl.realRemove(fqn, true);
NodeSPI n = peekNode(ctx, fqn, false, true, false);
@@ -328,7 +332,7 @@
private boolean acquireLocksWithTimeout(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType,
boolean createIfNotExists, boolean zeroLockTimeout,
- boolean acquireLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes, boolean markNewNodesAsDeleted)
+ boolean acquireLockOnParent, boolean reverseRemoveCheck, List<NodeSPI> createdNodes, boolean skipNotification)
throws InterruptedException
{
if (fqn == null || configuration.getIsolationLevel() == IsolationLevel.NONE) return false;
@@ -345,7 +349,7 @@
{
throw new TimeoutException("Unable to acquire lock on Fqn " + fqn + " after " + timeout + " millis");
}
- created = lock(ctx, fqn, lockType, createIfNotExists, timeout, acquireLockOnParent, reverseRemoveCheck, createdNodes, markNewNodesAsDeleted);
+ created = lock(ctx, fqn, lockType, createIfNotExists, timeout, acquireLockOnParent, reverseRemoveCheck, createdNodes, skipNotification);
firstTry = false;
}
while (createIfNotExists && peekNode(ctx, fqn, false, true, false) == null);// keep trying until we have the lock (fixes concurrent remove())
@@ -362,10 +366,10 @@
* reach a node that does not exists
* @param reverseRemoveCheck see {@link #manageReverseRemove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.NodeSPI, boolean)}
* @param createdNodes a list to which any nodes created can register their Fqns so that calling code is aware of which nodes have been newly created.
- * @param markNewNodesAsDeleted
+ * @param skipNotification
*/
private boolean lock(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType, boolean createIfNotExists, long timeout,
- boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes, boolean markNewNodesAsDeleted)
+ boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<NodeSPI> createdNodes, boolean skipNotification)
throws TimeoutException, LockingException, InterruptedException
{
Thread currentThread = Thread.currentThread();
@@ -391,11 +395,10 @@
if (createIfNotExists)
{
// if the new node is to be marked as deleted, do not notify!
- currentNode = parent.addChildDirect(new Fqn(childName), !markNewNodesAsDeleted);
+ currentNode = parent.addChildDirect(new Fqn(childName), !skipNotification);
created = true;
if (trace) log.trace("Child node was null, so created child node " + childName);
- if (createdNodes != null) createdNodes.add(currentNode.getFqn());
- if (markNewNodesAsDeleted) currentNode.markAsDeleted(true);
+ if (createdNodes != null) createdNodes.add(currentNode);
}
else
{
@@ -429,7 +432,7 @@
// check if the parent exists!!
// look into invalidated nodes as well
currentNode.getLock().releaseAll(owner);
- if (peekNode(ctx, parent.getFqn(), true, true, true) == null)
+ if (parent == null || peekNode(ctx, parent.getFqn(), true, true, true) == null)
{
// crap!
if (trace) log.trace("Parent has been deleted again. Go through the lock method all over again.");
Modified: core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2008-01-28 22:40:44 UTC (rev 5249)
+++ core/trunk/src/test/java/org/jboss/cache/api/NodeAPITest.java 2008-01-28 23:55:57 UTC (rev 5250)
@@ -46,7 +46,7 @@
public void setUp() throws Exception
{
// start a single cache instance
- cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("/META-INF/news/local-cache-service.xml", false);
+ cache = (CacheSPI<Object, Object>) new DefaultCacheFactory().createCache("META-INF/conf-test/local-tx-service.xml", false);
cache.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache.start();
rootNode = cache.getRoot();
Modified: core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2008-01-28 22:40:44 UTC (rev 5249)
+++ core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2008-01-28 23:55:57 UTC (rev 5250)
@@ -61,7 +61,7 @@
}
}
- @Test(invocationCount = 10, enabled = true)
+ @Test(invocationCount = 25, enabled = true)
public void testLock() throws Exception
{
for (int x = 0; x < 2; x++)
@@ -118,6 +118,8 @@
}
catch (Exception e)
{
+ log.error("*** error on a thread", e);
+// System.exit(1);
this.e = e;
}
}
16 years, 11 months
JBoss Cache SVN: r5249 - in core/trunk/src: test/java/org/jboss/cache/api and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 17:40:44 -0500 (Mon, 28 Jan 2008)
New Revision: 5249
Added:
core/trunk/src/test/resources/META-INF/conf-test/local-tx-service.xml
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/test/java/org/jboss/cache/api/CacheAPITest.java
Log:
fixed tests and added an an rolledback the mark node as deleted behavior, in order to supress notifications for temporary created nodes
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-28 17:38:15 UTC (rev 5248)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-28 22:40:44 UTC (rev 5249)
@@ -118,7 +118,7 @@
}
else
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, false, true, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, false, true, null, false);
}
return nextInterceptor(ctx);
}
@@ -130,7 +130,7 @@
protected Object handleLockMethod(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType, boolean recursive) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, lockType, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, lockType, false, false, false, false, null, false);
if (recursive)
{
//acquireLocksOnChildren(cache.peek(fqn, false), lockType, ctx);
@@ -204,7 +204,7 @@
if (trace) log.trace("Attempting to get WL on node to be moved [" + from + "]");
if (from != null && !(configuration.getIsolationLevel() == IsolationLevel.NONE))
{
- lock(ctx, from, NodeLock.LockType.WRITE, false, timeout, true, false, null);
+ lock(ctx, from, NodeLock.LockType.WRITE, false, timeout, true, false, null, false);
if (ctx.getGlobalTransaction() != null)
{
cache.getTransactionTable().get(ctx.getGlobalTransaction()).addRemovedNode(from);
@@ -215,7 +215,7 @@
{
//now for an RL for the new parent.
if (trace) log.trace("Attempting to get RL on new parent [" + to + "]");
- lock(ctx, to, NodeLock.LockType.READ, false, timeout, false, false, null);
+ lock(ctx, to, NodeLock.LockType.READ, false, timeout, false, false, null, false);
acquireLocksOnChildren(peekNode(ctx, to, false, true, false), NodeLock.LockType.READ, ctx);
}
Object retValue = nextInterceptor(ctx);
@@ -234,7 +234,7 @@
List<Fqn> createdNodes = new LinkedList<Fqn>();
// we need to mark new nodes created as deleted since they are only created to form a path to the node being removed, to
// create a lock.
- boolean created = acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, true, false, createdNodes);
+ boolean created = acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, true, false, createdNodes, true);
if (ctx.getGlobalTransaction() != null)
{
TransactionEntry entry = tx_table.get(ctx.getGlobalTransaction());
@@ -263,7 +263,7 @@
protected Object handlePutForExternalReadMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Object key, Object value) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, true, true, false, true, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, true, true, false, true, null, false);
return nextInterceptor(ctx);
}
@@ -274,61 +274,61 @@
protected Object handleRemoveDataMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, boolean createUndoOps) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleAddChildMethod(InvocationContext ctx, GlobalTransaction tx, Fqn parentFqn, Object childName, Node cn, boolean createUndoOps) throws Throwable
{
- acquireLocksWithTimeout(ctx, parentFqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, parentFqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleEvictMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, true, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, true, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleGetKeyValueMethod(InvocationContext ctx, Fqn fqn, Object key, boolean sendNodeEvent) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleGetNodeMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleGetKeysMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleGetChildrenNamesMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handlePrintMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
protected Object handleReleaseAllLocksMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
return nextInterceptor(ctx);
}
private boolean acquireLocksWithTimeout(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType,
boolean createIfNotExists, boolean zeroLockTimeout,
- boolean acquireLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes)
+ boolean acquireLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes, boolean markNewNodesAsDeleted)
throws InterruptedException
{
if (fqn == null || configuration.getIsolationLevel() == IsolationLevel.NONE) return false;
@@ -345,7 +345,7 @@
{
throw new TimeoutException("Unable to acquire lock on Fqn " + fqn + " after " + timeout + " millis");
}
- created = lock(ctx, fqn, lockType, createIfNotExists, timeout, acquireLockOnParent, reverseRemoveCheck, createdNodes);
+ created = lock(ctx, fqn, lockType, createIfNotExists, timeout, acquireLockOnParent, reverseRemoveCheck, createdNodes, markNewNodesAsDeleted);
firstTry = false;
}
while (createIfNotExists && peekNode(ctx, fqn, false, true, false) == null);// keep trying until we have the lock (fixes concurrent remove())
@@ -362,9 +362,10 @@
* reach a node that does not exists
* @param reverseRemoveCheck see {@link #manageReverseRemove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.NodeSPI, boolean)}
* @param createdNodes a list to which any nodes created can register their Fqns so that calling code is aware of which nodes have been newly created.
+ * @param markNewNodesAsDeleted
*/
private boolean lock(InvocationContext ctx, Fqn fqn, NodeLock.LockType lockType, boolean createIfNotExists, long timeout,
- boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes)
+ boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes, boolean markNewNodesAsDeleted)
throws TimeoutException, LockingException, InterruptedException
{
Thread currentThread = Thread.currentThread();
@@ -390,10 +391,11 @@
if (createIfNotExists)
{
// if the new node is to be marked as deleted, do not notify!
- currentNode = parent.addChildDirect(new Fqn(childName), true);
+ currentNode = parent.addChildDirect(new Fqn(childName), !markNewNodesAsDeleted);
created = true;
- if (trace) log.trace("Child node was null, so created child node " + childName + System.identityHashCode(currentNode));
+ if (trace) log.trace("Child node was null, so created child node " + childName);
if (createdNodes != null) createdNodes.add(currentNode.getFqn());
+ if (markNewNodesAsDeleted) currentNode.markAsDeleted(true);
}
else
{
Modified: core/trunk/src/test/java/org/jboss/cache/api/CacheAPITest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/api/CacheAPITest.java 2008-01-28 17:38:15 UTC (rev 5248)
+++ core/trunk/src/test/java/org/jboss/cache/api/CacheAPITest.java 2008-01-28 22:40:44 UTC (rev 5249)
@@ -43,7 +43,7 @@
{
// start a single cache instance
CacheFactory<String, String> cf = new DefaultCacheFactory();
- cache = cf.createCache("/META-INF/news/local-cache-service.xml", false);
+ cache = cf.createCache("META-INF/conf-test/local-tx-service.xml", false);
cache.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache.start();
events.clear();
Added: core/trunk/src/test/resources/META-INF/conf-test/local-tx-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/conf-test/local-tx-service.xml (rev 0)
+++ core/trunk/src/test/resources/META-INF/conf-test/local-tx-service.xml 2008-01-28 22:40:44 UTC (rev 5249)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Sample TreeCache Service Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<server>
+
+ <!-- ==================================================================== -->
+ <!-- Defines TreeCache configuration -->
+ <!-- ==================================================================== -->
+
+ <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
+ name="jboss.cache:service=TreeCache">
+
+ <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=TransactionManager</depends>
+
+
+ <!-- Configure the TransactionManager -->
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
+
+
+ <!--
+ Node locking level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!--
+ Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+ -->
+ <attribute name="CacheMode">LOCAL</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all clusters, in order
+ to find each other
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!-- JGroups protocol stack properties. Can also be a URL,
+ e.g. file:/home/bela/default.xml
+ <attribute name="ClusterProperties"></attribute>
+ -->
+
+ <!-- JGroups protocol stack properties NOT NEEDED since CacheMode is LOCAL -->
+
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members in a clustered environment
+ -->
+ <attribute name="StateRetrievalTimeout">20000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">20000</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- This defaults to 200000 if not specified -->
+ <attribute name="eventQueueSize">200000</attribute>
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ </region>
+ <region name="/org/jboss/data">
+ <attribute name="maxNodes">5000</attribute>
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ </region>
+ <region name="/org/jboss/test/data">
+ <attribute name="maxNodes">5</attribute>
+ <attribute name="timeToLiveSeconds">4</attribute>
+ </region>
+ </config>
+ </attribute>
+
+ <!--
+ Indicate whether to use region based marshalling or not. Set this to true if you are running under a scoped
+ class loader, e.g., inside an application server. Default is "false".
+ -->
+ <attribute name="UseRegionBasedMarshalling">false</attribute>
+ </mbean>
+
+
+</server>
16 years, 11 months
JBoss Cache SVN: r5248 - benchmarks/benchmark-fwk/trunk.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 12:38:15 -0500 (Mon, 28 Jan 2008)
New Revision: 5248
Modified:
benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh
Log:
cluster-stop is bad, as it might interfere with after report generation running barrier, and leave the cluster in an inconsistent state
Modified: benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh 2008-01-28 17:02:27 UTC (rev 5247)
+++ benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh 2008-01-28 17:38:15 UTC (rev 5248)
@@ -21,8 +21,6 @@
done
sleep 60
mv performance-$size.csv output/$product-$config-$size.csv
- ./cluster.sh stop
- #/home/msurtani/bin/killAllJVMs.sh
sleep 10
done
done
16 years, 11 months
JBoss Cache SVN: r5247 - in benchmarks/benchmark-fwk/trunk: src/org/cachebench and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-28 12:02:27 -0500 (Mon, 28 Jan 2008)
New Revision: 5247
Modified:
benchmarks/benchmark-fwk/trunk/TODO
benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/TcpTransport.java
Log:
enhanced the barrier - if an node receives an barrier named differently it will exit. This means that stale processes are running within the cluster
Modified: benchmarks/benchmark-fwk/trunk/TODO
===================================================================
--- benchmarks/benchmark-fwk/trunk/TODO 2008-01-28 15:00:27 UTC (rev 5246)
+++ benchmarks/benchmark-fwk/trunk/TODO 2008-01-28 17:02:27 UTC (rev 5247)
@@ -1,3 +1,4 @@
1. JBoss Cache 1.4.1 breaks during warmup
2. ReplicationOccursTest doesn't always work - reports false errors.
+ - it relies on cache.getReplicatedData(); most likely that is the cause of the problem, refere to javadoc
3. Replace cluster.sh, runNode.sh, killNode.sh and cache-product/product-x.y.z/config.sh with Ant scripts to make them cross-platform.
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-01-28 15:00:27 UTC (rev 5246)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/CacheBenchmarkRunner.java 2008-01-28 17:02:27 UTC (rev 5247)
@@ -97,7 +97,7 @@
List<TestResult> results = new ArrayList<TestResult>();
for (TestCase test : conf.getTestCases())
{
- CacheWrapper cache;
+ CacheWrapper cache = null;
try
{
cache = getCacheWrapperInstance(test);
@@ -123,6 +123,13 @@
}
catch (Exception e)
{
+ try
+ {
+ shutdownCache(cache);
+ } catch (Exception e1)
+ {
+ //ignore
+ }
logger.warn("Unable to Initialize or Setup the Cache - Not performing any tests", e);
errorLogger.error("Unable to Initialize or Setup the Cache: " + test.getCacheWrapper(), e);
errorLogger.error("Skipping this test");
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java 2008-01-28 15:00:27 UTC (rev 5246)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/ClusterBarrier.java 2008-01-28 17:02:27 UTC (rev 5247)
@@ -19,11 +19,13 @@
private ClusterConfig config;
public final Map<SocketAddress, Object> receivedMessages = new HashMap<SocketAddress, Object>();
- private Transport transport;
+ private TcpTransport transport;
private Object message;
private int numMembers;
private boolean acknowledge;
private static final String ACK = "_ACK";
+ private boolean failOnWrongMessaages;
+ private String errorMessage;
/**
@@ -40,6 +42,7 @@
public void setAcknowledge(boolean acknowledge)
{
this.acknowledge = acknowledge;
+ this.failOnWrongMessaages = acknowledge;
}
/**
@@ -76,6 +79,14 @@
receivedAllMessages = receivedMessages.size() >= numMembers;
if (!receivedAllMessages)
{
+ if (errorMessage != null)
+ {
+ //might be that I am the intruder, give other members a chance to fail aswell
+ transport.send(null, message);
+ transport.stop();
+ Thread.sleep(2000);
+ throw new IllegalStateException(errorMessage);
+ }
receivedMessages.wait(2000);
}
}
@@ -91,19 +102,29 @@
public void receive(SocketAddress sender, Object payload) throws Exception
{
- log.trace("Received '" + payload + "' from " + sender + " still expecting " + getMissingMembersCount() + " member(s)");
+ log.trace("Received '" + payload + "' from " + formatName(sender) + " still expecting " + getMissingMembersCount() + " member(s)");
if (payload == null)
{
log.warn("payload is incorrect (sender=" + sender + "): " + payload);
return;
}
- if (acknowledge && !isAcknowledgeMessage(payload, message))
+ if (acknowledge && !isAcknowledgeMessage(payload))
{
log.trace("Sending ack, still expecting " + getMissingMembersCount() + " members.");
transport.send(null, getAcknowledgeMessage(message));
return;
}
+ if (failOnWrongMessaages && !message.equals(payload) && !getAcknowledgeMessage(message).equals(payload))
+ {
+ errorMessage = "We recieved an message from a differenet barrier. This normally means that there is an stale " +
+ "barrier running somewhere.The source of the message is '" + sender + "', message is:'" + payload + "', " +
+ "and we were expecting '" + message + "'";
+ log.error(errorMessage);
+ this.receivedMessages.notifyAll();
+
+ }
+
//we are here if either no ack or ack the message is an ack message
synchronized (this.receivedMessages)
{
@@ -113,10 +134,18 @@
int expected = getMissingMembersCount();
log.trace("Sender " + sender + " registered, still waiting for " + expected + " member(s)");
this.receivedMessages.notifyAll();
+ } else {
+ log.trace("Sender '" + formatName(sender) + "' is already registered in the list of known senders!");
}
+ log.trace("Current list of senders is: " + receivedMessages.keySet());
}
}
+ private String formatName(SocketAddress sender)
+ {
+ return transport.isLocal(sender) ? "<local(" + sender + ")>" : String.valueOf(sender);
+ }
+
private int getMissingMembersCount()
{
return numMembers - receivedMessages.size();
@@ -138,13 +167,9 @@
return message.toString() + ACK;
}
- private boolean isAcknowledgeMessage(Object payload, Object message)
+ private boolean isAcknowledgeMessage(Object payload)
{
- boolean result;
- String payloadStr = payload.toString();
- result = payloadStr.equals(getAcknowledgeMessage(message));
- log.trace("Is acknowledge? " + result);
- return result;
+ return payload == null ? false : (payload.toString().indexOf(ACK) >= 0);
}
public void setConfig(ClusterConfig config)
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/TcpTransport.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/TcpTransport.java 2008-01-28 15:00:27 UTC (rev 5246)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/cluster/TcpTransport.java 2008-01-28 17:02:27 UTC (rev 5247)
@@ -47,7 +47,6 @@
public void create(ClusterConfig clusterConfig) throws Exception
{
this.config = clusterConfig;
- String tmp;
startPort = config.getPortForThisNode();
String bindAddrStr = config.getBindAddress();
if (bindAddrStr != null)
@@ -121,7 +120,7 @@
}
catch (IOException ioEx)
{
- log.warn("An exception appeared whilst trying to create server socket on port " + start_port1 + ", error:"
+ log.trace("An exception appeared whilst trying to create server socket on port " + start_port1 + ", error:"
+ ioEx.getMessage());
}
break;
@@ -173,13 +172,10 @@
class ConnectionTable
{
- /**
- * List<InetSocketAddress>
- */
- List myNodes;
+ List<InetSocketAddress> myNodes;
final Connection[] connections;
- ConnectionTable(List nodes) throws Exception
+ ConnectionTable(List<InetSocketAddress> nodes) throws Exception
{
this.myNodes = nodes;
connections = new Connection[nodes.size()];
@@ -190,9 +186,8 @@
{
int i = 0;
log.trace("Nodes is " + myNodes);
- for (Iterator it = myNodes.iterator(); it.hasNext();)
+ for (InetSocketAddress addr : myNodes)
{
- InetSocketAddress addr = (InetSocketAddress) it.next();
if (connections[i] == null)
{
try
@@ -204,10 +199,6 @@
{
log.trace("-- failed to connect to " + addr);
}
- catch (Exception all_others)
- {
- throw all_others;
- }
}
i++;
}
@@ -255,6 +246,19 @@
}
return sb.toString();
}
+
+ public boolean isLocalConnection(SocketAddress socketAddress)
+ {
+ for (Connection conn : connections)
+ {
+ SocketAddress addr = conn.sock != null ? conn.sock.getLocalSocketAddress() : null;
+ if (addr != null && addr.equals(socketAddress))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
class Connection
@@ -336,14 +340,9 @@
if (receiver != null)
receiver.receive(remote, message);
}
- catch (EOFException eof)
- {
+ catch (Exception e) {
break;
}
- catch (Exception ex)
- {
- break;
- }
}
log.trace("-- receiver thread for " + remote + " terminated");
}
@@ -352,11 +351,15 @@
{
try
{
+ log.trace("Closing receiver thread for: " + sock);
sock.close();
+ in.close();
sock = null;
+ this.interrupt();
}
catch (Exception ex)
{
+ log.warn("Exception while closing the thread", ex);
}
}
}
@@ -386,4 +389,9 @@
return retval;
}
+ public boolean isLocal(SocketAddress sa)
+ {
+ return connectionTable.isLocalConnection(sa);
+ }
+
}
16 years, 11 months
JBoss Cache SVN: r5246 - in core/trunk/src/main/java/org/jboss/cache: invocation and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-28 10:00:27 -0500 (Mon, 28 Jan 2008)
New Revision: 5246
Modified:
core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
Log:
Cleaned up unused methods in UnversionedNode
Modified: core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2008-01-28 11:47:58 UTC (rev 5245)
+++ core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2008-01-28 15:00:27 UTC (rev 5246)
@@ -162,7 +162,7 @@
* @param sb StringBuffer to print to
* @param indent depth of this node in the tree. Used to indent details by prepending spaces.
*/
-
+ @Deprecated
void print(StringBuffer sb, int indent);
// versioning
Modified: core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-01-28 11:47:58 UTC (rev 5245)
+++ core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-01-28 15:00:27 UTC (rev 5246)
@@ -31,15 +31,10 @@
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.0.0
*/
+@SuppressWarnings("unchecked")
public class UnversionedNode<K, V> extends AbstractNode<K, V>
{
-
/**
- * Default output indent for printing.
- */
- private static final int INDENT = 4;
-
- /**
* Debug log.
*/
protected static Log log = LogFactory.getLog(UnversionedNode.class);
@@ -64,13 +59,13 @@
/**
* A reference of the CacheImpl instance.
*/
- private transient CacheSPI<K, V> cache;
+ private transient CacheSPI cache;
private transient CacheImpl cacheImpl;
/**
* Map of general data keys to values.
*/
- private final Map<K, V> data = new HashMap<K, V>();
+ private final Map data = new HashMap();
private boolean lockForChildInsertRemove;
@@ -96,7 +91,7 @@
* {@link #data} field; <code>false</code> if param <code>data</code>'s contents should be copied into
* this object's {@link #data} field.
*/
- protected UnversionedNode(Object child_name, Fqn fqn, Map<K, V> data, boolean mapSafe, CacheSPI<K, V> cache)
+ protected UnversionedNode(Object child_name, Fqn fqn, Map data, boolean mapSafe, CacheSPI cache)
{
init(child_name, fqn, cache);
setInternalState(data);
@@ -122,7 +117,7 @@
/**
* Initializes with a name and FQN and cache.
*/
- private void init(Object child_name, Fqn fqn, CacheSPI<K, V> cache)
+ private void init(Object child_name, Fqn fqn, CacheSPI cache)
{
if (cache == null)
{
@@ -140,7 +135,7 @@
/**
* Returns a parent by checking the TreeMap by name.
*/
- public NodeSPI<K, V> getParent()
+ public NodeSPI getParent()
{
if (fqn.isRoot())
{
@@ -174,7 +169,7 @@
return children;
}
- public CacheSPI<K, V> getCache()
+ public CacheSPI getCache()
{
return cache;
}
@@ -195,13 +190,13 @@
throw new NodeNotValidException("Node " + getFqn() + " is not valid. Perhaps it has been moved or removed.");
}
- public V get(K key)
+ public Object get(Object key)
{
assertValid();
return cache.get(getFqn(), key);
}
- public V getDirect(K key)
+ public Object getDirect(Object key)
{
return data.get(key);
}
@@ -223,54 +218,45 @@
return lock_;
}
- public Map<K, V> getData()
+ public Map getDataDirect()
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-// assertValid();
-// if (cache == null) return Collections.emptyMap();
-// return cache.getData(getFqn());
- }
-
- public Map<K, V> getDataDirect()
- {
if (data == null) return Collections.emptyMap();
return Collections.unmodifiableMap(data);
}
- public V put(K key, V value)
+ public Object put(Object key, Object value)
{
assertValid();
return cache.put(getFqn(), key, value);
}
- public V putDirect(K key, V value)
+ public Object putDirect(Object key, Object value)
{
return data.put(key, value);
}
- public NodeSPI<K, V> getOrCreateChild(Object child_name, GlobalTransaction gtx, boolean notify)
+ public NodeSPI getOrCreateChild(Object child_name, GlobalTransaction gtx, boolean notify)
{
return getOrCreateChild(child_name, gtx, true, notify);
}
- private NodeSPI<K, V> getOrCreateChild(Object child_name, GlobalTransaction gtx, boolean createIfNotExists, boolean notify)
+ private NodeSPI getOrCreateChild(Object child_name, GlobalTransaction gtx, boolean createIfNotExists, boolean notify)
{
- NodeSPI<K, V> child;
+ NodeSPI child;
if (child_name == null)
{
throw new IllegalArgumentException("null child name");
}
- child = (NodeSPI<K, V>) children().get(child_name);
+ child = (NodeSPI) children().get(child_name);
InvocationContext ctx = cache.getInvocationContext();
if (createIfNotExists && child == null)
{
// construct the new child outside the synchronized block to avoid
// spending any more time than necessary in the synchronized section
Fqn child_fqn = new Fqn(this.fqn, child_name);
- NodeSPI<K, V> newChild = (NodeSPI<K, V>) cache.getConfiguration().getRuntimeConfig().getNodeFactory().createNode(child_name, delegate, null);
+ NodeSPI newChild = (NodeSPI) cache.getConfiguration().getRuntimeConfig().getNodeFactory().createNode(child_name, delegate, null);
if (newChild == null)
{
throw new IllegalStateException();
@@ -279,7 +265,7 @@
{
// check again to see if the child exists
// after acquiring exclusive lock
- child = (NodeSPI<K, V>) children().get(child_name);
+ child = (NodeSPI) children().get(child_name);
if (child == null)
{
if (notify) cache.getNotifier().notifyNodeCreated(child_fqn, true, ctx);
@@ -311,13 +297,13 @@
}
- public V remove(K key)
+ public Object remove(Object key)
{
assertValid();
return cache.remove(getFqn(), key);
}
- public V removeDirect(K key)
+ public Object removeDirect(Object key)
{
if (data == null) return null;
return data.remove(key);
@@ -434,16 +420,8 @@
return sb.toString();
}
- public Node<K, V> addChild(Fqn f)
+ public void addChildDirect(NodeSPI child)
{
- assertValid();
- Fqn nf = new Fqn(getFqn(), f);
- cache.put(nf, null);
- return getChild(f);
- }
-
- public void addChildDirect(NodeSPI<K, V> child)
- {
if (child.getFqn().getParent().equals(getFqn()))
{
synchronized (this)
@@ -455,12 +433,12 @@
throw new CacheException("Attempting to add a child [" + child.getFqn() + "] to [" + getFqn() + "]. Can only add direct children.");
}
- public NodeSPI<K, V> addChildDirect(Fqn f)
+ public NodeSPI addChildDirect(Fqn f)
{
return addChildDirect(f, true);
}
- public NodeSPI<K, V> addChildDirect(Fqn f, boolean notify)
+ public NodeSPI addChildDirect(Fqn f, boolean notify)
{
if (f.size() == 1)
{
@@ -474,31 +452,13 @@
}
- public void clearData()
- {
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-
-// assertValid();
-// cache.removeData(getFqn());
- }
-
public void clearDataDirect()
{
if (data != null) data.clear();
}
- public Node<K, V> getChild(Fqn fqn)
+ public NodeSPI getChildDirect(Fqn fqn)
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-//
-// assertValid();
-// return cache.get(new Fqn(getFqn(), fqn));
- }
-
- public NodeSPI<K, V> getChildDirect(Fqn fqn)
- {
if (fqn.size() == 1)
{
return getChildDirect(fqn.getLastElement());
@@ -516,116 +476,20 @@
}
}
- public Set<Object> getChildrenNames()
- {
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-
-// assertValid();
-// return cache.getChildrenNames(getFqn());
- }
-
public Set<Object> getChildrenNamesDirect()
{
return children == null ? Collections.emptySet() : new HashSet<Object>(children.keySet());
}
- public Set<K> getKeys()
+ public Set<Object> getKeysDirect()
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-
-// assertValid();
-// Set<K> keys = cache.getKeys(getFqn());
-// return keys == null ? Collections.<K>emptySet() : Collections.<K>unmodifiableSet(keys);
- }
-
- public Set<K> getKeysDirect()
- {
if (data == null)
{
return Collections.emptySet();
}
- return Collections.unmodifiableSet(new HashSet<K>(data.keySet()));
+ return Collections.unmodifiableSet(new HashSet<Object>(data.keySet()));
}
- public boolean hasChild(Fqn f)
- {
- assertValid();
- return getChild(f) != null;
- }
-
- public boolean hasChild(Object o)
- {
- assertValid();
- return getChild(o) != null;
- }
-
- public V putIfAbsent(K k, V v)
- {
- assertValid();
- // make sure this is atomic. Not hugely performant at the moment (should use the locking interceptors) but for now ...
- synchronized (this)
- {
- if (!getKeys().contains(k))
- return put(k, v);
- else
- return get(k);
- }
- }
-
- public V replace(K key, V value)
- {
- assertValid();
- // make sure this is atomic. Not hugely performant at the moment (should use the locking interceptors) but for now ...
- synchronized (this)
- {
- if (getKeys().contains(key))
- {
- return put(key, value);
- }
- else
- return null;
- }
- }
-
- public boolean replace(K key, V oldValue, V newValue)
- {
- assertValid();
- // make sure this is atomic. Not hugely performant at the moment (should use the locking interceptors) but for now ...
- synchronized (this)
- {
- if (oldValue.equals(get(key)))
- {
- put(key, newValue);
- return true;
- }
- else
- return false;
- }
- }
-
- public boolean removeChild(Fqn fqn)
- {
- assertValid();
- return cache.removeNode(new Fqn(getFqn(), fqn));
- }
-
- public int dataSize()
- {
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-//
-// assertValid();
-// return cache.getKeys(getFqn()).size();
- }
-
- public boolean removeChild(Object childName)
- {
- assertValid();
- return cache.removeNode(new Fqn(getFqn(), childName));
- }
-
public boolean removeChildDirect(Object childName)
{
return children != null && children.remove(childName) != null;
@@ -655,23 +519,14 @@
this.children.putAll(children);
}
- public void putAll(Map<K, V> data)
+ public void putAll(Map data)
{
assertValid();
cache.put(fqn, data);
}
- public void replaceAll(Map<K, V> data)
+ public void putAllDirect(Map data)
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-
-// assertValid();
-// cache.put(fqn, data, true);
- }
-
- public void putAllDirect(Map<K, V> data)
- {
if (data == null) return;
this.data.putAll(data);
}
@@ -685,20 +540,6 @@
children = null;
}
- public void print(StringBuffer sb, int indent)
- {
- printIndent(sb, indent);
- sb.append(Fqn.SEPARATOR).append(getName()).append(" ").append(getDataDirect().size());
- if (children != null)
- {
- for (Node node : children.values())
- {
- sb.append("\n");
- ((NodeSPI) node).print(sb, indent + INDENT);
- }
- }
- }
-
// versioning
public void setVersion(DataVersion version)
@@ -722,7 +563,7 @@
}
}
- public void addChild(Object child_name, Node<K, V> n)
+ public void addChild(Object child_name, Node n)
{
if (child_name != null)
{
@@ -768,45 +609,21 @@
}
}
- public Node<K, V> getChild(Object childName)
+ public NodeSPI getChildDirect(Object childName)
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-//
-// return cache.get(new Fqn(getFqn(), childName));
- }
-
- public NodeSPI<K, V> getChildDirect(Object childName)
- {
if (childName == null) return null;
- return (NodeSPI<K, V>) (children == null ? null : children.get(childName));
+ return (NodeSPI) (children == null ? null : children.get(childName));
}
- public Set<Node<K, V>> getChildren()
+ public Set<NodeSPI> getChildrenDirect()
{
- // TODO: Fix this
- throw new RuntimeException("Should never get here - use NodeInterceptorDelegate!");
-
-// assertValid();
-// if (cache == null) return Collections.emptySet();
-// Set<Node<K, V>> children = new HashSet<Node<K, V>>();
-// for (Object c : cache.getChildrenNames(getFqn()))
-// {
-// Node n = cache.get(new Fqn(getFqn(), c));
-// if (n != null) children.add(n);
-// }
-// return Collections.unmodifiableSet(children);
- }
-
- public Set<NodeSPI<K, V>> getChildrenDirect()
- {
// strip out deleted child nodes...
if (children == null || children.size() == 0) return Collections.emptySet();
- Set<NodeSPI<K, V>> exclDeleted = new HashSet<NodeSPI<K, V>>();
- for (Node<K, V> n : children.values())
+ Set<NodeSPI> exclDeleted = new HashSet<NodeSPI>();
+ for (Node n : children.values())
{
- NodeSPI<K, V> spi = (NodeSPI<K, V>) n;
+ NodeSPI spi = (NodeSPI) n;
if (!spi.isDeleted()) exclDeleted.add(spi);
}
return Collections.unmodifiableSet(exclDeleted);
@@ -817,7 +634,7 @@
return children != null && children.size() != 0;
}
- public Set<NodeSPI<K, V>> getChildrenDirect(boolean includeMarkedForRemoval)
+ public Set<NodeSPI> getChildrenDirect(boolean includeMarkedForRemoval)
{
if (includeMarkedForRemoval)
{
@@ -904,14 +721,12 @@
this.lockForChildInsertRemove = lockForChildInsertRemove;
}
- @SuppressWarnings("unchecked")
public void setInternalState(Map state)
{
// don't bother doing anything here
putAllDirect(state);
}
- @SuppressWarnings("unchecked")
public Map getInternalState(boolean onlyInternalState)
{
if (onlyInternalState)
@@ -925,7 +740,7 @@
{
if (recursive && children != null)
{
- for (Node child : children.values())
+ for (Node<?, ?> child : children.values())
{
child.releaseObjectReferences(recursive);
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-01-28 11:47:58 UTC (rev 5245)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-01-28 15:00:27 UTC (rev 5246)
@@ -1,5 +1,6 @@
package org.jboss.cache.invocation;
+import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
@@ -118,7 +119,7 @@
public void print(StringBuffer sb, int indent)
{
- node.print(sb, indent);
+ throw new CacheException("This method is deprecated!");
}
public void setVersion(DataVersion version)
16 years, 11 months
JBoss Cache SVN: r5245 - in benchmarks/benchmark-fwk/trunk: conf and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-28 06:47:58 -0500 (Mon, 28 Jan 2008)
New Revision: 5245
Modified:
benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh
benchmarks/benchmark-fwk/trunk/bindAddress.sh
benchmarks/benchmark-fwk/trunk/conf/log4j.xml
Log:
Modified: benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh 2008-01-28 11:39:46 UTC (rev 5244)
+++ benchmarks/benchmark-fwk/trunk/allJBossCacheTests.sh 2008-01-28 11:47:58 UTC (rev 5245)
@@ -1,7 +1,8 @@
#!/bin/bash
-scaling="2 4 6 8 10"
-configs="pess-repl-async.xml pess-repl-sync.xml ress-repl-async-br.xml"
+# scaling="2 4 6 8 10"
+scaling="2 4 6"
+configs="pess-repl-async.xml pess-repl-sync.xml pess-repl-async-br.xml"
products="jbosscache-2.0.0 jbosscache-2.1.0"
mkdir output
@@ -18,9 +19,10 @@
echo Waiting for report...
sleep 30
done
- sleep 10
+ sleep 60
mv performance-$size.csv output/$product-$config-$size.csv
./cluster.sh stop
+ #/home/msurtani/bin/killAllJVMs.sh
sleep 10
done
done
Modified: benchmarks/benchmark-fwk/trunk/bindAddress.sh
===================================================================
--- benchmarks/benchmark-fwk/trunk/bindAddress.sh 2008-01-28 11:39:46 UTC (rev 5244)
+++ benchmarks/benchmark-fwk/trunk/bindAddress.sh 2008-01-28 11:47:58 UTC (rev 5245)
@@ -1,5 +1,5 @@
#!/bin/sh
### Set your bind address for the tests to use. Could be an IP, host name or a reference to an environment variable.
-BIND_ADDRESS=${MYTESTIP_1}
+BIND_ADDRESS=${MYTESTIP_2}
Modified: benchmarks/benchmark-fwk/trunk/conf/log4j.xml
===================================================================
--- benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-01-28 11:39:46 UTC (rev 5244)
+++ benchmarks/benchmark-fwk/trunk/conf/log4j.xml 2008-01-28 11:47:58 UTC (rev 5245)
@@ -7,8 +7,8 @@
<!-- The rolling file appender -->
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="cachebench.log"/>
- <param name="Append" value="false"/>
- <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="true"/>
+ <param name="Threshold" value="TRACE"/>
<param name="MaxFileSize" value="10480KB"/>
<param name="MaxBackupIndex" value="3"/>
<layout class="org.apache.log4j.PatternLayout">
@@ -43,9 +43,8 @@
</category>
<category name="org.cachebench" additivity="false">
- <priority value="INFO"/>
+ <priority value="TRACE"/>
<appender-ref ref="FILE"/>
- <appender-ref ref="CONSOLE"/>
</category>
<category name="net.sf.ehcache" additivity="false">
16 years, 11 months