[jboss-cvs] JBossAS SVN: r72073 - in trunk: cluster and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Apr 12 00:21:43 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-04-12 00:21:43 -0400 (Sat, 12 Apr 2008)
New Revision: 72073
Added:
trunk/cluster/src/resources/jboss-cache-manager.sar/
trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/
trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-beans.xml
Modified:
trunk/build/build-distr.xml
trunk/cluster/build.xml
Log:
[JBAS-5377] Deploy a JBC CacheManager in the AS
Modified: trunk/build/build-distr.xml
===================================================================
--- trunk/build/build-distr.xml 2008-04-12 04:21:36 UTC (rev 72072)
+++ trunk/build/build-distr.xml 2008-04-12 04:21:43 UTC (rev 72073)
@@ -970,6 +970,12 @@
<include name="**/*"/>
</fileset>
</copy>
+ <mkdir dir="${install.server}/all/deploy/cluster/jboss-cache-manager.sar"/>
+ <copy todir="${install.server}/all/deploy/cluster/jboss-cache-manager.sar" filtering="no">
+ <fileset dir="${_module.output}/resources/jboss-cache-manager.sar">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
<mkdir dir="${install.server}/all/deploy/deploy.last"/>
<!--
<copy todir="${install.server}/all/deploy/deploy.last" filtering="no">
Modified: trunk/cluster/build.xml
===================================================================
--- trunk/cluster/build.xml 2008-04-12 04:21:36 UTC (rev 72072)
+++ trunk/cluster/build.xml 2008-04-12 04:21:43 UTC (rev 72073)
@@ -281,6 +281,14 @@
<include name="**"/>
</fileset>
</copy>
+
+ <!-- Build jboss-cache-manager.sar -->
+ <mkdir dir="${build.resources}/jboss-cache-manager.sar"/>
+ <copy todir="${build.resources}/jboss-cache-manager.sar" filtering="yes">
+ <fileset dir="${source.resources}/jboss-cache-manager.sar">
+ <include name="**"/>
+ </fileset>
+ </copy>
<!-- Build the jbossha.jar -->
<!--
Added: trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml
===================================================================
--- trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml (rev 0)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml 2008-04-12 04:21:43 UTC (rev 72073)
@@ -0,0 +1,835 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cache-configs>
+
+ <!--
+ | A config appropriate for JEE session caches (i.e. HttpSession caches
+ | and EJB3 SFSB caches). Not for use with FIELD replication granularity
+ | webapps.
+ -->
+ <cache-config name="standard-session-cache">
+
+ <attribute name="TransactionManagerLookup">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
+
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!-- Valid modes are REPL_ASYNC and REPL_SYNC -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-SessionCache</attribute>
+
+ <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+ because we are using asynchronous replication.
+ -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Must fetch state. -->
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup.
+ -->
+ <attribute name="StateRetrievalTimeout">60000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">17500</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+ <!-- Region-based marshalling is not needed. -->
+ <attribute name="UseRegionBasedMarshalling">false</attribute>
+ <!-- Must match the value of "UseRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">false</attribute>
+
+ <attribute name="ExposeManagementStatistics">true</attribute>
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>false</buddyReplicationEnabled>
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains.
+ ignoreColocatedBuddies means that each node will *try* to
+ select a buddy on a different physical host. If not able to do
+ so though, it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified,
+ we try and pick a buddy why shares the same pool name (falling
+ back to other buddies if not available). This allows the sysdmin
+ to hint at backup buddies are picked, so for example, nodes may
+ be hinted topick buddies on a different physical rack or power
+ supply for added fault tolerance.
+ -->
+ <buddyPoolName>default</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation
+ messages (such as assigning to and removing from groups -->
+ <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
+
+ <!-- Do not change these -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+
+ <!-- Cache Loader for session passivation -->
+ <attribute name="CacheLoaderConfig">
+ <config>
+ <passivation>true</passivation>
+ <preload>/</preload>
+ <shared>false</shared>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.FileCacheLoader</class>
+ <properties>
+ location=${jboss.server.data.dir}${/}field-session
+ </properties>
+ <async>false</async>
+ <fetchPersistentState>true</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ </cacheloader>
+
+ </config>
+ </attribute>
+
+ <!--
+ JBoss Cache eviction is not needed; webapp or SFSB container
+ manages eviction by itself.
+ -->
+
+ </cache-config>
+
+ <!--
+ | A config appropriate for HttpSession caches for webapps
+ | that use FIELD replication granularity.
+ -->
+ <cache-config name="field-granularity-session-cache">
+
+ <attribute name="TransactionManagerLookup">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
+
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!-- Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-FieldSessionCache</attribute>
+
+ <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+ because we are using asynchronous replication.
+ -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Must fetch state. -->
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup.
+ -->
+ <attribute name="StateRetrievalTimeout">60000</attribute>
+
+ <!--
+ Number of milliseconds to wait until all responses for a
+ synchronous call have been received.
+ -->
+ <attribute name="SyncReplTimeout">17500</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <attribute name="ExposeManagementStatistics">true</attribute>
+
+ <!-- Buddy Replication config -->
+ <attribute name="BuddyReplicationConfig">
+ <config>
+ <buddyReplicationEnabled>false</buddyReplicationEnabled>
+ <buddyLocatorClass>org.jboss.cache.buddyreplication.NextMemberBuddyLocator</buddyLocatorClass>
+ <!-- numBuddies is the number of backup nodes each node maintains.
+ ignoreColocatedBuddies means that each node will *try* to
+ select a buddy on a different physical host. If not able to do
+ so though, it will fall back to colocated nodes. -->
+ <buddyLocatorProperties>
+ numBuddies = 1
+ ignoreColocatedBuddies = true
+ </buddyLocatorProperties>
+
+ <!-- A way to specify a preferred replication group. If specified,
+ we try and pick a buddy why shares the same pool name (falling
+ back to other buddies if not available). This allows the sysdmin
+ to hint at backup buddies are picked, so for example, nodes may
+ be hinted topick buddies on a different physical rack or power
+ supply for added fault tolerance.
+ -->
+ <buddyPoolName>default</buddyPoolName>
+ <!-- communication timeout for inter-buddy group organisation
+ messages (such as assigning to and removing from groups -->
+ <buddyCommunicationTimeout>17500</buddyCommunicationTimeout>
+
+ <!-- Do not change these -->
+ <autoDataGravitation>false</autoDataGravitation>
+ <dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>
+ <dataGravitationSearchBackupTrees>true</dataGravitationSearchBackupTrees>
+
+ </config>
+ </attribute>
+
+ <!-- Cache Loader for session passivation -->
+ <attribute name="CacheLoaderConfig">
+ <config>
+ <passivation>true</passivation>
+ <preload>/</preload>
+ <shared>false</shared>
+
+ <cacheloader>
+ <class>org.jboss.cache.loader.FileCacheLoader</class>
+ <properties>
+ location=${jboss.server.data.dir}${/}field-session
+ </properties>
+ <async>false</async>
+ <fetchPersistentState>true</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ </cacheloader>
+
+ </config>
+ </attribute>
+
+ <!-- FIELD granularity webapps use JBoss Cache eviction -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.NullEvictionPolicy</attribute>
+ <!-- Cache wide default region -->
+ <region name="/_default_"/>
+ <!-- JBossWeb integration code will programatically create
+ other regions as webapps are deployed -->
+ </config>
+ </attribute>
+
+ </cache-config>
+
+ <!--
+ | A config appropriate for credential caching by the
+ | JBossWeb ClusteredSingleSignOn valve
+ -->
+ <cache-config name="clustered-sso">
+
+ <attribute name="TransactionManagerLookup">org.jboss.cache.transaction.BatchModeTransactionManagerLookup</attribute>
+
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-ClusteredSSOCache</attribute>
+
+ <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+ because we are using asynchronous replication.
+ -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <attribute name="StateRetrievalTimeout">60000</attribute>
+ <attribute name="SyncReplTimeout">17500</attribute>
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+ <attribute name="UseRegionBasedMarshalling">false</attribute>
+ <attribute name="InactiveOnStartup">false</attribute>
+
+ <attribute name="ExposeManagementStatistics">true</attribute>
+
+ </cache-config>
+
+ <!--
+ | Following are JBoss Cache configurations suitable for different
+ | Hibernate 2nd Level Cache uses (e.g. entities vs. queries).
+ |
+ | In all cases, TransactionManager configuration not required.
+ | Hibernate will plug in its own transaction manager integration.
+ -->
+
+
+ <!-- A config appropriate for entity/collection caching. -->
+ <cache-config name="optimistic-entity">
+
+ <!-- Node locking scheme -->
+ <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
+
+ <!-- Valid modes are LOCAL
+ REPL_ASYNC
+ REPL_SYNC
+ INVALIDATION_ASYNC
+ INVALIDATION_SYNC
+
+ INVALIDATION_SYNC is highly recommended as the mode for use
+ with entity and collection caches.
+ -->
+ <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-optimistic-entity</attribute>
+
+ <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+ slightly better (no JGroups FC) but we stick with udp to
+ help ensure this cache and others like timestamps-cache
+ that require FC can use the same underlying JGroups resources. -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Whether or not to fetch state on joining a cluster. -->
+ <attribute name="FetchInMemoryState">false</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup. Ignored if FetchInMemoryState=false.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+ <!-- A config appropriate for entity/collection caching that
+ uses pessimistic locking -->
+ <cache-config name="pessimistic-entity">
+
+ <!-- Node locking scheme -->
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+
+ <!--
+ Isolation 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
+
+ INVALIDATION_SYNC is highly recommended as the mode for use
+ with entity and collection caches.
+ -->
+ <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-entity</attribute>
+
+ <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
+ slightly better (no JGroups FC) but we stick with udp to
+ help ensure this cache and others like timestamps-cache
+ that require FC can use the same underlying JGroups resources. -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Whether or not to fetch state on joining a cluster. -->
+ <attribute name="FetchInMemoryState">false</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup. Ignored if FetchInMemoryState=false.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+
+
+ <!-- A config appropriate for query caching. Does not replicate
+ queries. DO NOT STORE TIMESTAMPS IN THIS CACHE.
+ -->
+ <cache-config name="local-query">
+
+ <!-- Node locking scheme -->
+ <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
+
+ <attribute name="CacheMode">LOCAL</attribute>
+
+ <!-- Max number of milliseconds to wait for a lock acquisition -->
+ <attribute name="LockAcquisitionTimeout">15000</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+
+ <!-- A query cache that replicates queries. Replication is asynchronous.
+ DO NOT STORE TIMESTAMPS IN THIS CACHE.
+ -->
+ <cache-config name="replicated-query">
+
+ <!-- Node locking scheme -->
+ <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
+
+ <!--
+ Isolation 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
+
+ INVALIDATION_SYNC is highly recommended as the mode for use
+ with entity and collection caches.
+ -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-replicated-query</attribute>
+
+ <!-- Use a UDP (multicast) based stack -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Whether or not to fetch state on joining a cluster. -->
+ <attribute name="FetchInMemoryState">false</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup. Ignored if FetchInMemoryState=false.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+
+
+ <!-- Optimized for timestamp caching. A clustered timestamp cache
+ is required if query caching is used, even if the query cache
+ itself is configured with CacheMode=LOCAL.
+ -->
+ <cache-config name="timestamps-cache">
+
+ <!-- Node locking scheme -->
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+
+ <!--
+ Isolation level : SERIALIZABLE
+ REPEATABLE_READ (default)
+ READ_COMMITTED
+ READ_UNCOMMITTED
+ NONE
+ -->
+ <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+
+ <!-- Cannot be INVALIDATION. ASYNC for improved performance. -->
+ <attribute name="CacheMode">REPL_ASYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-timestamps-cache</attribute>
+
+ <!-- Use a UDP (multicast) based stack -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Used for timestamps, so must fetch state. -->
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup. Ignored if FetchInMemoryState=false.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+
+
+ <!-- A config appropriate for a cache that's shared for
+ entity, collection, query and timestamp caching. Not an advised
+ configuration, since it requires cache mode REPL_SYNC, which is the
+ least efficient mode. Also requires a full state transfer at startup,
+ which can be expensive. Uses optimistic locking -->
+ <cache-config name="optimistic-shared">
+
+ <!-- Node locking scheme:
+ OPTIMISTIC
+ PESSIMISTIC (default)
+ -->
+ <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
+
+ <!-- Must use REPL since used for timestamp caching. -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- With OPTIMISTIC with replication we need to use synchronous commits. -->
+ <attribute name="SyncCommitPhase">true</attribute>
+ <attribute name="SyncRollbackPhase">true</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-optimistic-shared</attribute>
+
+ <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+ because timestamp communication will not require a synchronous response.
+ -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Used for timestamps, so must fetch state. -->
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup. Ignored if FetchInMemoryState=false.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+
+
+ <!-- A config appropriate for a cache that's shared for
+ entity, collection, query and timestamp caching. Not an advised
+ configuration, since it requires cache mode REPL_SYNC, which is the
+ least efficient mode. Also requires a full state transfer at startup,
+ which can be expensive. Uses pessmistic locking.
+ -->
+ <cache-config name="pessimistic-shared">
+
+ <!-- TransactionManager configuration not required for Hibernate!
+ Hibernate will plug in its own transaction manager integration.
+ -->
+
+ <!-- Node locking scheme:
+ OPTIMISTIC
+ PESSIMISTIC (default)
+ -->
+ <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
+
+ <!--
+ Isolation 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
+
+ INVALIDATION_SYNC is highly recommended as the mode for use
+ with entity and collection caches.
+ -->
+ <attribute name="CacheMode">REPL_SYNC</attribute>
+
+ <!-- Name of cluster. Needs to be the same for all members, in order
+ to find each other -->
+ <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-pessimistic-shared</attribute>
+
+ <!-- Use a UDP (multicast) based stack. Need JGroups flow control (FC)
+ because timestamp communication will not require a synchronous response.
+ -->
+ <attribute name="MultiplexerStack">${jboss.default.jgroups.stack:udp}</attribute>
+
+ <!-- Used for timestamps, so must fetch state. -->
+ <attribute name="FetchInMemoryState">true</attribute>
+
+ <!--
+ The max amount of time (in milliseconds) we wait until the
+ state (ie. the contents of the cache) are retrieved from
+ existing members at startup.
+ -->
+ <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>
+
+ <!--
+ Indicate whether to use 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">true</attribute>
+ <!-- Must match the value of "useRegionBasedMarshalling" -->
+ <attribute name="InactiveOnStartup">true</attribute>
+
+ <!-- Specific eviction policy configurations. This is LRU -->
+ <attribute name="EvictionPolicyConfig">
+ <config>
+ <attribute name="wakeUpIntervalSeconds">5</attribute>
+ <!-- Name of the DEFAULT eviction policy class. -->
+ <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
+ <!-- Cache wide default -->
+ <region name="/_default_">
+ <!-- Evict LRU node once we have more than this number of nodes -->
+ <attribute name="maxNodes">10000</attribute>
+ <!-- And, evict any node that hasn't been accessed in this many seconds -->
+ <attribute name="timeToLiveSeconds">1000</attribute>
+ <!-- Don't evict a node that's been accessed within this many seconds.
+ Set this to a value greater than your max expected transaction length. -->
+ <attribute name="minTimeToLiveSeconds">120</attribute>
+ </region>
+ <!-- Don't ever evict modification timestamps -->
+ <region name="/TS" policyClass="org.jboss.cache.eviction.NullEvictionPolicy"/>
+ </config>
+ </attribute>
+
+ </cache-config>
+
+</cache-configs>
Added: trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-beans.xml
===================================================================
--- trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-beans.xml (rev 0)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-beans.xml 2008-04-12 04:21:43 UTC (rev 72073)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Factory/registry for JBoss Cache and PojoCache instances used in the AS -->
+ <bean name="CacheManager" class="org.jboss.ha.cachemanager.CacheManager">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=CacheManager", exposedInterface=org.jboss.ha.cachemanager.CacheManagerMBean.class, registerDirectly=true)</annotation>
+
+ <!-- This doesn't seem to work, so the service binds itself for now
+ <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="java:CacheManager")</annotation>
+ -->
+ <property name="jndiName">java:CacheManager</property>
+
+ <property name="configurationRegistry">
+ <bean name="CacheConfigurationRegistry" class="org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry">
+ <property name="configResource">META-INF/jboss-cache-configs.xml</property>
+ </bean>
+ </property>
+
+ <property name="channelFactory"><inject bean="JChannelFactory"/></property>
+ </bean>
+
+</deployment>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list