JBoss Cache SVN: r4522 - in core/trunk/src: main/docbook/userguide/en/modules and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-01 08:26:52 -0400 (Mon, 01 Oct 2007)
New Revision: 4522
Modified:
core/trunk/src/examples/resources/META-INF/replSync-service.xml
core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
core/trunk/src/main/resources/META-INF/buddyreplication-service.xml
core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml
core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml
core/trunk/src/…
[View More]main/resources/META-INF/mixedPolicy-eviction-service.xml
core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml
core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml
core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml
core/trunk/src/main/resources/META-INF/replAsync-service.xml
core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml
core/trunk/src/main/resources/META-INF/replSync-service-test.xml
core/trunk/src/main/resources/META-INF/replSync-service.xml
core/trunk/src/main/resources/META-INF/tree-service.xml
core/trunk/src/test-scripts/resources/bench.xml
core/trunk/src/test/resources/META-INF/unit-test-cache-service.xml
Log:
Removed deprecated JGroups config elements
Modified: core/trunk/src/examples/resources/META-INF/replSync-service.xml
===================================================================
--- core/trunk/src/examples/resources/META-INF/replSync-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/examples/resources/META-INF/replSync-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -117,10 +117,10 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
+ <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"/>
Modified: core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml
===================================================================
--- core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/docbook/userguide/en/modules/configuration_reference.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -90,8 +90,7 @@
<FD shun="true"/>
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192"/>
+ <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" />
<UNICAST timeout="600,1200,2400",4800/>
<pbcast.STABLE desired_avg_gossip="400000"/>
<FC max_credits="2000000" min_threshold="0.10"/>
Modified: core/trunk/src/main/resources/META-INF/buddyreplication-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/buddyreplication-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/buddyreplication-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -106,10 +106,10 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -104,8 +104,7 @@
<!-- <FD shun="true"/>-->
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192"/>
+ <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"/>
<UNICAST timeout="600,1200,2400"/>
<pbcast.STABLE desired_avg_gossip="20000"/>
<FRAG frag_size="8192"/>
Modified: core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -86,23 +86,17 @@
mcast_send_buf_size="80000" mcast_recv_buf_size="150000"
ucast_send_buf_size="80000" ucast_recv_buf_size="150000"
loopback="false"/>
- <PING timeout="2000" num_initial_members="3"
- up_thread="false" down_thread="false"/>
+ <PING timeout="2000" num_initial_members="3"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
- <FD shun="true" up_thread="true" down_thread="true"/>
- <VERIFY_SUSPECT timeout="1500"
- up_thread="false" down_thread="false"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192" up_thread="false" down_thread="false"/>
- <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
- down_thread="false"/>
- <pbcast.STABLE desired_avg_gossip="20000"
- up_thread="false" down_thread="false"/>
- <FRAG frag_size="8192"
- down_thread="false" up_thread="false"/>
+ <FD shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"/>
+ <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"/>
+ <pbcast.STABLE desired_avg_gossip="20000"/>
+ <FRAG frag_size="8192"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
+ <pbcast.STATE_TRANSFER/>
</config>
</attribute>
Modified: core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -101,10 +101,10 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -101,8 +101,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -101,8 +101,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -101,8 +101,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/replAsync-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replAsync-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/replAsync-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -117,8 +117,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -101,8 +101,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/replSync-service-test.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-service-test.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/replSync-service-test.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -117,8 +117,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/replSync-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/replSync-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -117,8 +117,7 @@
<FD_SOCK/>
<FD timeout="10000" max_tries="5" shun="true"/>
<VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <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"/>
Modified: core/trunk/src/main/resources/META-INF/tree-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/tree-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/main/resources/META-INF/tree-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -99,23 +99,17 @@
mcast_send_buf_size="80000" mcast_recv_buf_size="150000"
ucast_send_buf_size="80000" ucast_recv_buf_size="150000"
loopback="false"/>
- <PING timeout="2000" num_initial_members="3"
- up_thread="false" down_thread="false"/>
+ <PING timeout="2000" num_initial_members="3"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
- <FD shun="true" up_thread="true" down_thread="true"/>
- <VERIFY_SUSPECT timeout="1500"
- up_thread="false" down_thread="false"/>
- <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
- max_xmit_size="8192" up_thread="false" down_thread="false"/>
- <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
- down_thread="false"/>
- <pbcast.STABLE desired_avg_gossip="20000"
- up_thread="false" down_thread="false"/>
- <FRAG frag_size="8192"
- down_thread="false" up_thread="false"/>
+ <FD shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"/>
+ <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"/>
+ <pbcast.STABLE desired_avg_gossip="20000"/>
+ <FRAG frag_size="8192"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
+ <pbcast.STATE_TRANSFER/>
</config>
</attribute>
Modified: core/trunk/src/test/resources/META-INF/unit-test-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/META-INF/unit-test-cache-service.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/test/resources/META-INF/unit-test-cache-service.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -207,8 +207,7 @@
<!-- this is a more typical configuration of FD and VERIFY_SUSPECT-->
<!--<FD timeout="10000" max_tries="5" shun="true"/>-->
<!--<VERIFY_SUSPECT timeout="1500"/>-->
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600"/>
@@ -280,8 +279,7 @@
<!-- this is a more typical configuration of FD and VERIFY_SUSPECT-->
<!--<FD timeout="10000" max_tries="5" shun="true"/>-->
<!--<VERIFY_SUSPECT timeout="1500"/>-->
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,900,1200"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,900,1200"/>
@@ -304,65 +302,64 @@
Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
-Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]">
<config>
- <TCP start_port="7800"
- loopback="true"
- recv_buf_size="20000000"
- send_buf_size="640000"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- enable_bundling="true"
- use_send_queues="false"
- sock_conn_timeout="300"
- skip_suspected_members="true"
-
- use_concurrent_stack="true"
-
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000"
- thread_pool.queue_enabled="false"
- thread_pool.queue_max_size="100"
- thread_pool.rejection_policy="run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- 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"/>
-
- <TCPPING timeout="3000"
- initial_hosts="127.0.0.1[7800],127.0.0.1[7801]"
- port_range="1"
- num_initial_members="3"/>
- <MERGE2 max_interval="100000"
- min_interval="20000"/>
- <FD_SOCK/>
- <!--
+ <TCP start_port="7800"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="true"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="false"
+ thread_pool.queue_max_size="100"
+ thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ 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"/>
+
+ <TCPPING timeout="3000"
+ initial_hosts="127.0.0.1[7800],127.0.0.1[7801]"
+ port_range="1"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK/>
+ <!--
Note that this is an atypically short timeout and a small number of retries
configured this way to speed up unit testing, since we know all nodes run in the same JVM
and hence failure detections will be very quick.
-->
- <FD timeout="1000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500" />
- <BARRIER />
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <VIEW_SYNC avg_send_interval="60000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="3000"
- join_retry_timeout="2000" shun="true"
- view_bundling="true"/>
- <FC max_credits="2000000"
- min_threshold="0.10"/>
- <FRAG2 frag_size="60000" />
+ <FD timeout="1000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="60000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ join_retry_timeout="2000" shun="true"
+ view_bundling="true"/>
+ <FC max_credits="2000000"
+ min_threshold="0.10"/>
+ <FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER/>
<!-- <pbcast.STATE_TRANSFER/> -->
<pbcast.FLUSH timeout="0"/>
@@ -376,65 +373,64 @@
configuration should be used instead of tcp when (1) synchronous calls are used and (2) the message volume
(rate and size) is not that large">
<config>
- <TCP start_port="7800"
- loopback="true"
- recv_buf_size="20000000"
- send_buf_size="640000"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- enable_bundling="true"
- use_send_queues="false"
- sock_conn_timeout="300"
- skip_suspected_members="true"
-
- use_concurrent_stack="true"
-
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000"
- thread_pool.queue_enabled="false"
- thread_pool.queue_max_size="100"
- thread_pool.rejection_policy="run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- 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"/>
-
- <TCPPING timeout="3000"
- initial_hosts="127.0.0.1[7800],127.0.0.1[7801]"
- port_range="1"
- num_initial_members="3"/>
- <MERGE2 max_interval="100000"
- min_interval="20000"/>
- <FD_SOCK/>
- <!--
+ <TCP start_port="7800"
+ loopback="true"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ enable_bundling="true"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="false"
+ thread_pool.queue_max_size="100"
+ thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ 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"/>
+
+ <TCPPING timeout="3000"
+ initial_hosts="127.0.0.1[7800],127.0.0.1[7801]"
+ port_range="1"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="100000"
+ min_interval="20000"/>
+ <FD_SOCK/>
+ <!--
Note that this is an atypically short timeout and a small number of retries
configured this way to speed up unit testing, since we know all nodes run in the same JVM
and hence failure detections will be very quick.
-->
- <FD timeout="1000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500" />
- <BARRIER />
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <VIEW_SYNC avg_send_interval="60000"/>
- <pbcast.GMS print_local_addr="true" join_timeout="3000"
- join_retry_timeout="2000" shun="true"
- view_bundling="true"/>
- <FC max_credits="2000000"
- min_threshold="0.10"/>
- <FRAG2 frag_size="60000" />
+ <FD timeout="1000" max_tries="5" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <BARRIER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <VIEW_SYNC avg_send_interval="60000"/>
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ join_retry_timeout="2000" shun="true"
+ view_bundling="true"/>
+ <FC max_credits="2000000"
+ min_threshold="0.10"/>
+ <FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER/>
<!-- <pbcast.STATE_TRANSFER/> -->
<pbcast.FLUSH timeout="0"/>
Modified: core/trunk/src/test-scripts/resources/bench.xml
===================================================================
--- core/trunk/src/test-scripts/resources/bench.xml 2007-10-01 12:25:58 UTC (rev 4521)
+++ core/trunk/src/test-scripts/resources/bench.xml 2007-10-01 12:26:52 UTC (rev 4522)
@@ -19,7 +19,8 @@
<depends>jboss:service=TransactionManager</depends>
<!-- Configure the TransactionManager -->
- <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup</attribute>
+ <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
+ </attribute>
<!--
Isolation level : SERIALIZABLE
@@ -62,76 +63,28 @@
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
ip_ttl="2"
- down_thread="false" up_thread="false"
enable_bundling="true"/>
- <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"/>
- <!--VERIFY_SUSPECT timeout="1500" down_thread="false"/-->
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="2"
- retransmit_timeout="100,200,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"/>
+ <PING timeout="2000" num_initial_members="3"/>
+ <!-- MERGE2 max_interval="100000" min_interval="20000"/ -->
+ <FD_SOCK/>
+ <!--VERIFY_SUSPECT timeout="1500"/-->
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="2"
+ retransmit_timeout="100,200,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"
- down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
- down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"/>
<!-- Comment it out when we use repl_sync. We don't need fc when it is sync mode. -->
- <!--FC max_credits="2000000" down_thread="false" up_thread="false"
+ <!--FC max_credits="2000000"
min_threshold="0.20" max_block_time="5000"/-->
- <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
+ <FRAG2 frag_size="60000"/>
<!--Turn COMPRESS on when running PojoCache-->
<!--COMPRESS min_size="4000" compression_level="1"/-->
- <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
+ <pbcast.STATE_TRANSFER/>
</config>
-
- <!-- tcp-fast.xml | You have to edit bind_addr correctly. -->
- <!--
- <config>
- <TCP bind_addr="192.168.160.101"
- recv_buf_size="20000000"
- send_buf_size="640000"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- use_outgoing_packet_handler="false"
- down_thread="false" up_thread="false"
- enable_bundling="true"
- start_port="7800"
- use_send_queues="false"
- sock_conn_timeout="300" skip_suspected_members="true"/>
- <MPING timeout="2000"
- num_initial_members="2"
- mcast_addr="${jboss.partition.udpGroup:230.1.2.7}"
- bind_addr="192.168.160.101"
- down_thread="false" up_thread="false"/>
- <FD_SOCK down_thread="false" up_thread="false"/>
- <pbcast.NAKACK max_xmit_size="60000"
- use_mcast_xmit="false" gc_lag="10"
- retransmit_timeout="100,200,300,600,1200,2400,4800"
- down_thread="false" up_thread="false"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- down_thread="false" up_thread="false"
- max_bytes="400000"/>
- <VIEW_SYNC avg_send_interval="60000" down_thread="false" up_thread="false" />
- <pbcast.GMS print_local_addr="true" join_timeout="3000"
- down_thread="false" up_thread="false"
- join_retry_timeout="2000" shun="true"/>
- <FC max_credits="2000000" down_thread="false" up_thread="false"
- min_threshold="0.10" max_block_time="1000"/>
- <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
- </config>
- -->
</attribute>
<!-- Max number of milliseconds to wait for a lock acquisition -->
[View Less]
17 years, 6 months
JBoss Cache SVN: r4521 - core/trunk/src/test/java/org/jboss/cache/statetransfer.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-01 08:25:58 -0400 (Mon, 01 Oct 2007)
New Revision: 4521
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferCompatibilityTest.java
core/trunk/src/test/java/org/…
[View More]jboss/cache/statetransfer/StateTransferConcurrencyTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
Log:
Annotated to run as TestNG tests - these were missed for some reason.
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/FailedStateTransferTest.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -22,22 +22,24 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.fail;
-
-import java.io.InputStream;
-
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheImpl;
import org.jboss.cache.Version;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.lock.TimeoutException;
+import static org.testng.AssertJUnit.fail;
+import org.testng.annotations.Test;
+
+import java.io.InputStream;
+
/**
* A FailedStateTransferTest.
*
* @author Brian Stansberry
* @version $Revision$
*/
+@Test(groups = {"functional"})
public class FailedStateTransferTest extends StateTransferTestBase
{
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -22,15 +22,6 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertTrue;
-
-import javax.transaction.Synchronization;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
@@ -39,7 +30,13 @@
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeModified;
import org.jboss.cache.notifications.event.NodeEvent;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.Test;
+import javax.transaction.Synchronization;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+
/**
* Tests the ability to force a state transfer in the presence of
* transactional and non-transactional threads that are hung holding
@@ -48,6 +45,7 @@
* @author Brian Stansberry
* @version $Revision$
*/
+@Test(groups = {"functional"})
public class ForcedStateTransferTest extends StateTransferTestBase
{
/**
@@ -94,7 +92,7 @@
*/
static abstract class TaskRunner extends Thread
{
- CacheSPI<Object, Object> cache;
+ CacheSPI<Object, Object> cache;
Fqn fqn;
String value;
Exception failure;
@@ -402,8 +400,8 @@
* @throws Exception
*/
private CacheSPI<Object, Object> initializeSender(String isolationLevel,
- boolean replSync,
- boolean useMarshalling) throws Exception
+ boolean replSync,
+ boolean useMarshalling) throws Exception
{
CacheSPI<Object, Object> sender = createCache("sender", isolationLevel, replSync, useMarshalling, true);
@@ -750,8 +748,8 @@
* @throws Exception
*/
private CacheSPI<Object, Object> startReceiver(String isolationLevel,
- boolean replSync,
- boolean useMarshalling) throws Exception
+ boolean replSync,
+ boolean useMarshalling) throws Exception
{
CacheSPI<Object, Object> receiver = createCache("receiver", isolationLevel, replSync, useMarshalling, false);
@@ -777,11 +775,11 @@
* Override the superclass version to set an unlimited state transfer timeout
* and a 1 sec lock acquisition timeout.
*/
- private CacheSPI<Object, Object> createCache(String cacheID,
- String isolationLevel,
- boolean replSync,
- boolean useMarshalling,
- boolean startCache)
+ private CacheSPI<Object, Object> createCache(String cacheID,
+ String isolationLevel,
+ boolean replSync,
+ boolean useMarshalling,
+ boolean startCache)
throws Exception
{
CacheSPI<Object, Object> result = super.createCache(cacheID, replSync,
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -7,16 +7,6 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.fail;
-
-import java.lang.reflect.Method;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
import org.jboss.cache.CacheImpl;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
@@ -26,15 +16,22 @@
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.misc.TestingUtil;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.lang.reflect.Method;
+
/**
* Tests that state transfer works properly if the version is 2.0.0.GA.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
* @version $Revision$
*/
+@Test(groups = {"functional"})
public class StateTransfer200Test extends StateTransferTestBase
{
@@ -57,7 +54,7 @@
cache1.put(backup, "name", JOE);
cache1.put(A_B, "age", TWENTY);
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false);
// Pause to give caches time to see each other
TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
@@ -79,7 +76,7 @@
cache1.put(A_C, "name", JANE);
// now start up cache 2
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false, false, false);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false, false, false);
cache2.getConfiguration().setBuddyReplicationConfig(getBuddyConfig());
cache2.start();
@@ -100,7 +97,7 @@
@SuppressWarnings("null")
public void testCacheLoaderFailure() throws Exception
{
- CacheSPI<Object, Object> cache1 = createCache("cache1", false, false, "org.jboss.cache.statetransfer.CorruptedFileCacheLoader", false, true);
+ CacheSPI<Object, Object> cache1 = createCache("cache1", false, false, "org.jboss.cache.statetransfer.CorruptedFileCacheLoader", false, true);
cache1.put(A_B, "name", JOE);
cache1.put(A_B, "age", TWENTY);
@@ -125,7 +122,7 @@
public void testLoadEntireStateAfterStart() throws Exception
{
- CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, true);
+ CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, true);
createAndActivateRegion(cache1, Fqn.ROOT);
@@ -134,7 +131,7 @@
cache1.put(A_C, "name", BOB);
cache1.put(A_C, "age", FORTY);
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, true);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, true);
// Pause to give caches time to see each other
TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
@@ -171,7 +168,7 @@
cache1.put(A_C, "name", BOB);
cache1.put(A_C, "age", FORTY);
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, false, false);
// Pause to give caches time to see each other
TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
@@ -200,7 +197,7 @@
public void testPartialStateTransfer() throws Exception
{
- CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, false);
+ CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, false);
createAndActivateRegion(cache1, A);
@@ -209,7 +206,7 @@
cache1.put(A_C, "name", BOB);
cache1.put(A_C, "age", FORTY);
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, false);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, false);
// Pause to give caches time to see each other
TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
@@ -262,7 +259,7 @@
public void testPartialStateTferWithLoader() throws Exception
{
- CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, true);
+ CacheSPI<Object, Object> cache1 = createCache("cache1", false, true, true);
createAndActivateRegion(cache1, A);
@@ -271,7 +268,7 @@
cache1.put(A_C, "name", BOB);
cache1.put(A_C, "age", FORTY);
- CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, true);
+ CacheSPI<Object, Object> cache2 = createCache("cache2", false, true, true);
// Pause to give caches time to see each other
TestingUtil.blockUntilViewsReceived(new CacheSPI[]{cache1, cache2}, 60000);
@@ -359,7 +356,7 @@
// Set the TCL to a classloader that can't see Person/Address
Thread.currentThread().setContextClassLoader(getNotFoundClassLoader());
- CacheSPI<Object, Object> cache1 = createCache("cache1",
+ CacheSPI<Object, Object> cache1 = createCache("cache1",
false, // async
true, // use marshaller
true, // use cacheloader
@@ -375,7 +372,7 @@
cache1.put(A_B, "person", ben);
// For cache 2 we won't register loader until later
- CacheSPI<Object, Object> cache2 = createCache("cache2",
+ CacheSPI<Object, Object> cache2 = createCache("cache2",
false, // async
true, // use marshalling
true, // use cacheloader
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferCompatibilityTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferCompatibilityTest.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferCompatibilityTest.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -1,5 +1,8 @@
package org.jboss.cache.statetransfer;
+import org.testng.annotations.Test;
+
+@Test(groups = {"functional"})
public class StateTransferCompatibilityTest extends StateTransferTestBase
{
@@ -7,8 +10,8 @@
{
return "2.0.0.GA";
}
-
+
/**
* These tests ensure that http://jira.jboss.com/jira/browse/JBCACHE-738
* compatibility between non-delegating cacheloaders is maintained. In the tests
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferConcurrencyTest.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -7,16 +7,6 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNull;
-import static org.testng.AssertJUnit.assertTrue;
-import static org.testng.AssertJUnit.fail;
-
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
import org.jboss.cache.Cache;
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
@@ -29,6 +19,14 @@
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.marshall.InactiveRegionException;
import org.jboss.cache.misc.TestingUtil;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.Test;
+
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
/**
* Abstract superclass of "StateTransferVersion"-specific tests
* of CacheSPI's state transfer capability.
@@ -38,6 +36,7 @@
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
* @version $Id$
*/
+@Test(groups = {"functional"})
public class StateTransferConcurrencyTest extends StateTransferTestBase
{
@@ -377,16 +376,16 @@
for (int x = 0; x < 1; x++)
{
- // Reset things by inactivating the region
- // and enabling the stressors
- for (int i = 0; i < count; i++)
- {
- Region r = cacheA.getRegion(Fqn.fromString("/" + names[i]), true);
- r.registerContextClassLoader(getClass().getClassLoader());
- r.deactivate();
- System.out.println("Run " + x + "-- /" + names[i] + " deactivated on A");
- stressors[i].startPuts();
- }
+ // Reset things by inactivating the region
+ // and enabling the stressors
+ for (int i = 0; i < count; i++)
+ {
+ Region r = cacheA.getRegion(Fqn.fromString("/" + names[i]), true);
+ r.registerContextClassLoader(getClass().getClassLoader());
+ r.deactivate();
+ System.out.println("Run " + x + "-- /" + names[i] + " deactivated on A");
+ stressors[i].startPuts();
+ }
// Release the semaphore to allow the threads to start work
semaphore.release(count);
@@ -396,7 +395,7 @@
TestingUtil.sleepThread((long) 1000);
// Activate cacheA
- for (CacheStressor stressor:stressors)
+ for (CacheStressor stressor : stressors)
{
System.out.println("Activating /" + stressor.getName() + " on A");
cacheA.getRegion(Fqn.fromString("/" + stressor.getName()), true).activate();
@@ -661,7 +660,7 @@
TestingUtil.sleepRandom(5000);
createAndActivateRegion(cache, A_B);
System.out.println(name + " activated region" + " " + System.currentTimeMillis());
- Fqn<String> childFqn = new Fqn<String>(A_B,name);
+ Fqn<String> childFqn = new Fqn<String>(A_B, name);
cache.put(childFqn, "KEY", "VALUE");
// System.out.println(name + " put fqn " + childFqn + " " + System.currentTimeMillis());
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2007-10-01 09:24:57 UTC (rev 4520)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2007-10-01 12:25:58 UTC (rev 4521)
@@ -22,16 +22,6 @@
package org.jboss.cache.statetransfer;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
import org.jboss.cache.Cache;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
@@ -44,15 +34,26 @@
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.marshall.SelectedClassnameClassLoader;
import org.jboss.cache.misc.TestingUtil;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
/**
* Abstract superclass of the StateTransfer tests.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
* @version $Revision$
*/
+@Test(groups = {"functional"})
public abstract class StateTransferTestBase extends AbstractCacheLoaderTestBase
{
protected static final int SUBTREE_SIZE = 10;
@@ -81,21 +82,21 @@
protected abstract String getReplicationVersion();
protected CacheSPI<Object, Object> createCache(String cacheID,
- boolean sync,
- boolean useMarshalling,
- boolean useCacheLoader)
- throws Exception
+ boolean sync,
+ boolean useMarshalling,
+ boolean useCacheLoader)
+ throws Exception
{
return createCache(cacheID, sync, useMarshalling, useCacheLoader, false, true);
}
protected CacheSPI<Object, Object> createCache(String cacheID,
- boolean sync,
- boolean useMarshalling,
- boolean useCacheLoader,
- boolean cacheLoaderAsync,
- boolean startCache)
- throws Exception
+ boolean sync,
+ boolean useMarshalling,
+ boolean useCacheLoader,
+ boolean cacheLoaderAsync,
+ boolean startCache)
+ throws Exception
{
if (useCacheLoader)
{
@@ -108,7 +109,7 @@
}
protected CacheSPI<Object, Object> createCache(String cacheID, boolean sync, boolean useMarshalling, String cacheLoaderClass,
- boolean cacheLoaderAsync, boolean startCache) throws Exception
+ boolean cacheLoaderAsync, boolean startCache) throws Exception
{
if (caches.get(cacheID) != null)
{
@@ -199,7 +200,7 @@
String cacheID,
boolean useExtended,
boolean async)
- throws Exception
+ throws Exception
{
configureCacheLoader(c, "org.jboss.cache.loader.FileCacheLoader", cacheID, useExtended, async);
}
@@ -221,14 +222,14 @@
System.out.println("Error loading jdbc properties ");
}
String props = "cache.jdbc.driver =" + prop.getProperty("cache.jdbc.driver") + "\n" + "cache.jdbc.url="
- + prop.getProperty("cache.jdbc.url") + "\n" + "cache.jdbc.user="
- + prop.getProperty("cache.jdbc.user") + "\n" + "cache.jdbc.password="
- + prop.getProperty("cache.jdbc.password") + "\n" + "cache.jdbc.node.type="
- + prop.getProperty("cache.jdbc.node.type") + "\n" + "cache.jdbc.sql-concat="
- + prop.getProperty("cache.jdbc.sql-concat");
+ + prop.getProperty("cache.jdbc.url") + "\n" + "cache.jdbc.user="
+ + prop.getProperty("cache.jdbc.user") + "\n" + "cache.jdbc.password="
+ + prop.getProperty("cache.jdbc.password") + "\n" + "cache.jdbc.node.type="
+ + prop.getProperty("cache.jdbc.node.type") + "\n" + "cache.jdbc.sql-concat="
+ + prop.getProperty("cache.jdbc.sql-concat");
c.setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.JDBCCacheLoader",
- props, false, true, false));
+ props, false, true, false));
}
else
{
@@ -385,7 +386,7 @@
protected ClassLoader getClassLoader() throws Exception
{
String[] includesClasses = {"org.jboss.cache.marshall.Person",
- "org.jboss.cache.marshall.Address"};
+ "org.jboss.cache.marshall.Address"};
String[] excludesClasses = {};
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return new SelectedClassnameClassLoader(includesClasses, excludesClasses, cl);
@@ -394,7 +395,7 @@
protected ClassLoader getNotFoundClassLoader() throws Exception
{
String[] notFoundClasses = {"org.jboss.cache.marshall.Person",
- "org.jboss.cache.marshall.Address"};
+ "org.jboss.cache.marshall.Address"};
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return new SelectedClassnameClassLoader(null, null, notFoundClasses, cl);
}
@@ -415,7 +416,7 @@
String name,
boolean sync,
boolean activateRoot)
- throws Exception
+ throws Exception
{
this.cache = createCache(name, sync, true, false);
this.semaphore = semaphore;
[View Less]
17 years, 6 months
JBoss Cache SVN: r4520 - core/trunk/src/main/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: vblagojevic(a)jboss.com
Date: 2007-10-01 05:24:57 -0400 (Mon, 01 Oct 2007)
New Revision: 4520
Modified:
core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
Log:
[JBCACHE-1189] - Implement JGroups connect + state transfer
Modified: core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/CacheImpl.java 2007-09-28 17:59:43 UTC (rev 4519)
+++ core/trunk/src/main/java/org/…
[View More]jboss/cache/CacheImpl.java 2007-10-01 09:24:57 UTC (rev 4520)
@@ -58,6 +58,7 @@
import org.jgroups.ExtendedMessageListener;
import org.jgroups.JChannel;
import org.jgroups.Message;
+import org.jgroups.StateTransferException;
import org.jgroups.View;
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.RpcDispatcher;
@@ -132,7 +133,7 @@
/**
* True if this CacheImpl is the coordinator.
*/
- private boolean coordinator = false;
+ private volatile boolean coordinator = false;
/**
* List of cluster group members.
@@ -748,34 +749,56 @@
if (log.isDebugEnabled()) log.debug("cache mode is " + configuration.getCacheMode());
initialiseChannelAndRpcDispatcher();
- try
- {
- channel.connect(configuration.getClusterName());
- }
- catch (ChannelException e)
- {
- throw new CacheException("Unable to connect to JGroups channel", e);
- }
-
- if (log.isInfoEnabled())
- {
- log.info("CacheImpl local address is " + channel.getLocalAddress());
- }
+ //connect and transfer state
if (shouldFetchStateOnStartup())
{
try
- {
- fetchStateOnStartup();
+ {
+ long start = System.currentTimeMillis();
+ channel.connect(configuration.getClusterName(),null, null, configuration.getStateRetrievalTimeout());
+ if(!isCoordinator())
+ {
+ ml.waitForState();
+ }
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("connected, state was retrieved successfully (in " + (System.currentTimeMillis() - start)
+ + " milliseconds)");
+ }
}
- catch (Exception e)
+ catch (StateTransferException ste)
{
// make sure we disconnect from the channel before we throw this exception!
// JBCACHE-761
channel.disconnect();
channel.close();
- throw new CacheException("Unable to fetch state on startup", e);
+ throw new CacheException("Unable to fetch state on startup", ste);
}
+ catch (ChannelException e)
+ {
+ throw new CacheException("Unable to connect to JGroups channel", e);
+ }
+ catch (Exception ex){
+ throw new CacheException("Unable to fetch state on startup", ex);
+ }
}
+ //otherwise just connect
+ else
+ {
+ try
+ {
+ channel.connect(configuration.getClusterName());
+ }
+ catch (ChannelException e)
+ {
+ throw new CacheException("Unable to connect to JGroups channel", e);
+ }
+ }
+ if (log.isInfoEnabled())
+ {
+ log.info("CacheImpl local address is " + channel.getLocalAddress());
+ }
if (buddyManager != null)
{
buddyManager.init(this);
@@ -795,11 +818,8 @@
if (cacheLoaderManager != null)
{
cacheLoaderManager.preloadCache();
- }
+ }
- // Find out if we are coordinator (blocks until view is received)
- determineCoordinator();
-
// start any eviction threads.
if (regionManager.isUsingEvictions())
{
@@ -1072,16 +1092,6 @@
}
}
- private void determineCoordinator()
- {
- // Synchronize on members to make the answer atomic for the current view
- synchronized (members)
- {
- Address coord = getCoordinator();
- coordinator = (coord == null ? false : coord.equals(getLocalAddress()));
- }
- }
-
/**
* Returns the address of the coordinator or null if there is no
* coordinator.
@@ -1265,41 +1275,6 @@
return result;
}
- protected void fetchStateOnStartup() throws Exception
- {
- long start, stop;
- isStateSet = false;
- start = System.currentTimeMillis();
- boolean rc = channel.getState(null, configuration.getStateRetrievalTimeout());
- if (rc)
- {
- ml.waitForState();
- stop = System.currentTimeMillis();
- if (log.isDebugEnabled())
- {
- log.debug("state was retrieved successfully (in " + (stop - start) + " milliseconds)");
- }
- }
- else
- {
- // No one provided us with state. We need to find out if that's because
- // we are the coordinator. But we don't know if the viewAccepted() callback
- // has been invoked, so call determineCoordinator(), which will block until
- // viewAccepted() is called at least once
- determineCoordinator();
-
- if (isCoordinator())
- {
- log.debug("State could not be retrieved (we are the first member in group)");
- }
- else
- {
- throw new CacheException("Initial state transfer failed: " +
- "Channel.getState() returned false");
- }
- }
- }
-
// ----------- End Marshalling and State Transfer -----------------------
/**
[View Less]
17 years, 6 months