JBoss Cache SVN: r5195 - in core: tags and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 14:01:11 -0500 (Tue, 22 Jan 2008)
New Revision: 5195
Added:
core/cp_tags/1.4.1.SP8_CP01/
Removed:
core/tags/1.4.1.SP9/
Log:
Copied: core/cp_tags/1.4.1.SP8_CP01 (from rev 5194, core/tags/1.4.1.SP9)
17 years, 1 month
JBoss Cache SVN: r5194 - core.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 14:00:19 -0500 (Tue, 22 Jan 2008)
New Revision: 5194
Added:
core/cp_tags/
Log:
17 years, 1 month
JBoss Cache SVN: r5193 - core/trunk/src/main/resources/META-INF.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-22 13:05:43 -0500 (Tue, 22 Jan 2008)
New Revision: 5193
Added:
core/trunk/src/main/resources/META-INF/cacheserver-service-jmx.xml
core/trunk/src/main/resources/META-INF/cacheserver-service-tcp.xml
Removed:
core/trunk/src/main/resources/META-INF/tcp-cacheserver-service.xml
Log:
http://jira.jboss.com/jira/browse/JBCACHE-1269
Added: core/trunk/src/main/resources/META-INF/cacheserver-service-jmx.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/cacheserver-service-jmx.xml (rev 0)
+++ core/trunk/src/main/resources/META-INF/cacheserver-service-jmx.xml 2008-01-22 18:05:43 UTC (rev 5193)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar"/>
+
+ <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.BatchModeTransactionManagerLookup
+ </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 TreeCache nodes in a
+ cluster in order to find each other.
+ -->
+ <attribute name="ClusterName">JBossCache-Cluster</attribute>
+
+ <!-- JGroups protocol stack properties NOT NEEDED since CacheMode is LOCAL -->
+
+ <!--
+ 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>
Copied: core/trunk/src/main/resources/META-INF/cacheserver-service-tcp.xml (from rev 5189, core/trunk/src/main/resources/META-INF/tcp-cacheserver-service.xml)
===================================================================
--- core/trunk/src/main/resources/META-INF/cacheserver-service-tcp.xml (rev 0)
+++ core/trunk/src/main/resources/META-INF/cacheserver-service-tcp.xml 2008-01-22 18:05:43 UTC (rev 5193)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <classpath codebase="./lib" archives="jboss-cache.jar"/>
+
+ <mbean code="org.jboss.cache.loader.tcp.TcpCacheServer" name="jboss.cache:service=TcpCacheServer">
+ <depends optional-attribute-name="CacheJmxWrapper"
+ proxy-type="attribute">jboss.cache:service=TreeCache</depends>
+ <attribute name="BindAddress">${jboss.bind.address:localhost}</attribute>
+ <attribute name="Port">7500</attribute>
+ </mbean>
+
+</server>
Property changes on: core/trunk/src/main/resources/META-INF/cacheserver-service-tcp.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: core/trunk/src/main/resources/META-INF/tcp-cacheserver-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/tcp-cacheserver-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
+++ core/trunk/src/main/resources/META-INF/tcp-cacheserver-service.xml 2008-01-22 18:05:43 UTC (rev 5193)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
- <classpath codebase="./lib" archives="jboss-cache.jar"/>
-
- <mbean code="org.jboss.cache.loader.tcp.TcpCacheServer" name="jboss.cache:service=TcpCacheServer">
- <depends optional-attribute-name="CacheJmxWrapper"
- proxy-type="attribute">jboss.cache:service=TreeCache</depends>
- <attribute name="BindAddress">${jboss.bind.address:localhost}</attribute>
- <attribute name="Port">7500</attribute>
- </mbean>
-
- <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.BatchModeTransactionManagerLookup</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 TreeCache nodes in a
- cluster in order to find each other.
- -->
- <attribute name="ClusterName">JBossCache-Cluster</attribute>
-
- <!-- JGroups protocol stack properties NOT NEEDED since CacheMode is LOCAL -->
-
- <!--
- 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>
17 years, 1 month
JBoss Cache SVN: r5192 - core/trunk/src/main/resources/META-INF.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-22 12:56:08 -0500 (Tue, 22 Jan 2008)
New Revision: 5192
Modified:
core/trunk/src/main/resources/META-INF/buddyreplication-service.xml
core/trunk/src/main/resources/META-INF/clonable-config-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/main/resources/META-INF/local-elementsize-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-eviction-cacheloader-service.xml
core/trunk/src/main/resources/META-INF/local-expiration-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-fifo-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-lfu-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-lru-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-mru-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-null-eviction-service.xml
core/trunk/src/main/resources/META-INF/local-passivation-service.xml
core/trunk/src/main/resources/META-INF/local-service.xml
core/trunk/src/main/resources/META-INF/local-tx-service.xml
core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml
core/trunk/src/main/resources/META-INF/mux-service.xml
core/trunk/src/main/resources/META-INF/optimistic-eviction.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
Log:
http://jira.jboss.com/jira/browse/JBCACHE-1269
Modified: core/trunk/src/main/resources/META-INF/buddyreplication-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/buddyreplication-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/buddyreplication-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -65,20 +65,14 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ enable_bundling="true"
+ enable_unicast_bundling="true"
enable_diagnostics="true"
use_concurrent_stack="true"
@@ -87,34 +81,37 @@
thread_pool.enabled="true"
thread_pool.min_threads="1"
- thread_pool.max_threads="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="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/> -->
@@ -123,6 +120,7 @@
</attribute>
+
<!--
The max amount of time (in milliseconds) we wait until the
state (ie. the contents of the cache) are retrieved from
Modified: core/trunk/src/main/resources/META-INF/clonable-config-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/clonable-config-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/clonable-config-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -26,59 +26,48 @@
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
+ <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"/>
- <pbcast.GMS print_local_addr="true" join_timeout="5000" shun="false"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="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>
Modified: core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/hibernate-recommended-config.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -87,33 +87,64 @@
<!-- JGroups protocol stack properties.
ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
-->
+
<attribute name="ClusterConfig">
<config>
- <!-- UDP: if you have a multihomed machine,
- set the bind_addr attribute to the appropriate NIC IP address -->
- <!-- UDP: On Windows machines, because of the media sense feature
- being broken with multicast (even after disabling media sense)
- set the loopback attribute to true -->
- <UDP mcast_addr="228.1.2.3" mcast_port="48866"
- ip_ttl="64" ip_mcast="true"
- mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
- ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
- loopback="false"/>
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 min_interval="10000" max_interval="20000"/>
- <!-- <FD shun="true"/>-->
+ <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"
+ 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 gc_lag="50" retransmit_timeout="600,1200,2400,4800"/>
- <UNICAST timeout="600,1200,2400"/>
- <pbcast.STABLE desired_avg_gossip="20000"/>
- <FRAG frag_size="8192"/>
- <pbcast.GMS join_timeout="5000"
- shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ join_retry_timeout="2000" shun="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>
+
<!--
Whether or not to fetch state on joining a cluster
NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.
Modified: core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/jdbcCacheLoader-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -76,31 +76,62 @@
<attribute name="ClusterConfig">
<config>
- <!-- UDP: if you have a multihomed machine,
- set the bind_addr attribute to the appropriate NIC IP address -->
- <!-- UDP: On Windows machines, because of the media sense feature
- being broken with multicast (even after disabling media sense)
- set the loopback attribute to true -->
- <UDP mcast_addr="230.8.8.8" mcast_port="56677"
- ip_ttl="32" ip_mcast="true"
- 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"/>
- <MERGE2 min_interval="10000" max_interval="20000"/>
- <FD shun="true"/>
+ <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"
+ 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 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"
- shun="true" print_local_addr="true"/>
- <pbcast.STATE_TRANSFER/>
+ <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="true"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ join_retry_timeout="2000" shun="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>
+
<!--
The max amount of time (in milliseconds) we wait until the
state (ie. the contents of the cache) are retrieved from
Modified: core/trunk/src/main/resources/META-INF/local-elementsize-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-elementsize-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-elementsize-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,35 +41,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-eviction-cacheloader-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-eviction-cacheloader-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-eviction-cacheloader-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,26 +41,6 @@
-->
<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 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>
Modified: core/trunk/src/main/resources/META-INF/local-expiration-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-expiration-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-expiration-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,35 +41,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-fifo-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-fifo-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-fifo-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,39 +41,9 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-lfu-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-lfu-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-lfu-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,37 +41,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-lru-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-lru-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-lru-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -43,36 +43,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-mru-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-mru-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-mru-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -24,7 +24,6 @@
<attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
</attribute>
-
<!--
Node locking level : SERIALIZABLE
REPEATABLE_READ (default)
@@ -41,40 +40,9 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-null-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-null-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-null-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -43,36 +43,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-passivation-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-passivation-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-passivation-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,41 +41,9 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -42,36 +42,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/local-tx-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/local-tx-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/local-tx-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -42,32 +42,6 @@
-->
<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>
Modified: core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/mixedPolicy-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -41,101 +41,7 @@
-->
<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.
- ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
- -->
- <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"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
- </config>
- </attribute>
-
-
- <!--
- 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>
Modified: core/trunk/src/main/resources/META-INF/mux-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/mux-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/mux-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -48,19 +48,7 @@
-->
<attribute name="CacheMode">LOCAL</attribute>
- <!-- Name of cluster. Needs to be the same for all nodes in a clusters, in order
- to find each other.
- -->
- <attribute name="ClusterName">JBossCache-Cluster</attribute>
-
<!--
- 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.
-->
Modified: core/trunk/src/main/resources/META-INF/optimistic-eviction.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/optimistic-eviction.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/optimistic-eviction.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -54,11 +54,6 @@
-->
<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">Infa-Cache-Cluster</attribute>
-
<!-- Max number of milliseconds to wait for a lock acquisition -->
<attribute name="LockAcquisitionTimeout">10000</attribute>
Modified: core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/pojocache-passivation-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -58,22 +58,16 @@
<!-- JGroups protocol stack properties.
ClusterConfig isn't used if the multiplexer is enabled and successfully initialized.
-->
- <attribute name="ClusterConfig">
+<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ enable_bundling="true"
+ enable_unicast_bundling="true"
enable_diagnostics="true"
use_concurrent_stack="true"
@@ -82,21 +76,22 @@
thread_pool.enabled="true"
thread_pool.min_threads="1"
- thread_pool.max_threads="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -104,12 +99,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<!-- <pbcast.STATE_TRANSFER/> -->
@@ -117,7 +114,6 @@
</config>
</attribute>
-
<!--
The max amount of time (in milliseconds) we wait until the
state (ie. the contents of the cache) are retrieved from
Modified: core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/pojocache-passivation-service2.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -60,20 +60,14 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ enable_bundling="true"
+ enable_unicast_bundling="true"
enable_diagnostics="true"
use_concurrent_stack="true"
@@ -82,21 +76,22 @@
thread_pool.enabled="true"
thread_pool.min_threads="1"
- thread_pool.max_threads="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -104,12 +99,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<!-- <pbcast.STATE_TRANSFER/> -->
@@ -117,7 +114,6 @@
</config>
</attribute>
-
<!--
The max amount of time (in milliseconds) we wait until the
state (ie. the contents of the cache) are retrieved from
Modified: core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/policyPerRegion-eviction-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -60,43 +60,33 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -104,12 +94,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<!-- <pbcast.STATE_TRANSFER/> -->
Modified: core/trunk/src/main/resources/META-INF/replAsync-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replAsync-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/replAsync-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -76,43 +76,33 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -120,12 +110,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="false"
view_bundling="true" view_ack_collection_timeout="5000"/>
- <FC max_credits="20000000" min_threshold="0.10"/>
+ <FC max_credits="5000000"
+ min_threshold="0.20"/>
<FRAG2 frag_size="60000"/>
<pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
<!-- <pbcast.STATE_TRANSFER/> -->
Modified: core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/replSync-passivation-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -60,43 +60,33 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -104,11 +94,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="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/> -->
Modified: core/trunk/src/main/resources/META-INF/replSync-service-test.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-service-test.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/replSync-service-test.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -76,43 +76,33 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -120,11 +110,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="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/> -->
Modified: core/trunk/src/main/resources/META-INF/replSync-service.xml
===================================================================
--- core/trunk/src/main/resources/META-INF/replSync-service.xml 2008-01-22 14:56:16 UTC (rev 5191)
+++ core/trunk/src/main/resources/META-INF/replSync-service.xml 2008-01-22 17:56:08 UTC (rev 5192)
@@ -76,43 +76,33 @@
-->
<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"
+ <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"
- ip_ttl="2"
- enable_bundling="false"
+ 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="25"
+ thread_pool.max_threads="4"
thread_pool.keep_alive_time="30000"
thread_pool.queue_enabled="true"
- thread_pool.queue_max_size="10"
- thread_pool.rejection_policy="Run"
-
+ thread_pool.queue_max_size="50000"
+ thread_pool.rejection_policy="discard"
oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
+ oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="4"
oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="true"
+ 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"/>
+ <!--<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"/>
@@ -120,11 +110,14 @@
<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"/>
+ <!--<UNICAST timeout="30,60,120,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"
+ <pbcast.GMS print_local_addr="true" join_timeout="5000"
+ join_retry_timeout="2000" shun="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/> -->
17 years, 1 month
JBoss Cache SVN: r5191 - in core/trunk/src: test/java/org/jboss/cache/factories and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 09:56:16 -0500 (Tue, 22 Jan 2008)
New Revision: 5191
Modified:
core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryFunctionalTest.java
core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryUnitTest.java
Log:
Simplified component registry
Modified: core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-01-22 14:42:59 UTC (rev 5190)
+++ core/trunk/src/main/java/org/jboss/cache/factories/ComponentRegistry.java 2008-01-22 14:56:16 UTC (rev 5191)
@@ -172,7 +172,7 @@
// make sure any other omponents that have inadvertently been stopped are now restarted.
if (old != null)
{
- for (Component comp : componentLookup.values())
+ for (Component comp : old.dependencyFor)
{
if (comp.state != stateToMoveTo) comp.changeState(stateToMoveTo);
}
@@ -182,11 +182,11 @@
protected void addComponentDependencies(Component c, boolean firstTimeAdded)
{
// build any dependent components if necessary
- for (Dependency d : c.dependencies)
+ for (Component d : c.dependencies)
{
getOrCreateComponent(d.name, d.type);
Component dependencyComponent = componentLookup.get(d.name);
- if (dependencyComponent != null) dependencyComponent.dependencyFor.add(c.asDependency());
+ if (dependencyComponent != null) dependencyComponent.dependencyFor.add(c);
}
if (firstTimeAdded)
@@ -194,7 +194,7 @@
// loop through all other components already registered and make sure the current component's dependencyFor map is accurate
for (Component other : componentLookup.values())
{
- if (other.dependencies.contains(c.asDependency())) c.dependencyFor.add(other.asDependency());
+ if (other.dependencies.contains(c)) c.dependencyFor.add(other);
}
}
@@ -277,7 +277,7 @@
component = getFromConfiguration(componentClass);
boolean attemptedFactoryConstruction = false;
- if (component == null && isNonBootstrap(componentClass))
+ if (component == null && isNonBootstrapClass(componentClass))
{
// create this component and add it to the registry
ComponentFactory factory = getFactory(componentClass);
@@ -307,7 +307,7 @@
registerComponent(componentName, NULL_COMPONENT, type);
}
- private boolean isNonBootstrap(Class<?> componentClass)
+ private boolean isNonBootstrapClass(Class<?> componentClass)
{
return !(componentClass.equals(CacheSPI.class) || componentClass.equals(CacheImpl.class) || componentClass.equals(Cache.class)
|| componentClass.equals(ComponentRegistry.class) || componentClass.equals(Configuration.class));
@@ -451,7 +451,7 @@
private <T> void performInjection(Method method, T target) throws IllegalAccessException, InvocationTargetException
{
Class[] parameterTypes = method.getParameterTypes();
- List<Dependency> componentsToInject = getDeclaredDependencies(method);
+ List<Component> componentsToInject = getDeclaredDependencies(method);
Object[] parameters = new Object[parameterTypes.length];
@@ -481,15 +481,17 @@
return null;
}
- private List<Dependency> getDeclaredDependencies(Method method)
+ private List<Component> getDeclaredDependencies(Method method)
{
- List<Dependency> dependencies = new LinkedList<Dependency>();
+ List<Component> dependencies = new LinkedList<Component>();
Class[] parameterTypes = method.getParameterTypes();
Annotation[][] annotationsOnParams = method.getParameterAnnotations();
for (int i = 0; i < parameterTypes.length; i++)
{
String componentName = extractComponentName(annotationsOnParams[i]);
- Dependency d = new Dependency(componentName == null ? parameterTypes[i].getName() : componentName, parameterTypes[i]);
+ String componentNameToUse = componentName == null ? parameterTypes[i].getName() : componentName;
+ // if the component exists in the lookup, use it. Otherwise use a placeholder which will be constructed later, on demand.
+ Component d = componentLookup.containsKey(componentNameToUse) ? componentLookup.get(componentNameToUse) : new Component(componentNameToUse, parameterTypes[i]);
dependencies.add(d);
}
return dependencies;
@@ -615,11 +617,6 @@
*/
public void wire()
{
- if (bootstrap != null && !bootstrap.isBootstrapped())
- {
- bootstrap.bootstrap();
- }
-
moveComponentsToState(WIRED);
}
@@ -678,36 +675,6 @@
}
/**
- * Represents a potentially unconstructed dependency. A simple wrapper around a name and type pair.
- */
- class Dependency
- {
- String name;
- Class<?> type;
-
- public Dependency(String name, Class type)
- {
- this.name = name;
- this.type = type;
- }
-
- public int hashCode()
- {
- return 31 * name.hashCode();
- }
-
- public boolean equals(Object other)
- {
- return other instanceof Dependency && name.equals(((Dependency) other).name);
- }
-
- public String toString()
- {
- return "Dependency (name = " + name + ")";
- }
- }
-
- /**
* Represents a component in the registry, along with state and dependencies.
*/
class Component
@@ -716,11 +683,16 @@
String name;
Class type;
State state = CONSTRUCTED;
- Set<Dependency> dependencies = new HashSet<Dependency>(3);
- Set<Dependency> dependencyFor = new HashSet<Dependency>(3);
- Dependency me;
+ Set<Component> dependencies = new HashSet<Component>(3);
+ Set<Component> dependencyFor = new HashSet<Component>(3);
boolean deepRecursionDetector = false;
+ public Component(String name, Class type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
/**
* Constructs a Component out of an instance and a name. Scans instance for dependencies and populates
* the "dependencies" and "dependencyFor" collections.
@@ -730,9 +702,8 @@
*/
public Component(String name, Object instance, Class type)
{
+ this(name, type);
this.instance = instance;
- this.name = name;
- this.type = type;
// now scan the instance for all dependencies.
List<Method> injectionMethods = ReflectionUtil.getAllMethods(instance.getClass(), Inject.class);
@@ -742,15 +713,6 @@
}
/**
- * @return a {@link org.jboss.cache.factories.ComponentRegistry.Dependency} object that represents the current component
- */
- Dependency asDependency()
- {
- if (me == null) me = new Dependency(name, type);
- return me;
- }
-
- /**
* Changes the state of a component - along with all dependent components - to a new state. This method is recursion
* and cyclic dependency safe.
*
@@ -773,7 +735,7 @@
}
// now we update the state of dependent components accordingly.
- Set<Dependency> dependentComponents = new HashSet<Dependency>();
+ Set<Component> dependentComponents = new HashSet<Component>();
Set<Component> shallowCyclic = new HashSet<Component>();
if (increase)
@@ -789,36 +751,39 @@
// switch on the deep recursion detector
deepRecursionDetector = true;
- for (Dependency d : dependentComponents)
+ for (Component d : dependentComponents)
{
- Component c = componentLookup.get(d.name);
-// if (c == null && increase)
-// {
-// if (log.isTraceEnabled()) log.trace(name + " depends on " + d.name + " (type "+d.type+") but it does not exist in the registry, attempting to create.");
-// getOrCreateComponent(d.name, d.type);
-// c = componentLookup.get(d.name);
-// }
- if (c != null)
+ if (d.instance == null)
{
- if (isShallowCyclic(c))
+ // this is a "hollow" component that has not been constructed yet. Another "constructed" version probably exists in the
+ // componentLookup. Make sure we replace this.
+ Component c = componentLookup.get(d.name);
+ if (increase)
{
- // don't process shallow cyclic deps here - shoud do that after we set our state.
- shallowCyclic.add(c);
+ dependencies.remove(d);
+ dependencies.add(c);
}
else
{
- // of we are "moving up" - only do this if the component is lower than what is needed.
- if ((increase && newState.isGreaterThan(c.state)) || (!increase && newState.isLessThan(c.state)))
- {
- c.changeState(newState);
- }
-
+ dependencyFor.remove(d);
+ dependencies.add(c);
}
+ d = c;
}
+
+ if (isShallowCyclic(d))
+ {
+ // don't process shallow cyclic deps here - shoud do that after we set our state.
+ shallowCyclic.add(d);
+ }
else
{
- if (log.isTraceEnabled())
- log.trace(name + " depends on " + d.name + " (type " + d.type + ") but it does not exist in the registry");
+ // of we are "moving up" - only do this if the component is lower than what is needed.
+ if ((increase && newState.isGreaterThan(d.state)) || (!increase && newState.isLessThan(d.state)))
+ {
+ d.changeState(newState);
+ }
+
}
}
@@ -861,7 +826,7 @@
*/
private boolean isShallowCyclic(Component c)
{
- return (dependencies.contains(c.asDependency()) && c.dependencies.contains(asDependency()));
+ return (dependencies.contains(c) && c.dependencies.contains(this));
}
/**
@@ -915,10 +880,24 @@
}
}
+ @Override
public String toString()
{
return "Component (name = " + name + ", state = " + state + ")";
}
+
+ @Override
+ public int hashCode()
+ {
+ return 31 * name.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other)
+ {
+ return other instanceof Component && name.equals(((Component) other).name);
+ }
+
}
class Bootstrap
Modified: core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryFunctionalTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryFunctionalTest.java 2008-01-22 14:42:59 UTC (rev 5190)
+++ core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryFunctionalTest.java 2008-01-22 14:56:16 UTC (rev 5191)
@@ -59,18 +59,18 @@
for (ComponentRegistry.Component component : cr.componentLookup.values())
{
// test that this component appears in all dependencies' dependencyFor collection.
- for (ComponentRegistry.Dependency dep : component.dependencies)
+ for (ComponentRegistry.Component dep : component.dependencies)
{
- assert cr.componentLookup.get(dep.name).dependencyFor.contains(component.asDependency()) : "Dependency " + dep.name + " does not have component " + component.name + " in it's dependencyFor collection.";
+ assert cr.componentLookup.get(dep.name).dependencyFor.contains(component) : "Dependency " + dep.name + " does not have component " + component.name + " in it's dependencyFor collection.";
}
}
for (ComponentRegistry.Component component : cr.componentLookup.values())
{
// test that this component appears in all dependencies' dependencyFor collection.
- for (ComponentRegistry.Dependency dep : component.dependencyFor)
+ for (ComponentRegistry.Component dep : component.dependencyFor)
{
- assert cr.componentLookup.get(dep.name).dependencies.contains(component.asDependency()) : "Dependency " + dep.name + " does not have component " + component.name + " in it's dependencies collection.";
+ assert cr.componentLookup.get(dep.name).dependencies.contains(component) : "Dependency " + dep.name + " does not have component " + component.name + " in it's dependencies collection.";
}
}
}
Modified: core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryUnitTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryUnitTest.java 2008-01-22 14:42:59 UTC (rev 5190)
+++ core/trunk/src/test/java/org/jboss/cache/factories/ComponentRegistryUnitTest.java 2008-01-22 14:56:16 UTC (rev 5191)
@@ -34,9 +34,9 @@
ComponentRegistry.Component c3 = cr.componentLookup.get("c3");
// add some dependencies
- ComponentRegistry.Dependency d1 = cr.new Dependency("c1", null);
- ComponentRegistry.Dependency d2 = cr.new Dependency("c2", null);
- ComponentRegistry.Dependency d3 = cr.new Dependency("c3", null);
+ ComponentRegistry.Component d1 = cr.new Component("c1", null);
+ ComponentRegistry.Component d2 = cr.new Component("c2", null);
+ ComponentRegistry.Component d3 = cr.new Component("c3", null);
// c1 depends on c2
// c3 depends on c1
17 years, 1 month
JBoss Cache SVN: r5190 - in core/trunk/src: main/java/org/jboss/cache/transaction and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-01-22 09:42:59 -0500 (Tue, 22 Jan 2008)
New Revision: 5190
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java
Log:
http://jira.jboss.com/jira/browse/JBCACHE-1165
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-22 13:30:36 UTC (rev 5189)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-22 14:42:59 UTC (rev 5190)
@@ -118,7 +118,7 @@
}
else
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, false, true, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, false, true, null);
}
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, false);
+ acquireLocksWithTimeout(ctx, fqn, lockType, false, false, false, false, null);
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, false);
+ lock(ctx, from, NodeLock.LockType.WRITE, false, timeout, true, false, null);
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, false);
+ lock(ctx, to, NodeLock.LockType.READ, false, timeout, false, false, null);
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, true);
+ boolean created = acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, true, false, true, false, createdNodes);
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, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, true, true, false, true, null);
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, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, false, false, false, null);
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, false);
+ acquireLocksWithTimeout(ctx, parentFqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handleEvictMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, true, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.WRITE, false, true, false, false, null);
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, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handleGetNodeMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handleGetKeysMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handleGetChildrenNamesMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handlePrintMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
return nextInterceptor(ctx);
}
protected Object handleReleaseAllLocksMethod(InvocationContext ctx, Fqn fqn) throws Throwable
{
- acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null, false);
+ acquireLocksWithTimeout(ctx, fqn, NodeLock.LockType.READ, false, false, false, false, null);
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 markNewNodesAsDeleted)
+ boolean acquireLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes)
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, markNewNodesAsDeleted);
+ created = lock(ctx, fqn, lockType, createIfNotExists, timeout, acquireLockOnParent, reverseRemoveCheck, createdNodes);
firstTry = false;
}
while (createIfNotExists && peekNode(ctx, fqn, false, true, false) == null);// keep trying until we have the lock (fixes concurrent remove())
@@ -362,10 +362,9 @@
* 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 markNewNodesAsDeleted)
+ boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<Fqn> createdNodes)
throws TimeoutException, LockingException, InterruptedException
{
Thread currentThread = Thread.currentThread();
@@ -391,11 +390,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), true);
created = true;
- if (trace) log.trace("Child node was null, so created child node " + childName);
+ if (trace) log.trace("Child node was null, so created child node " + childName + System.identityHashCode(currentNode));
if (createdNodes != null) createdNodes.add(currentNode.getFqn());
- if (markNewNodesAsDeleted) currentNode.markAsDeleted(true);
}
else
{
@@ -414,11 +412,10 @@
lockTypeRequired = NodeLock.LockType.WRITE;
}
- manageReverseRemove(gtx, currentNode, reverseRemoveCheck);
-
// actually acquire the lock we need. This method blocks.
acquireNodeLock(currentNode, owner, gtx, lockTypeRequired, timeout);
+ manageReverseRemove(gtx, currentNode, reverseRemoveCheck);
// make sure the lock we acquired isn't on a deleted node/is an orphan!!
// look into invalidated nodes as well
NodeSPI repeek = peekNode(ctx, currentNode.getFqn(), true, true, true);
@@ -433,14 +430,14 @@
if (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.");
+ if (trace) log.trace("Parent has been deleted again. Go through the lock method all over again.");
currentNode = rootNode;
parent = null;
}
else
{
- // do the loop again, but don't assign child_node to currentNode so that child_node is processed again.
+ currentNode = parent;
+ parent = null;
if (System.currentTimeMillis() > expiryTime)
{
throw new TimeoutException("Unable to acquire lock on child node " + new Fqn(currentNode.getFqn(), childName) + " after " + timeout + " millis.");
@@ -565,7 +562,7 @@
*/
private void manageReverseRemove(GlobalTransaction gtx, NodeSPI childNode, boolean reverseRemoveCheck)
{
- boolean needToReverseRemove = reverseRemoveCheck && childNode.isDeleted() && tx_table.get(gtx).getRemovedNodes().contains(childNode.getFqn());
+ boolean needToReverseRemove = reverseRemoveCheck && childNode.isDeleted() && tx_table.isNodeRemovedInTx(gtx,childNode.getFqn());
if (gtx != null && needToReverseRemove)
{
childNode.markAsDeleted(false);
Modified: core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-01-22 13:30:36 UTC (rev 5189)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/TransactionTable.java 2008-01-22 14:42:59 UTC (rev 5190)
@@ -9,6 +9,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
+import org.jboss.cache.Fqn;
import org.jboss.cache.lock.NodeLock;
import org.jboss.cache.marshall.MethodCall;
@@ -286,4 +287,10 @@
throw e;
}
}
+
+ public boolean isNodeRemovedInTx(GlobalTransaction gtx, Fqn fqn)
+ {
+ TransactionEntry te = get(gtx);
+ return te != null && te.getRemovedNodes().contains(fqn);
+ }
}
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-22 13:30:36 UTC (rev 5189)
+++ core/trunk/src/test/java/org/jboss/cache/lock/pessimistic/ConcurrentPutRemoveTest.java 2008-01-22 14:42:59 UTC (rev 5190)
@@ -16,6 +16,7 @@
import javax.transaction.TransactionManager;
import java.util.ArrayList;
import java.util.List;
+import java.net.URL;
// This is disabled because the fix is not absolute and will require pretty bug architectural changes.
// There is an edge case where a NodeNotFoundException may occur, and this is due to parent nodes not being
@@ -24,7 +25,7 @@
// The problem is in the way READ_COMMITTED is implemented, i.e., writers are not blocked by readers and this
// allows a reader to hold a lock when a writer comes in and deletes the node in question.
-@Test(groups = {"functional"}, enabled = false)
+@Test(groups = {"functional"}, enabled = true)
// Known issue - See JBCACHE-1164 and JBCACHE-1165
public class ConcurrentPutRemoveTest
{
@@ -60,7 +61,7 @@
}
}
- @Test(invocationCount = 50, enabled = false)
+ @Test(invocationCount = 10, enabled = true)
public void testLock() throws Exception
{
for (int x = 0; x < 2; x++)
17 years, 1 month
JBoss Cache SVN: r5189 - in core/trunk/src: main/java/org/jboss/cache/loader and 8 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 08:30:36 -0500 (Tue, 22 Jan 2008)
New Revision: 5189
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValue.java
core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValueMap.java
core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java
core/trunk/src/test/java/org/jboss/cache/factories/CustomInterceptorChainTest.java
core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplMarshalledValuesTest.java
core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationExceptionTest.java
core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
Log:
JBCACHE-1231 - Implicit MarshalledValues
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -3,9 +3,11 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.marshall.MarshalledValue;
import org.jboss.cache.marshall.MarshalledValueHelper;
+import org.jboss.cache.marshall.MarshalledValueMap;
import org.jboss.cache.marshall.MethodCall;
import org.jboss.cache.marshall.MethodDeclarations;
+import java.io.NotSerializableException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -74,8 +76,14 @@
if (retVal instanceof MarshalledValue)
{
if (trace) log.trace("Return value is a MarshalledValue. Unwrapping.");
- return ((MarshalledValue) retVal).get();
+ retVal = ((MarshalledValue) retVal).get();
}
+ else if (retVal instanceof Map && call.getMethodId() == MethodDeclarations.getDataMapMethodLocal_id)
+ {
+ if (trace) log.trace("Return value is a Map and we're retrieving data. Wrapping as a MarshalledValueMap.");
+ Map retValMap = (Map) retVal;
+ if (!retValMap.isEmpty()) retVal = new MarshalledValueMap(retValMap);
+ }
}
return retVal;
@@ -99,7 +107,7 @@
}
@SuppressWarnings("unchecked")
- protected Map wrapMap(Map m, Set<MarshalledValue> marshalledValues, InvocationContext ctx)
+ protected Map wrapMap(Map m, Set<MarshalledValue> marshalledValues, InvocationContext ctx) throws NotSerializableException
{
Map copy = new HashMap();
for (Object key : m.keySet())
@@ -111,7 +119,7 @@
return copy;
}
- protected MarshalledValue createAndAddMarshalledValue(Object toWrap, Set<MarshalledValue> marshalledValues, InvocationContext ctx)
+ protected MarshalledValue createAndAddMarshalledValue(Object toWrap, Set<MarshalledValue> marshalledValues, InvocationContext ctx) throws NotSerializableException
{
MarshalledValue mv = new MarshalledValue(toWrap);
marshalledValues.add(mv);
Modified: core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/loader/TcpDelegatingCacheLoader.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -22,7 +22,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Socket;
-import java.net.SocketException;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -115,11 +114,12 @@
}
catch (InvocationTargetException e)
{
- if (e.getCause() instanceof SocketException)
+ if (e.getCause() instanceof IOException)
{
try
{
// sleep 250 ms
+ if (log.isDebugEnabled()) log.debug("Caught IOException. Retrying.", e);
Thread.sleep(config.getReconnectWaitTime());
restart();
}
@@ -132,6 +132,10 @@
// do nothing
}
}
+ else
+ {
+ throw new CacheException("Problems invoking method call!", e);
+ }
}
} while (System.currentTimeMillis() < endTime);
throw new CacheException("Unable to communicate with TCPCacheServer(" + config.getHost() + ":" + config.getPort() + ") after " + config.getTimeout() + " millis, with reconnects every " + config.getReconnectWaitTime() + " millis.");
Modified: core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -334,7 +334,7 @@
output.writeObject(null);
break;
}
- Map map = n.getDataDirect();
+ Map map = n.getData();
if (map == null) map = new HashMap();
output.writeObject(map);
break;
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValue.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValue.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValue.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -25,14 +25,14 @@
// by default equals() will test on the istance rather than the byte array if conversion is required.
private transient boolean equalityPreferenceForInstance = true;
- public MarshalledValue(Object instance)
+ public MarshalledValue(Object instance) throws NotSerializableException
{
if (instance == null) throw new NullPointerException("Null values cannot be wrapped as MarshalledValues!");
if (instance instanceof Serializable)
this.instance = instance;
else
- throw new CacheException(new NotSerializableException("Marshalled values can only wrap Objects that are serializable! Instance of " + instance.getClass() + " won't Serialize."));
+ throw new NotSerializableException("Marshalled values can only wrap Objects that are serializable! Instance of " + instance.getClass() + " won't Serialize.");
}
public MarshalledValue()
@@ -63,8 +63,7 @@
}
catch (Exception e)
{
- throw new
- CacheException("Unable to marshall value " + instance);
+ throw new CacheException("Unable to marshall value " + instance, e);
}
}
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValueMap.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValueMap.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/MarshalledValueMap.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -3,13 +3,13 @@
import net.jcip.annotations.Immutable;
import org.jboss.cache.CacheException;
+import java.io.Externalizable;
import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -25,23 +25,26 @@
* @since 2.1.0
*/
@Immutable
-public class MarshalledValueMap implements Map
+public class MarshalledValueMap implements Map, Externalizable
{
Map delegate;
- Map<Object, MarshalledValue> marshalledValues;
+ Map<Object, Object> unmarshalled;
+ public MarshalledValueMap()
+ {
+ // for externalization
+ }
+
public MarshalledValueMap(Map delegate)
{
this.delegate = delegate;
}
- protected MarshalledValue getMarshalledValue(Object o)
+ @SuppressWarnings("unchecked")
+ protected synchronized Map getUnmarshalledMap()
{
- if (marshalledValues == null) marshalledValues = new HashMap<Object, MarshalledValue>();
- if (marshalledValues.containsKey(o)) return marshalledValues.get(o);
- MarshalledValue mv = new MarshalledValue(o);
- marshalledValues.put(o, mv);
- return mv;
+ if (unmarshalled == null) unmarshalled = unmarshalledMap(delegate.entrySet());
+ return unmarshalled;
}
public int size()
@@ -56,50 +59,17 @@
public boolean containsKey(Object key)
{
- if (MarshalledValueHelper.excludeFromMarshalledValueWrapping(key))
- {
- return delegate.containsKey(key);
- }
- else
- {
- return delegate.containsKey(getMarshalledValue(key));
- }
+ return getUnmarshalledMap().containsKey(key);
}
public boolean containsValue(Object value)
{
- if (MarshalledValueHelper.excludeFromMarshalledValueWrapping(value))
- {
- return delegate.containsValue(value);
- }
- else
- {
- return delegate.containsValue(getMarshalledValue(value));
- }
+ return getUnmarshalledMap().containsValue(value);
}
public Object get(Object key)
{
- Object retVal;
- if (MarshalledValueHelper.excludeFromMarshalledValueWrapping(key))
- {
- retVal = delegate.get(key);
- }
- else
- {
- retVal = delegate.get(getMarshalledValue(key));
- }
-
- if (retVal instanceof MarshalledValue) try
- {
- retVal = ((MarshalledValue) retVal).get();
- }
- catch (Exception e)
- {
- throw new CacheException("Unable to unmarshall MarshalledValue", e);
- }
-
- return retVal;
+ return getUnmarshalledMap().get(key);
}
public Object put(Object key, Object value)
@@ -124,59 +94,67 @@
public Set keySet()
{
- try
- {
- return unmarshallSet(delegate.keySet());
- }
- catch (Exception e)
- {
- throw new CacheException("Unable to unmarshall MarshalledValues in collection", e);
- }
+ return getUnmarshalledMap().keySet();
}
public Collection values()
{
- try
+ return getUnmarshalledMap().values();
+ }
+
+ public Set entrySet()
+ {
+ return getUnmarshalledMap().entrySet();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected Map unmarshalledMap(Set entries)
+ {
+ if (entries == null || entries.isEmpty()) return Collections.emptyMap();
+ Map map = new HashMap(entries.size());
+ for (Object e : entries)
{
- return unmarshallList(delegate.values());
+ Map.Entry entry = (Map.Entry) e;
+ map.put(getUnmarshalledValue(entry.getKey()), getUnmarshalledValue(entry.getValue()));
}
- catch (Exception e)
- {
- throw new CacheException("Unable to unmarshall MarshalledValues in collection", e);
- }
+ return map;
}
- public Set entrySet()
+ private Object getUnmarshalledValue(Object o)
{
try
{
- return unmarshallSet(delegate.entrySet());
+ return o instanceof MarshalledValue ? ((MarshalledValue) o).get() : o;
}
catch (Exception e)
{
- throw new CacheException("Unable to unmarshall MarshalledValues in collection", e);
+ throw new CacheException("Unable to unmarshall value", e);
}
}
- @SuppressWarnings("unchecked")
- protected Set unmarshallSet(Set set) throws IOException, ClassNotFoundException
+ @Override
+ public boolean equals(Object other)
{
- Set newSet = new HashSet();
- for (Object o : set)
+ if (other instanceof Map)
{
- newSet.add(o instanceof MarshalledValue ? ((MarshalledValue) o).get() : o);
+ return getUnmarshalledMap().equals(other);
}
- return Collections.unmodifiableSet(newSet);
+ return false;
}
- @SuppressWarnings("unchecked")
- protected List unmarshallList(Collection c) throws IOException, ClassNotFoundException
+ @Override
+ public int hashCode()
{
- List newList = new LinkedList();
- for (Object o : c)
- {
- newList.add(o instanceof MarshalledValue ? ((MarshalledValue) o).get() : o);
- }
- return Collections.unmodifiableList(newList);
+ return getUnmarshalledMap().hashCode();
}
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ out.writeObject(delegate);
+ }
+
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ delegate = (Map) in.readObject();
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/main/java/org/jboss/cache/notifications/Notifier.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -635,6 +635,8 @@
private static Map copy(Map data)
{
+ if (data == null) return null;
+ if (data.isEmpty()) return Collections.emptyMap();
if (safe(data)) return new MarshalledValueMap(data);
return new MarshalledValueMap(new MapCopy(data));
}
Modified: core/trunk/src/test/java/org/jboss/cache/factories/CustomInterceptorChainTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/factories/CustomInterceptorChainTest.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/factories/CustomInterceptorChainTest.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -54,14 +54,14 @@
public void testInjectionAtHead()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
Interceptor x = new TestInterceptor();
cache.addInterceptor(x, 0);
interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 7 interceptors", 8, interceptors.size());
+ assertEquals("Expecting 9 interceptors", 9, interceptors.size());
assertInterceptorLinkage(interceptors);
assertEquals(x, interceptors.get(0));
@@ -70,30 +70,30 @@
public void testInjectionAtTail()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
Interceptor x = new TestInterceptor();
- cache.addInterceptor(x, 6);
+ cache.addInterceptor(x, 8);
interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 7 interceptors", 8, interceptors.size());
+ assertEquals("Expecting 9 interceptors", 9, interceptors.size());
assertInterceptorLinkage(interceptors);
- assertEquals(x, interceptors.get(6));
+ assertEquals(x, interceptors.get(8));
}
public void testInjectionInMiddle()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
Interceptor x = new TestInterceptor();
cache.addInterceptor(x, 3);
interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 7 interceptors", 8, interceptors.size());
+ assertEquals("Expecting 9 interceptors", 9, interceptors.size());
assertInterceptorLinkage(interceptors);
assertEquals(x, interceptors.get(3));
@@ -102,13 +102,13 @@
public void testInjectionBeyondTail()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
Interceptor x = new TestInterceptor();
try
{
- cache.addInterceptor(x, 8);
+ cache.addInterceptor(x, 9);
fail("Should throw an exception");
}
catch (IndexOutOfBoundsException e)
@@ -121,13 +121,13 @@
{
List<Interceptor> interceptors = cache.getInterceptorChain();
Interceptor afterHead = interceptors.get(1);
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
cache.removeInterceptor(0);
interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 5 interceptors", 6, interceptors.size());
+ assertEquals("Expecting 7 interceptors", 7, interceptors.size());
assertInterceptorLinkage(interceptors);
assertEquals(afterHead, interceptors.get(0));
@@ -137,7 +137,7 @@
{
List<Interceptor> interceptors = cache.getInterceptorChain();
Interceptor beforeTail = interceptors.get(4);
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
cache.removeInterceptor(5);
@@ -146,7 +146,7 @@
System.out.println(interceptors);
- assertEquals("Expecting 5 interceptors", 6, interceptors.size());
+ assertEquals("Expecting 7 interceptors", 7, interceptors.size());
assertInterceptorLinkage(interceptors);
assertEquals(beforeTail, interceptors.get(4));
@@ -155,25 +155,25 @@
public void testRemoveAtMiddle()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
cache.removeInterceptor(3);
interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 5 interceptors", 6, interceptors.size());
+ assertEquals("Expecting 7 interceptors", 7, interceptors.size());
assertInterceptorLinkage(interceptors);
}
public void testRemoveBeyondTail()
{
List<Interceptor> interceptors = cache.getInterceptorChain();
- assertEquals("Expecting 6 interceptors", 7, interceptors.size());
+ assertEquals("Expecting 8 interceptors", 8, interceptors.size());
assertInterceptorLinkage(interceptors);
try
{
- cache.removeInterceptor(8);
+ cache.removeInterceptor(9);
fail("Should throw an exception");
}
catch (IndexOutOfBoundsException e)
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -93,9 +93,6 @@
cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("",
TcpDelegatingCacheLoader.class.getName(),
"host=127.0.0.1\nport=12121\ntimeout=" + TCP_CACHE_LOADER_TIMEOUT_MS, false, true, false));
-
- // give the tcp cache server time to start up
- //TestingUtil.sleepThread(2000);
}
// restart tests
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplMarshalledValuesTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplMarshalledValuesTest.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplMarshalledValuesTest.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -1,13 +1,22 @@
package org.jboss.cache.marshall;
+import org.testng.annotations.Test;
+
/**
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.1.0
*/
+@Test(groups = {"functional", "jgroups"})
public class AsyncReplMarshalledValuesTest extends AsyncReplTest
{
public AsyncReplMarshalledValuesTest()
{
useMarshalledValues = true;
}
+
+ @Override
+ public void testCustomFqn()
+ {
+ // don't test this case
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -38,7 +38,7 @@
* @author Ben Wang
* @version $Revision$
*/
-@Test(groups = {"functional", "jgroups", "transaction"})
+@Test(groups = {"functional", "jgroups"})
public class AsyncReplTest extends RegionBasedMarshallingTestBase
{
CacheSPI<Object, Object> cache1, cache2;
@@ -85,18 +85,8 @@
@AfterMethod(alwaysRun = true)
public void tearDown() throws Exception
{
- cache1.removeNode(Fqn.ROOT);
- if (cache1 != null)
- {
- log("stopping cache1");
- cache1.stop();
- }
-
- if (cache2 != null)
- {
- log("stopping cache2");
- cache2.stop();
- }
+ TestingUtil.killCaches(cache1, cache2);
+ resetContextClassLoader();
}
/**
@@ -107,73 +97,77 @@
public void testCLSet2() throws Exception
{
ClassLoader cla = getClassLoader();
+ ClassLoader clb = getClassLoader();
- Region existing = cache1.getRegion(aop, false);
- if (existing == null)
+ if (!useMarshalledValues)
{
- existing = cache1.getRegion(aop, true);
- }
- existing.registerContextClassLoader(cla);
-
-
- ClassLoader clb = getClassLoader();
- existing = cache2.getRegion(aop, false);
- if (existing == null)
- {
+ Region existing = cache1.getRegion(aop, true);
+ existing.registerContextClassLoader(cla);
existing = cache2.getRegion(aop, true);
+ existing.registerContextClassLoader(clb);
}
- existing.registerContextClassLoader(clb);
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
cache1.put(aop, "person", ben_);
cache1.put(new Fqn<String>("alias"), "person", ben_);
+ if (useMarshalledValues) resetContextClassLoader();
TestingUtil.sleepThread(1000);
Object ben2 = null;
// Can't cast it to Person. CCE will resutl.
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
ben2 = cache2.get(aop, "person");
+ if (useMarshalledValues) resetContextClassLoader();
assertNotNull(ben2);
assertEquals(ben_.toString(), ben2.toString());
Class<?> claz = clb.loadClass(ADDRESS_CLASSNAME);
Object add = claz.newInstance();
- Class<?>[] types = {String.class};
- Method setValue = claz.getMethod("setCity", types);
- Object[] margs = {"Sunnyvale"};
- setValue.invoke(add, margs);
+ Method setValue = claz.getMethod("setCity", String.class);
+ setValue.invoke(add, "Sunnyvale");
Class<?> clasz1 = clb.loadClass(PERSON_CLASSNAME);
- types = new Class[]{claz};
- setValue = clasz1.getMethod("setAddress", types);
- margs = new Object[]{add};
- setValue.invoke(ben2, margs);
+ setValue = clasz1.getMethod("setAddress", claz);
+ setValue.invoke(ben2, add);
// Set it back to the cache
// Can't cast it to Person. CCE will resutl.
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
cache2.put(aop, "person", ben2);
+ if (useMarshalledValues) resetContextClassLoader();
TestingUtil.sleepThread(1000);
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
Object ben3 = cache1.get(aop, "person");
+ if (useMarshalledValues) resetContextClassLoader();
assertEquals(ben2.toString(), ben3.toString());
}
public void testPuts() throws Exception
{
- ClassLoader cl = getClassLoader();
- Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
- r1.registerContextClassLoader(cl);
+ ClassLoader cla = getClassLoader();
+ ClassLoader clb = getClassLoader();
+
+ if (!useMarshalledValues)
+ {
+ Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
+ r1.registerContextClassLoader(cla);
+ Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
+ r2.registerContextClassLoader(clb);
+ }
+
// Create an empty Person loaded by this classloader
- Object scopedBen1 = getPersonFromClassloader(cl);
-
- cl = getClassLoader();
- Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
- r2.registerContextClassLoader(cl);
+ Object scopedBen1 = getPersonFromClassloader(cla);
// Create another empty Person loaded by this classloader
- Object scopedBen2 = getPersonFromClassloader(cl);
+ Object scopedBen2 = getPersonFromClassloader(clb);
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
cache1.put(Fqn.fromString("/aop/1"), "person", ben_);
cache1.put(Fqn.fromString("/aop/2"), "person", scopedBen1);
+ if (useMarshalledValues) resetContextClassLoader();
TestingUtil.sleepThread(1000);
Object ben2 = null;
// Can't cast it to Person. CCE will resutl.
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
ben2 = cache2.get(Fqn.fromString("/aop/1"), "person");
assertEquals(ben_.toString(), ben2.toString());
@@ -198,39 +192,48 @@
public void testTxCLSet2() throws Exception
{
ClassLoader cla = getClassLoader();
- Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
- r1.registerContextClassLoader(cla);
ClassLoader clb = getClassLoader();
- Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
- r2.registerContextClassLoader(clb);
+ if (!useMarshalledValues)
+ {
+ Region r1 = cache1.getRegion(aop, false) == null ? cache1.getRegion(aop, true) : cache1.getRegion(aop, false);
+ r1.registerContextClassLoader(cla);
+ Region r2 = cache2.getRegion(aop, false) == null ? cache2.getRegion(aop, true) : cache2.getRegion(aop, false);
+ r2.registerContextClassLoader(clb);
+ }
+
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
beginTransaction();
cache1.put(aop, "person", ben_);
commit();
+ if (useMarshalledValues) resetContextClassLoader();
+
TestingUtil.sleepThread(1000);
Object ben2 = null;
// Can't cast it to Person. CCE will resutl.
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
ben2 = cache2.get(aop, "person");
+ if (useMarshalledValues) resetContextClassLoader();
assertEquals(ben_.toString(), ben2.toString());
Class<?> claz = clb.loadClass(ADDRESS_CLASSNAME);
Object add = claz.newInstance();
- Class<?>[] types = {String.class};
- Method setValue = claz.getMethod("setCity", types);
- Object[] margs = {"Sunnyvale"};
- setValue.invoke(add, margs);
+ Method setValue = claz.getMethod("setCity", String.class);
+ setValue.invoke(add, "Sunnyvale");
Class<?> clasz1 = clb.loadClass(PERSON_CLASSNAME);
- types = new Class[]{claz};
- setValue = clasz1.getMethod("setAddress", types);
- margs = new Object[]{add};
- setValue.invoke(ben2, margs);
+ setValue = clasz1.getMethod("setAddress", claz);
+ setValue.invoke(ben2, add);
// Set it back to the cache
// Can't cast it to Person. CCE will resutl.
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
cache2.put(aop, "person", ben2);
+ if (useMarshalledValues) resetContextClassLoader();
TestingUtil.sleepThread(1000);
+ if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
Object ben3 = cache1.get(aop, "person");
+ if (useMarshalledValues) resetContextClassLoader();
assertEquals(ben2.toString(), ben3.toString());
}
Modified: core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationExceptionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationExceptionTest.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationExceptionTest.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -123,16 +123,12 @@
}
else
{
- fail("should have received NotSerializableException, but received " + t.getClass());
+ throw runtime;
}
}
- catch (Exception exc)
- {
- fail("failure - we should not get here: " + exc);
- }
}
- public void testNonSerizlableReplWithTx() throws Exception
+ public void testNonSerializableReplWithTx() throws Exception
{
TransactionManager tm;
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2008-01-22 10:59:59 UTC (rev 5188)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/StateTransfer200Test.java 2008-01-22 13:30:36 UTC (rev 5189)
@@ -15,6 +15,7 @@
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.marshall.MarshalledValue;
import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
@@ -396,12 +397,17 @@
r.activate();
- assertEquals("Correct state from loader for /a/b", ben.toString(), loader.get(A_B).get("person").toString());
+ assertEquals("Correct state from loader for /a/b", ben.toString(), getUnmarshalled(loader.get(A_B).get("person")).toString());
- assertEquals("Correct state from cache for /a/b", ben.toString(), cache2.get(A_B, "person").toString());
+ assertEquals("Correct state from cache for /a/b", ben.toString(), getUnmarshalled(cache2.get(A_B, "person")).toString());
}
+ private Object getUnmarshalled(Object o) throws Exception
+ {
+ return o instanceof MarshalledValue ? ((MarshalledValue) o).get() : o;
+ }
+
public void testStalePersistentState() throws Exception
{
CacheSPI c1 = createCache("1", true, false, true, false);
17 years, 1 month
JBoss Cache SVN: r5188 - core/branches/1.4.X/src/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 05:59:59 -0500 (Tue, 22 Jan 2008)
New Revision: 5188
Modified:
core/branches/1.4.X/src/org/jboss/cache/TreeCacheMBean.java
Log:
JBCACHE-1255
Modified: core/branches/1.4.X/src/org/jboss/cache/TreeCacheMBean.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/TreeCacheMBean.java 2008-01-22 10:57:58 UTC (rev 5187)
+++ core/branches/1.4.X/src/org/jboss/cache/TreeCacheMBean.java 2008-01-22 10:59:59 UTC (rev 5188)
@@ -984,4 +984,6 @@
* Purges the contents of all configured {@link CacheLoader}s
*/
void purgeCacheLoaders() throws Exception;
+
+ void setUseInterceptorMbeans(boolean b);
}
17 years, 1 month
JBoss Cache SVN: r5187 - core/tags/1.4.1.SP9/src/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-01-22 05:57:58 -0500 (Tue, 22 Jan 2008)
New Revision: 5187
Modified:
core/tags/1.4.1.SP9/src/org/jboss/cache/TreeCacheMBean.java
Log:
JBCACHE-1255
Modified: core/tags/1.4.1.SP9/src/org/jboss/cache/TreeCacheMBean.java
===================================================================
--- core/tags/1.4.1.SP9/src/org/jboss/cache/TreeCacheMBean.java 2008-01-22 10:50:19 UTC (rev 5186)
+++ core/tags/1.4.1.SP9/src/org/jboss/cache/TreeCacheMBean.java 2008-01-22 10:57:58 UTC (rev 5187)
@@ -984,4 +984,6 @@
* Purges the contents of all configured {@link CacheLoader}s
*/
void purgeCacheLoaders() throws Exception;
+
+ void setUseInterceptorMbeans(boolean b);
}
17 years, 1 month