[jboss-cvs] JBossAS SVN: r73315 - in trunk: ejb3 and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 12 17:50:34 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-05-12 17:50:34 -0400 (Mon, 12 May 2008)
New Revision: 73315
Modified:
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
trunk/ejb3/build.xml
Log:
[JBAS-5377] EJB3 to get caches from AS CacheManager
Modified: 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 2008-05-12 20:52:50 UTC (rev 73314)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml 2008-05-12 21:50:34 UTC (rev 73315)
@@ -3,9 +3,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.
+ | A config appropriate for HttpSession caches.
+ | Not for use with FIELD replication granularity webapps.
-->
<cache-config name="standard-session-cache">
@@ -96,11 +95,12 @@
<cacheloader>
<class>org.jboss.cache.loader.FileCacheLoader</class>
<properties>
- location=${jboss.server.data.dir}${/}field-session
+ location=${jboss.server.data.dir}${/}session
</properties>
<async>false</async>
<fetchPersistentState>true</fetchPersistentState>
<ignoreModifications>false</ignoreModifications>
+ <checkCharacterPortability>false</checkCharacterPortability>
</cacheloader>
</config>
@@ -218,6 +218,7 @@
<async>false</async>
<fetchPersistentState>true</fetchPersistentState>
<ignoreModifications>false</ignoreModifications>
+ <checkCharacterPortability>false</checkCharacterPortability>
</cacheloader>
</config>
@@ -239,6 +240,129 @@
</cache-config>
<!--
+ | A config appropriate for EJB3 SFSB caching.
+ -->
+ <cache-config name="sfsb-cache">
+ <!-- No transaction manager lookup -->
+
+ <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}-SFSBCache</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>
+
+ <!--
+ SFSBs use region-based marshalling to provide for partial state
+ transfer during deployment/undeployment.
+ -->
+ <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}${/}sfsb
+ </properties>
+ <async>false</async>
+ <fetchPersistentState>true</fetchPersistentState>
+ <ignoreModifications>false</ignoreModifications>
+ <checkCharacterPortability>false</checkCharacterPortability>
+ </cacheloader>
+
+ </config>
+ </attribute>
+
+ <!-- SFSBs 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_"/>
+ <!-- EJB3 integration code will programatically create
+ other regions as beans are deployed -->
+ </config>
+ </attribute>
+
+ </cache-config>
+
+ <!--
| A config appropriate for the HAPartition-based services, e.g.
| DistributedState, HA-JNDI. Also valid for use by the JBossWeb
| ClusteredSingleSignOn valve.
Modified: 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 2008-05-12 20:52:50 UTC (rev 73314)
+++ trunk/cluster/src/resources/jboss-cache-manager.sar/META-INF/jboss-cache-manager-beans.xml 2008-05-12 21:50:34 UTC (rev 73315)
@@ -28,6 +28,16 @@
<key>clustered-sso</key>
<value>ha-partition</value>
</entry>
+ <!-- Handle the legacy name for the EJB3 SFSB cache -->
+ <entry>
+ <key>jboss.cache:service=EJB3SFSBClusteredCache</key>
+ <value>sfsb-cache</value>
+ </entry>
+ <!-- Handle the legacy name for the EJB3 Entity cache -->
+ <entry>
+ <key>jboss.cache:service=EJB3EntityTreeCache</key>
+ <value>pessimistic-shared</value>
+ </entry>
</map>
</property>
</bean>
Modified: trunk/ejb3/build.xml
===================================================================
--- trunk/ejb3/build.xml 2008-05-12 20:52:50 UTC (rev 73314)
+++ trunk/ejb3/build.xml 2008-05-12 21:50:34 UTC (rev 73315)
@@ -335,8 +335,6 @@
</copy>
<copy todir="${build.lib}">
<fileset dir="output/resources">
- <include name="ejb3-clustered-sfsbcache-beans.xml"/>
- <include name="ejb3-entity-cache-beans.xml"/>
<include name="ejb3-timer-service.xml"/>
<include name="ejb3-connectors-service.xml"/>
<include name="ejb3-interceptors-aop.xml"/>
More information about the jboss-cvs-commits
mailing list