[jboss-cvs] JBossAS SVN: r72967 - in trunk: cluster/src/main/org/jboss/ha/framework/server and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 1 21:00:41 EDT 2008
Author: bstansberry at jboss.com
Date: 2008-05-01 21:00:41 -0400 (Thu, 01 May 2008)
New Revision: 72967
Removed:
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java
trunk/testsuite/src/resources/cluster/partition/jboss-service.xml
Modified:
trunk/cluster/src/etc/cluster-beans.xml
trunk/cluster/src/etc/hajndi-service.xml
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
trunk/testsuite/src/main/org/jboss/test/cluster/hapartition/state/StartupTestClusterPartition.java
trunk/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-beans.xml
trunk/testsuite/src/resources/cluster/hasingleton/electionpolicy/ha-electionpolicy-beans.xml
trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml
trunk/testsuite/src/resources/cluster/partition/partition-restart-beans.xml
Log:
[JBAS-5500] Convert HAPartition to use CacheManager
Modified: trunk/cluster/src/etc/cluster-beans.xml
===================================================================
--- trunk/cluster/src/etc/cluster-beans.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/cluster/src/etc/cluster-beans.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -7,122 +7,37 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- ==================================================================== -->
- <!-- Shared cache for JBoss cluster services -->
- <!-- ==================================================================== -->
-
- <!--
- The HAPartitionCache instance defined here is shared by JBoss cluster services that
- use JBossCache as their underlying data store. Currently the services that share this
- cache are HAJNDI and DistributedState. It is possible to change the cluster name but this
- isn't recommended since it will be more difficult for others to recognize that the renamed
- cluster is the one used by JBoss cluster services.
- -->
-
- <!-- First we create a Configuration object for the cache -->
- <bean name="DefaultPartition-HAPartitionCacheConfig"
- class="org.jboss.cache.config.Configuration">
-
- <!-- Externally injected services -->
- <property name="runtimeConfig">
- <bean name="DefaultPartition-HAPartitionCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
- <property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
- </bean>
- </property>
-
- <property name="multiplexerStack">${jboss.multiplexer.stack:udp}</property>
-
- <!-- Valid isolation levels are
- SERIALIZABLE
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED
- NONE
- -->
- <property name="isolationLevelString">REPEATABLE_READ</property>
-
- <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
- <property name="cacheModeString">REPL_SYNC</property>
-
- <!-- Just used for async repl: use a replication queue -->
- <property name="useReplQueue">false</property>
-
- <!-- Replication interval for replication queue (in ms) -->
- <property name="replQueueInterval">0</property>
-
- <!-- Max number of elements which trigger replication -->
- <property name="replQueueMaxElements">10</property>
-
- <!-- Name of cluster. Needs to be the same for all nodes in clusters,
- in order to find each other -->
- <property name="clusterName">${jboss.partition.name:DefaultPartition}-HAPartitionCache</property>
-
- <!-- Whether or not to fetch state on joining a cluster -->
- <property name="fetchInMemoryState">true</property>
-
- <!-- The max amount of time (in milliseconds) we wait until the
- initial state (ie. the contents of the cache) are retrieved from
- existing members in a clustered environment -->
- <property name="stateRetrievalTimeout">5000</property>
-
- <!-- Number of milliseconds to wait until all responses for a
- synchronous call have been received. -->
- <property name="syncReplTimeout">20000</property>
-
- <!-- Max number of milliseconds to wait for a lock acquisition -->
- <property name="lockAcquisitionTimeout">15000</property>
-
- <property name="exposeManagementStatistics">true</property>
-
- </bean>
-
- <!-- Add a handle to the cache to JMX -->
- <bean name="DefaultPartition-HAPartitionCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=HAPartitionCache,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
-
- <property name="configuration"><inject bean="DefaultPartition-HAPartitionCacheConfig"/></property>
-
- </bean>
-
- <!-- ==================================================================== -->
<!-- Cluster Partition: defines cluster -->
<!-- ==================================================================== -->
<bean name="HAPartition"
class="org.jboss.ha.framework.server.ClusterPartition">
- <depends>jboss:service=Naming</depends>
+ <depends>jboss:service=Naming</depends>
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=HAPartition,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=HAPartition,partition=${jboss.partition.name:DefaultPartition}", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <constructor>
- <parameter>
- <bean name="DefaultPartition-ClusterPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition</property>
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="DefaultPartition-HAPartitionCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">${jboss.partition.name:DefaultPartition}</property>
+ <!-- Name of the partition being built -->
+ <property name="partitionName">${jboss.partition.name:DefaultPartition}</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">30000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">30000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">60000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">60000</property>
+
+ <!-- Optionally provide a thread source to allow async connect of our channel -->
+ <property name="threadPool"><inject bean="jboss.system:service=ThreadPool"/></property>
<property name="distributedReplicantManagerImpl">
<bean name="DistributedReplicantManager"
Modified: trunk/cluster/src/etc/hajndi-service.xml
===================================================================
--- trunk/cluster/src/etc/hajndi-service.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/cluster/src/etc/hajndi-service.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -14,7 +14,7 @@
<!-- The partition used for group RPCs to find locally bound objects -->
<attribute name="HAPartition"><inject bean="HAPartition"/></attribute>
<!-- The cache for storing the replicated tree -->
- <attribute name="ClusteredCache"><inject bean="DefaultPartition-HAPartitionCache" property="cache"/></attribute>
+ <attribute name="ClusteredCache"><inject bean="HAPartition" property="clusteredCache"/></attribute>
<!-- The thread pool used to control the bootstrap and auto discovery lookups -->
<attribute name="LookupPool"><inject bean="jboss.system:service=ThreadPool"/></attribute>
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2008-05-02 01:00:41 UTC (rev 72967)
@@ -46,6 +46,7 @@
import javax.naming.StringRefAddr;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheManager;
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
import org.jboss.ha.framework.interfaces.DistributedState;
@@ -55,10 +56,11 @@
import org.jboss.logging.Logger;
import org.jboss.naming.NonSerializableFactory;
import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.system.server.ServerConfigUtil;
+import org.jboss.util.threadpool.ThreadPool;
import org.jgroups.Channel;
import org.jgroups.ChannelFactory;
import org.jgroups.ExtendedMessageListener;
-//import org.jgroups.JChannel;
import org.jgroups.ExtendedMembershipListener;
import org.jgroups.MembershipListener;
import org.jgroups.MergeView;
@@ -90,6 +92,8 @@
AsynchEventHandler.AsynchEventProcessor,
ClusterPartitionMBean
{
+ public static final String DEFAULT_CACHE_CONFIG = "ha-partition";
+
private static final byte EOF_VALUE = -1;
private static final byte NULL_VALUE = 0;
private static final byte SERIALIZABLE_VALUE = 1;
@@ -135,6 +139,24 @@
return payload;
}
}
+
+ private class ChannelConnectTask implements Runnable
+ {
+ public void run()
+ {
+ try
+ {
+ channel.connect(getPartitionName());
+ }
+ catch (Exception e)
+ {
+ synchronized (channelLock)
+ {
+ connectException = e;
+ }
+ }
+ }
+ }
// Constants -----------------------------------------------------
@@ -142,7 +164,20 @@
// Attributes ----------------------------------------------------
- protected ClusterPartitionConfig config;
+ private CacheManager cacheManager;
+ private String cacheConfigName = DEFAULT_CACHE_CONFIG;
+ private Cache cache;
+ private ChannelFactory channelFactory;
+ private String stackName;
+ private String partitionName = ServerConfigUtil.getDefaultPartitionName();
+ private boolean deadlock_detection = false;
+ private InetAddress nodeAddress = null;
+ private long state_transfer_timeout=60000;
+ private long method_call_timeout=60000;
+
+ /** Thread pool used to asynchronously start our channel */
+ private ThreadPool threadPool;
+
protected HashMap<String, Object> rpcHandlers = new HashMap<String, Object>();
protected HashMap stateHandlers = new HashMap();
/** Do we send any membership change notifications synchronously? */
@@ -159,7 +194,7 @@
protected ConcurrentHashMap<String, WeakReference<ClassLoader>> clmap =
new ConcurrentHashMap<String, WeakReference<ClassLoader>>();
- public Vector history = null;
+ public Vector history = new Vector();
/** The partition members other than this node */
protected Vector otherMembers = null;
@@ -197,22 +232,26 @@
* An exception occuring upon fetch serviceState.
*/
protected Exception setStateException;
+ /**
+ * An exception occuring during channel connect
+ */
+ protected Exception connectException;
private final Object channelLock = new Object();
private final MessageListenerAdapter messageListener = new MessageListenerAdapter();
// Static --------------------------------------------------------
- private static Channel createMuxChannel(ClusterPartitionConfig config)
+ private Channel createChannel()
{
- ChannelFactory factory = config.getChannelFactory();
+ ChannelFactory factory = getChannelFactory();
if (factory == null)
throw new IllegalStateException("HAPartitionConfig has no JChannelFactory");
- String stack = config.getChannelStackName();
+ String stack = getChannelStackName();
if (stack == null)
throw new IllegalStateException("HAPartitionConfig has no multiplexer stack");
try
{
- return factory.createMultiplexerChannel(stack, config.getPartitionName());
+ return factory.createMultiplexerChannel(stack, getPartitionName());
}
catch (RuntimeException e)
{
@@ -226,14 +265,8 @@
// Constructors --------------------------------------------------
- public ClusterPartition(ClusterPartitionConfig config)
+ public ClusterPartition()
{
- if (config == null)
- throw new IllegalArgumentException("config cannot be null");
-
- this.config = config;
- setupLoggers(config.getPartitionName());
- this.history = new Vector();
logHistory ("Partition object created");
}
@@ -243,17 +276,15 @@
protected void createService() throws Exception
{
- if (config == null)
- throw new IllegalArgumentException("config cannot be null");
-
if (replicantManager == null)
throw new IllegalStateException("DistributedReplicantManager property must be set before creating ClusterPartition service");
+
+ setupLoggers(getPartitionName());
replicantManager.createService();
if (distributedState != null)
{
- distributedState.setClusteredCache(getClusteredCache());
distributedState.createService();
}
@@ -267,12 +298,16 @@
{
logHistory ("Starting partition");
+ cache = cacheManager.getCache(cacheConfigName, true);
+ channelFactory = cache.getConfiguration().getRuntimeConfig().getMuxChannelFactory();
+ stackName = cache.getConfiguration().getMultiplexerStack();
+
if (channel == null || !channel.isOpen())
{
- log.debug("Creating Multiplexer Channel for partition " + getPartitionName() +
+ log.debug("Creating Channel for partition " + getPartitionName() +
" using stack " + getChannelStackName());
- channel = createMuxChannel(config);
+ channel = createChannel();
channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE);
channel.setOpt(Channel.AUTO_GETSTATE, Boolean.TRUE);
@@ -281,7 +316,7 @@
log.info("Initializing partition " + getPartitionName());
logHistory ("Initializing partition " + getPartitionName());
- dispatcher = new RpcHandler(channel, null, null, new Object(), config.getDeadlockDetection());
+ dispatcher = new RpcHandler(channel, null, null, new Object(), getDeadlockDetection());
// Subscribe to events generated by the channel
log.debug("setMembershipListener");
@@ -291,19 +326,32 @@
dispatcher.setRequestMarshaller(new RequestMarshallerImpl());
dispatcher.setResponseMarshaller(new ResponseMarshallerImpl());
- channel.connect(getPartitionName());
+ if (threadPool == null)
+ {
+ channel.connect(getPartitionName());
+ }
+ else
+ {
+ // Do the channel connect in another thread while this
+ // thread starts the cache and does that channel connect
+ ChannelConnectTask task = new ChannelConnectTask();
+ threadPool.run(task);
+ }
+ cache.start();
+
try
{
+ log.debug("Get current members");
+ // This will block waiting for any async channel connect above
+ waitForView();
+
// get current JG group properties
log.debug("get nodeName");
this.localJGAddress = (IpAddress)channel.getLocalAddress();
this.me = new ClusterNodeImpl(this.localJGAddress);
this.nodeName = this.me.getName();
- log.debug("Get current members");
- waitForView();
-
verifyNodeIsUnique();
fetchState();
@@ -312,6 +360,7 @@
if (distributedState != null)
{
+ distributedState.setClusteredCache(getClusteredCache());
distributedState.startService();
}
@@ -372,6 +421,15 @@
{
log.error("channel disconnection failed", e);
}
+
+ try
+ {
+ cacheManager.releaseCache(cacheConfigName);
+ }
+ catch (Exception e)
+ {
+ log.error("cache release failed", e);
+ }
if (bindIntoJndi)
{
@@ -749,6 +807,9 @@
{
if (this.members == null)
{
+ if (connectException != null)
+ throw connectException;
+
try
{
channelLock.wait(getMethodCallTimeout());
@@ -757,6 +818,9 @@
{
}
+ if (connectException != null)
+ throw connectException;
+
if (this.members == null)
throw new IllegalStateException("No view received from Channel");
}
@@ -772,8 +836,13 @@
public String getPartitionName()
{
- return (config == null ? null : config.getPartitionName());
+ return partitionName;
}
+
+ public void setPartitionName(String newName)
+ {
+ partitionName = newName;
+ }
public DistributedReplicantManager getDistributedReplicantManager()
{
@@ -1362,8 +1431,20 @@
{
return bindIntoJndi;
}
+
+
+ public ThreadPool getThreadPool()
+ {
+ return threadPool;
+ }
+
+ public void setThreadPool(ThreadPool threadPool)
+ {
+ this.threadPool = threadPool;
+ }
+
protected Vector translateAddresses (Vector jgAddresses)
{
if (jgAddresses == null)
@@ -1420,14 +1501,19 @@
public Cache getClusteredCache()
{
- return config.getClusteredCache();
+ return cache;
}
-
+
public boolean getDeadlockDetection()
{
- return config.getDeadlockDetection();
+ return deadlock_detection;
}
+ public void setDeadlockDetection(boolean doit)
+ {
+ deadlock_detection = doit;
+ }
+
public HAPartition getHAPartition()
{
return this;
@@ -1440,40 +1526,60 @@
public ChannelFactory getChannelFactory()
{
- return config.getChannelFactory();
+ return channelFactory;
}
- public String getChannelStackName()
+ public CacheManager getCacheManager()
{
- return config.getChannelStackName();
+ return cacheManager;
}
- public InetAddress getNodeAddress()
+ public void setCacheManager(CacheManager cacheManager)
{
- return config.getNodeAddress();
+ this.cacheManager = cacheManager;
}
- public long getStateTransferTimeout() {
- return config.getStateTransferTimeout();
+ public String getCacheConfigName()
+ {
+ return cacheConfigName;
}
- public long getMethodCallTimeout() {
- return config.getMethodCallTimeout();
+ public void setCacheConfigName(String cacheConfigName)
+ {
+ this.cacheConfigName = cacheConfigName;
}
- public void setMethodCallTimeout(long timeout)
+ public String getChannelStackName()
{
- config.setMethodCallTimeout(timeout);
+ return stackName;
}
+ public InetAddress getNodeAddress()
+ {
+ return nodeAddress;
+ }
+
+ public void setNodeAddress(InetAddress address)
+ {
+ this.nodeAddress = address;
+ }
+
+ public long getStateTransferTimeout() {
+ return state_transfer_timeout;
+ }
+
public void setStateTransferTimeout(long timeout)
{
- config.setStateTransferTimeout(timeout);
+ this.state_transfer_timeout = timeout;
}
- public String getNodeUniqueId()
+ public long getMethodCallTimeout() {
+ return method_call_timeout;
+ }
+
+ public void setMethodCallTimeout(long timeout)
{
- return config.getNodeUniqueId();
+ this.method_call_timeout = timeout;
}
// Protected --------------------------------------------------------------
Deleted: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionConfig.java 2008-05-02 01:00:41 UTC (rev 72967)
@@ -1,198 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ha.framework.server;
-
-import java.net.InetAddress;
-
-import org.jboss.cache.Cache;
-import org.jboss.cache.config.Configuration;
-import org.jboss.ha.framework.interfaces.DistributedState;
-import org.jboss.system.server.ServerConfigUtil;
-import org.jgroups.ChannelFactory;
-
-/**
- * Configuration POJO for {@link ClusterPartition}.
- *
- * @author Brian Stansberry
- *
- * @version $Revision: 56922 $
- */
-public class ClusterPartitionConfig
-{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private Cache cache;
- private ChannelFactory channelFactory;
- private DistributedState distributedState;
- private String stackName;
- private String partitionName = ServerConfigUtil.getDefaultPartitionName();
- private boolean deadlock_detection = false;
- private boolean allow_sync_events = false;
- private String nodeUniqueId = null;
- private InetAddress nodeAddress = null;
- private int namingServicePort = -1;
-
- /** Number of milliseconds to wait until state has been transferred. Increase this value for large states
- * 0 = wait forever
- */
- private long state_transfer_timeout=60000;
-
-
- private long method_call_timeout=60000;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public String getPartitionName()
- {
- return partitionName;
- }
-
- public void setPartitionName(String newName)
- {
- partitionName = newName;
- }
-
- /**
- * Uniquely identifies this node. MUST be unique accros the whole cluster!
- * Cannot be changed once the partition has been started
- */
- public String getNodeUniqueId()
- {
- return this.nodeUniqueId;
- }
-
- public void setNodeUniqueId(String node)
- {
- this.nodeUniqueId = node;
- }
-
- public InetAddress getNodeAddress()
- {
- return nodeAddress;
- }
-
- public void setNodeAddress(InetAddress address)
- {
- this.nodeAddress = address;
- }
-
- public long getStateTransferTimeout()
- {
- return state_transfer_timeout;
- }
-
- public void setStateTransferTimeout(long timeout)
- {
- this.state_transfer_timeout=timeout;
- }
-
- public long getMethodCallTimeout() {
- return method_call_timeout;
- }
-
- public void setMethodCallTimeout(long timeout) {
- this.method_call_timeout=timeout;
- }
-
- public boolean getDeadlockDetection()
- {
- return deadlock_detection;
- }
-
- public void setDeadlockDetection(boolean doit)
- {
- deadlock_detection = doit;
- }
-
- public boolean getAllowSynchronousMembershipNotifications()
- {
- return allow_sync_events;
- }
-
- public void setAllowSynchronousMembershipNotifications(boolean allowSync)
- {
- this.allow_sync_events = allowSync;
- }
-
- public ChannelFactory getChannelFactory()
- {
- return channelFactory;
- }
-
- public String getChannelStackName()
- {
- return stackName;
- }
-
- public Cache getClusteredCache()
- {
- return cache;
- }
-
- /**
- * Sets the Cache used by this partition for state management.
- *
- * <strong>NOTE:</strong> The cache must be configured to use a JGroups
- * multiplexer channel.
- * @param cache the cache
- *
- * @throws IllegalArgumentException if the cache is not configured to use a multiplexer
- * @throws NullPointerException if cache is <code>null</code>
- */
- public void setClusteredCache(Cache cache)
- {
- this.cache = cache;
- Configuration config = cache.getConfiguration();
- channelFactory = config.getRuntimeConfig().getMuxChannelFactory();
-
- if (channelFactory == null)
- throw new IllegalArgumentException("Cache not configured for a multiplexer");
-
- this.stackName = config.getMultiplexerStack();
- }
-
- public int getNamingServicePort()
- {
- return namingServicePort;
- }
-
- public void setNamingServicePort(int namingServicePort)
- {
- this.namingServicePort = namingServicePort;
- }
-
- public DistributedState getDistributedState()
- {
- return distributedState;
- }
-
- public void setDistributedState(DistributedState distributedState)
- {
- this.distributedState = distributedState;
- }
-}
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartitionMBean.java 2008-05-02 01:00:41 UTC (rev 72967)
@@ -27,6 +27,7 @@
import javax.management.ObjectName;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheManager;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
import org.jboss.ha.framework.interfaces.DistributedState;
import org.jboss.ha.framework.interfaces.HAPartition;
@@ -59,7 +60,7 @@
* Uniquely identifies this node. MUST be unique accros the whole cluster!
* Cannot be changed once the partition has been started (otherwise an exception is thrown)
*/
- String getNodeUniqueId();
+ String getNodeName();
/**
* The node address used to generate the node name
@@ -81,11 +82,6 @@
void setMethodCallTimeout(long timeout);
-
-// boolean getChannelDebugger();
-// void setChannelDebugger(boolean flag);
-
-
/**
* Determine if deadlock detection is enabled
*/
@@ -105,6 +101,7 @@
* is <code>false</code>.
*/
public boolean getAllowSynchronousMembershipNotifications();
+
/**
* Sets whether this partition will synchronously notify any
* HAPartition.HAMembershipListener of membership changes using the
@@ -139,8 +136,21 @@
DistributedState getDistributedStateService();
/**
- * Gets the TreeCache used by this partition for state management.
+ * Gets the CacheManager from which we get our cache.
+ *
+ * @return the cache manager
*/
+ CacheManager getCacheManager();
+
+ /**
+ * Gets the configuration name under which our cache is registered
+ * with the cache manager.
+ */
+ String getCacheConfigName();
+
+ /**
+ * Gets the JBoss Cache used by this partition for state management.
+ */
Cache getClusteredCache();
/**
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2008-05-02 01:00:41 UTC (rev 72967)
@@ -33,14 +33,13 @@
import junit.framework.Test;
import org.jboss.cache.config.Configuration;
-import org.jboss.cache.config.RuntimeConfig;
-import org.jboss.cache.jmx.CacheJmxWrapper;
+import org.jboss.ha.cachemanager.CacheManager;
+import org.jboss.ha.cachemanager.DependencyInjectedConfigurationRegistry;
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener;
import org.jboss.ha.framework.server.ClusterNodeImpl;
import org.jboss.ha.framework.server.ClusterPartition;
-import org.jboss.ha.framework.server.ClusterPartitionConfig;
import org.jboss.ha.framework.server.DistributedReplicantManagerImpl;
import org.jboss.ha.framework.server.DistributedStateImpl;
import org.jboss.ha.framework.server.JChannelFactory;
@@ -516,81 +515,68 @@
router.start();
Thread.sleep(10000);
- Configuration cacheConfig1 = new Configuration();
- cacheConfig1.setMultiplexerStack(stackName);
- RuntimeConfig cacheRuntimeConfig1 = new RuntimeConfig();
JChannelFactory factory1 = new JChannelFactory();
factory1.setMultiplexerConfig(muxFile);
factory1.setNamingServicePort(1099);
factory1.setNodeName("node1");
- cacheRuntimeConfig1.setMuxChannelFactory(factory1);
- cacheConfig1.setRuntimeConfig(cacheRuntimeConfig1);
- CacheJmxWrapper wrapper1 = new CacheJmxWrapper();
- wrapper1.setConfiguration(cacheConfig1);
- wrapper1.create();
- wrapper1.start();
+
+ Configuration cacheConfig1 = new Configuration();
+ cacheConfig1.setMultiplexerStack(stackName);
+ DependencyInjectedConfigurationRegistry registry1 = new DependencyInjectedConfigurationRegistry();
+ registry1.registerConfiguration("config1", cacheConfig1);
+
+ CacheManager cacheManager1 = new CacheManager(registry1, factory1);
+
DistributedStateImpl ds1 = new DistributedStateImpl();
- ds1.setClusteredCache(wrapper1.getCache());
DistributedReplicantManagerImpl drm1 = new DistributedReplicantManagerImpl();
- ClusterPartitionConfig config1 = new ClusterPartitionConfig();
- config1.setPartitionName(partitionName);
- config1.setNodeUniqueId("DRMTestCaseNode1");
- config1.setClusteredCache(wrapper1.getCache());
- config1.setStateTransferTimeout(30000);
- config1.setMethodCallTimeout(60000);
- ClusterPartition partition1 = new ClusterPartition(config1);
+ ClusterPartition partition1 = new ClusterPartition();
+ partition1.setPartitionName(partitionName);
+ partition1.setCacheManager(cacheManager1);
+ partition1.setCacheConfigName("config1");
+ partition1.setStateTransferTimeout(30000);
+ partition1.setMethodCallTimeout(60000);
partition1.setDistributedReplicantManagerImpl(drm1);
partition1.setDistributedStateImpl(ds1);
partition1.setBindIntoJndi(false);
- // handle circular dependency between HAPartition and DRM
- partition1.create();
- ((DistributedReplicantManagerImpl)drm1).setHAPartition(partition1);
- ((DistributedReplicantManagerImpl)drm1).createService();
-
+ partition1.create();
partition1.start();
Thread.sleep(10000);
- Configuration cacheConfig2 = new Configuration();
- cacheConfig2.setMultiplexerStack(stackName);
- RuntimeConfig cacheRuntimeConfig2 = new RuntimeConfig();
JChannelFactory factory2 = new JChannelFactory();
factory2.setMultiplexerConfig(muxFile);
factory2.setNamingServicePort(1099);
factory1.setNodeName("node2");
- cacheRuntimeConfig2.setMuxChannelFactory(factory2);
- cacheConfig2.setRuntimeConfig(cacheRuntimeConfig2);
- CacheJmxWrapper wrapper2 = new CacheJmxWrapper();
- wrapper2.setConfiguration(cacheConfig2);
- wrapper2.create();
- wrapper2.start();
+ Configuration cacheConfig2 = new Configuration();
+ cacheConfig2.setMultiplexerStack(stackName);
+
+ DependencyInjectedConfigurationRegistry registry2 = new DependencyInjectedConfigurationRegistry();
+ registry1.registerConfiguration("config2", cacheConfig2);
+
+ CacheManager cacheManager2 = new CacheManager(registry2, factory2);
+
DistributedStateImpl ds2 = new DistributedStateImpl();
- ds2.setClusteredCache(wrapper2.getCache());
DistributedReplicantManagerImpl drm2 = new DistributedReplicantManagerImpl();
- ClusterPartitionConfig config2 = new ClusterPartitionConfig();
- config2.setPartitionName(partitionName);
- config2.setNodeUniqueId("DRMTestCaseNode2");
- config2.setClusteredCache(wrapper2.getCache());
- config2.setStateTransferTimeout(30000);
- config2.setMethodCallTimeout(60000);
- ClusterPartition partition2 = new ClusterPartition(config2);
+ ClusterPartition partition2 = new ClusterPartition();
+ partition2.setPartitionName(partitionName);
+ partition2.setCacheManager(cacheManager2);
+ partition2.setCacheConfigName("config2");
+ partition2.setStateTransferTimeout(30000);
+ partition2.setMethodCallTimeout(60000);
partition2.setDistributedReplicantManagerImpl(drm2);
partition2.setDistributedStateImpl(ds2);
partition2.setBindIntoJndi(false);
- // handle circular dependency between HAPartition and DRM
- partition2.create();
- ((DistributedReplicantManagerImpl)drm2).setHAPartition(partition2);
- ((DistributedReplicantManagerImpl)drm2).createService();
-
+ partition2.create();
partition2.start();
+
Thread.sleep(10000);
// confirm that each partition contains two nodes
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/hapartition/state/StartupTestClusterPartition.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/hapartition/state/StartupTestClusterPartition.java 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/hapartition/state/StartupTestClusterPartition.java 2008-05-02 01:00:41 UTC (rev 72967)
@@ -24,7 +24,6 @@
import java.util.List;
import org.jboss.ha.framework.server.ClusterPartition;
-import org.jboss.ha.framework.server.ClusterPartitionConfig;
/**
* ClusterPartition that catches and saves any exceptions thrown in start().
@@ -39,11 +38,6 @@
private HAPartitionRecorderMBean startupRecorder;
private List<HAPartitionStateTransferMBean> stateTransferTargets;
- public StartupTestClusterPartition(ClusterPartitionConfig config)
- {
- super(config);
- }
-
public HAPartitionRecorderMBean getStartupRecorder()
{
return startupRecorder;
Modified: trunk/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-beans.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/resources/cluster/ejb2/passexp/META-INF/partition-passexp-beans.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -39,12 +39,26 @@
class="org.jboss.cache.config.Configuration">
<depends>PassExpStackInjector</depends>
+
+ <!-- When we're installed, register ourself -->
+ <install bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>passexp-partition</parameter>
+ <parameter><this/></parameter>
+ </install>
+
+ <!-- When we're uninstalled, unregister ourself -->
+ <uninstall bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>passexp-partition</parameter>
+ </uninstall>
+ <!-- The ClusterPartition beans need to wait until we are completely
+ installed and have register ourself -->
+ <supply>PassExpPartitionCacheConfigSupply</supply>
+
<!-- Externally injected services -->
<property name="runtimeConfig">
<bean name="PassExpPartition-HAPartitionCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
</bean>
</property>
@@ -85,14 +99,6 @@
<property name="exposeManagementStatistics">true</property>
</bean>
-
- <!-- Add a handle to the cache to JMX -->
- <bean name="PassExpPartition-HAPartitionCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=HAPartitionCache,partitionName=PassExpPartition", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
-
- <property name="configuration"><inject bean="PassExpPartition-HAPartitionCacheConfig"/></property>
-
- </bean>
<!-- ==================================================================== -->
<!-- DistributedState Service, a legacy wrapper around JBoss Cache -->
@@ -109,34 +115,26 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=PassExpPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <constructor>
- <parameter>
- <bean name="PassExpPartition-ClusterPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
+ <demand>PassExpPartitionCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">passexp-partition</property>
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="PassExpPartition-HAPartitionCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">PassExpPartition</property>
+ <!-- Name of the partition being built -->
+ <property name="partitionName">PassExpPartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">30000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">30000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">60000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">60000</property>
<property name="distributedReplicantManagerImpl">
<bean name="PassExpPartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
@@ -148,7 +146,6 @@
<bean name="PassExpDistributedState"
class="org.jboss.ha.framework.server.DistributedStateImpl">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedState,partitionName=PassExpPartition", exposedInterface=org.jboss.ha.framework.server.DistributedStateImplMBean.class, registerDirectly=true)</annotation>
- <property name="clusteredCache"><inject bean="PassExpPartition-HAPartitionCache" property="cache"/></property>
</bean>
</property>
@@ -186,7 +183,7 @@
<depends>PassExpPartition</depends>
<property name="HAPartition"><inject bean="PassExpPartition"/></property>
- <property name="clusteredCache"><inject bean="PassExpPartition-HAPartitionCache" property="cache"/></property>
+ <property name="clusteredCache"><inject bean="PassExpPartition" property="clusteredCache"/></property>
<!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
<property name="bindAddress">${jboss.bind.address}</property>
Modified: trunk/testsuite/src/resources/cluster/hasingleton/electionpolicy/ha-electionpolicy-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/hasingleton/electionpolicy/ha-electionpolicy-beans.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/resources/cluster/hasingleton/electionpolicy/ha-electionpolicy-beans.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -247,13 +247,27 @@
</bean>
<bean name="ElectionPolicyTestCacheConfig"
- class="org.jboss.cache.config.Configuration">
+ class="org.jboss.cache.config.Configuration">
+
+ <!-- When we're installed, register ourself -->
+ <install bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>election-policy</parameter>
+ <parameter><this/></parameter>
+ </install>
+
+ <!-- When we're uninstalled, unregister ourself -->
+ <uninstall bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>relection-policy</parameter>
+ </uninstall>
+
+ <!-- The ClusterPartition beans need to wait until we are completely
+ installed and have register ourself -->
+ <supply>ElectionPolicyCacheConfigSupply</supply>
<!-- Externally injected services -->
<property name="runtimeConfig">
<bean name="ElectionPolicyTestCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
</bean>
</property>
@@ -301,15 +315,7 @@
<property name="exposeManagementStatistics">true</property>
- </bean>
-
- <bean name="ElectionPolicyTestCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache.test:service=ElectionPolicyTestCache", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
-
- <property name="configuration"><inject bean="ElectionPolicyTestCacheConfig"/></property>
-
- </bean>
+ </bean>
<!-- ==================================================================== -->
@@ -319,34 +325,26 @@
<bean name="ElectionPolicyTestPartition"
class="org.jboss.ha.framework.server.ClusterPartition">
- <constructor>
- <parameter>
- <bean name="ElectionPolicyTestPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
-
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="ElectionPolicyTestCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">ElectionPolicyTestPartition</property>
+ <demand>ElectionPolicyCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">election-policy</property>
+
+ <!-- Name of the partition being built -->
+ <property name="partitionName">ElectionPolicyTestPartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">2000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">2000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">5000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">5000</property>
<property name="distributedReplicantManagerImpl">
<bean name="ElectionPolicyTestPartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
Modified: trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/resources/cluster/partition/jboss-beans.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -12,13 +12,27 @@
<!-- First we create a Configuration object for the cache -->
<bean name="HAPartitionStateTransferTestCacheConfig"
- class="org.jboss.cache.config.Configuration">
+ class="org.jboss.cache.config.Configuration">
+
+ <!-- When we're installed, register ourself -->
+ <install bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>ha-partition-state-transfer</parameter>
+ <parameter><this/></parameter>
+ </install>
+
+ <!-- When we're uninstalled, unregister ourself -->
+ <uninstall bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>ha-partition-state-transfer</parameter>
+ </uninstall>
+
+ <!-- The ClusterPartition beans need to wait until we are completely
+ installed and have register ourself -->
+ <supply>HAPartitionStateTransferTestCacheConfigSupply</supply>
<!-- Externally injected services -->
<property name="runtimeConfig">
<bean name="HAPartitionStateTransferTestCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
</bean>
</property>
@@ -57,15 +71,7 @@
<property name="exposeManagementStatistics">true</property>
- </bean>
-
- <!-- Add a handle to the cache to JMX -->
- <bean name="HAPartitionStateTransferTestCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=HAPartitionCache,partitionName=HAPartitionStateTransferTest", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
-
- <property name="configuration"><inject bean="HAPartitionStateTransferTestCacheConfig"/></property>
-
- </bean>
+ </bean>
<!-- ==================================================================== -->
<!-- Partition used for testing failure to receive state -->
@@ -79,39 +85,29 @@
<bean name="BadProviderPartition"
class="org.jboss.test.cluster.hapartition.state.StartupTestClusterPartition">
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=BadProviderPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
-
- <!--demand state="Start">BadHAPartitionStateTransfer,returnState=false</demand-->
-
- <constructor>
- <parameter>
- <bean name="BadProviderPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=BadProviderPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
+
+ <demand>HAPartitionStateTransferTestCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition-state-transfer</property>
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="HAPartitionStateTransferTestCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">BadProviderPartition</property>
+ <!-- Name of the partition being built -->
+ <property name="partitionName">BadProviderPartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">2000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">2000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">5000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">5000</property>
<property name="distributedReplicantManagerImpl">
@@ -137,10 +133,6 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.test:service=BadHAPartitionStateTransfer,returnState=false", exposedInterface=org.jboss.test.cluster.hapartition.state.BadHAPartitionStateTransferMBean.class, registerDirectly=true)</annotation>
- <supply>BadHAPartitionStateTransfer,returnState=false</supply>
-
- <!--property name="HAPartition"><inject bean="BadProviderPartition" state="Instantiated"/></property-->
-
<property name="returnState">false</property>
<property name="serviceHAName">BadHAPartitionStateTransfer,returnState=false</property>
@@ -161,36 +153,26 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=BadStatePartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <!--demand state="Start">BadHAPartitionStateTransfer,returnState=true</demand-->
-
- <constructor>
- <parameter>
- <bean name="BadStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
-
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="HAPartitionStateTransferTestCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">BadStatePartition</property>
+ <demand>HAPartitionStateTransferTestCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition-state-transfer</property>
+
+ <!-- Name of the partition being built -->
+ <property name="partitionName">BadStatePartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">2000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">2000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">5000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">5000</property>
<property name="distributedReplicantManagerImpl">
<bean name="BadStatePartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
@@ -212,12 +194,8 @@
<bean name="BadHAPartitionStateTransfer,returnState=true"
class="org.jboss.test.cluster.hapartition.state.BadHAPartitionStateTransfer">
- <supply>BadHAPartitionStateTransfer,returnState=true</supply>
-
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.test:service=BadHAPartitionStateTransfer,returnState=true", exposedInterface=org.jboss.test.cluster.hapartition.state.BadHAPartitionStateTransferMBean.class, registerDirectly=true)</annotation>
- <!--property name="HAPartition"><inject bean="BadStatePartition" state="Instantiated"/></property-->
-
<property name="returnState">true</property>
<property name="serviceHAName">BadHAPartitionStateTransfer,returnState=true</property>
@@ -238,34 +216,26 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=NoStatePartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <constructor>
- <parameter>
- <bean name="NoStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
-
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="HAPartitionStateTransferTestCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">NoStatePartition</property>
+ <demand>HAPartitionStateTransferTestCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition-state-transfer</property>
+
+ <!-- Name of the partition being built -->
+ <property name="partitionName">NoStatePartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">2000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">2000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">5000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">5000</property>
<property name="distributedReplicantManagerImpl">
<bean name="NoStatePartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
@@ -292,39 +262,26 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=GoodStatePartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <!--demand state="Start">SimpleHAPartitionStateTransfer</demand-->
- <depends>SimpleHAPartitionStateTransfer</depends>
- <!--demand state="Start">CustomStateHAPartitionStateTransfer</demand-->
- <depends>CustomStateHAPartitionStateTransfer</depends>
-
- <constructor>
- <parameter>
- <bean name="GoodStatePartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
-
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="HAPartitionStateTransferTestCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">GoodStatePartition</property>
+ <demand>HAPartitionStateTransferTestCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">ha-partition-state-transfer</property>
+
+ <!-- Name of the partition being built -->
+ <property name="partitionName">GoodStatePartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">2000</property>
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">2000</property>
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">5000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">5000</property>
<property name="distributedReplicantManagerImpl">
<bean name="GoodStatePartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
@@ -346,8 +303,6 @@
<bean name="SimpleHAPartitionStateTransfer"
class="org.jboss.test.cluster.hapartition.state.SimpleHAPartitionStateTransfer">
- <supply>SimpleHAPartitionStateTransfer</supply>
-
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.test:service=SimpleHAPartitionStateTransfer", exposedInterface=org.jboss.test.cluster.hapartition.state.SimpleHAPartitionStateTransferMBean.class, registerDirectly=true)</annotation>
<!--property name="HAPartition"><inject bean="GoodStatePartition" state="Instantiated"/></property-->
@@ -358,8 +313,6 @@
<bean name="CustomStateHAPartitionStateTransfer"
class="org.jboss.test.cluster.hapartition.state.CustomStateHAPartitionStateTransfer">
- <supply>CustomStateHAPartitionStateTransfer</supply>
-
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.test:service=CustomStateHAPartitionStateTransfer", exposedInterface=org.jboss.test.cluster.hapartition.state.CustomStateHAPartitionStateTransferMBean.class, registerDirectly=true)</annotation>
<!--property name="HAPartition"><inject bean="GoodStatePartition" state="Instantiated"/></property-->
Deleted: trunk/testsuite/src/resources/cluster/partition/jboss-service.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/partition/jboss-service.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/resources/cluster/partition/jboss-service.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Sample Clustering Service Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<server>
-
- <!-- ClusterPartition requires a TreeCache for state management -->
- <mbean code="org.jboss.cache.TreeCache"
- name="jboss:service=ClusterTreeCache,partition=StateTransferTestPartition">
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
-
- <!--JGroups multiplexer is required for this cache -->
- <depends>jgroups.mux:name=Multiplexer</depends>
- <attribute name="MultiplexerService">jgroups.mux:name=Multiplexer</attribute>
- <attribute name="MultiplexerStack">${jboss.multiplexer.stack:udp}</attribute>
-
- <!-- Name of cluster. Needs to be the same for all nodes in clusters,
- in order to find each other -->
- <attribute name="ClusterName">BadPartition-TreeCache</attribute>
-
-
- <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
-
- <!-- Valid isolation levels are
- SERIALIZABLE
- REPEATABLE_READ (default)
- READ_COMMITTED
- READ_UNCOMMITTED
- NONE
- -->
- <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
-
- <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
- <attribute name="CacheMode">REPL_SYNC</attribute>
-
- <!-- Just used for async repl: use a replication queue -->
- <attribute name="UseReplQueue">false</attribute>
-
- <!-- Replication interval for replication queue (in ms) -->
- <attribute name="ReplQueueInterval">0</attribute>
-
- <!-- Max number of elements which trigger replication -->
- <attribute name="ReplQueueMaxElements">0</attribute>
-
- <!-- Whether or not to fetch state on joining a cluster -->
- <attribute name="FetchInMemoryState">true</attribute>
-
- <!-- The max amount of time (in milliseconds) we wait until the
- initial state (ie. the contents of the cache) are retrieved from
- existing members in a clustered environment -->
- <attribute name="StateRetrievalTimeout">5000</attribute>
-
- <!-- Number of milliseconds to wait until all responses for a
- synchronous call have been received. -->
- <attribute name="SyncReplTimeout">10000</attribute>
-
- <!-- Max number of milliseconds to wait for a lock acquisition -->
- <attribute name="LockAcquisitionTimeout">15000</attribute>
-
- <!-- Name of the eviction policy class. Not supported now. -->
- <attribute name="EvictionPolicyClass"></attribute>
-
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Partition used for testing failure to receive state -->
- <!-- ==================================================================== -->
-
-
- <!-- Service to record and cache any failures in the partition -->
- <mbean code="org.jboss.test.cluster.partition.HAPartitionRecorder"
- name="jboss:service=BadProviderPartitionRecorder"/>
-
- <mbean code="org.jboss.test.cluster.partition.StartupTestClusterPartition"
- name="jboss:service=BadProviderPartition">
-
- <depends optional-attribute-name="StartupRecorder"
- proxy-type="attribute">jboss:service=BadProviderPartitionRecorder</depends>
-
- <!-- ClusterPartition requires a TreeCache for state management -->
- <depends optional-attribute-name="TreeCache"
- proxy-type="attribute">jboss:service=ClusterTreeCache,partition=StateTransferTestPartition</depends>
-
- <!-- Name of the partition being built -->
- <attribute name="PartitionName">BadProviderPartition</attribute>
-
- <!-- The address used to determine the node name -->
- <attribute name="NodeAddress">${jboss.bind.address}</attribute>
-
- <!-- Determine if deadlock detection is enabled -->
- <attribute name="DeadlockDetection">False</attribute>
-
- <!-- Keep this timeout short -->
- <attribute name="StateTransferTimeout">2000</attribute>
-
- </mbean>
-
- <mbean code="org.jboss.test.cluster.partition.BadHAPartitionStateTransfer"
- name="jboss.test:service=BadHAPartitionStateTransfer,returnState=false">
-
- <depends optional-attribute-name="ClusterPartition"
- proxy-type="attribute">jboss:service=BadProviderPartition</depends>
-
- <attribute name="ReturnState">false</attribute>
-
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Partition used for testing failure to integrate state -->
- <!-- ==================================================================== -->
-
-
- <!-- Service to record and cache any failures in the partition -->
- <mbean code="org.jboss.test.cluster.partition.HAPartitionRecorder"
- name="jboss:service=BadStatePartitionRecorder"/>
-
- <mbean code="org.jboss.test.cluster.partition.StartupTestClusterPartition"
- name="jboss:service=BadStatePartition">
-
- <depends optional-attribute-name="StartupRecorder"
- proxy-type="attribute">jboss:service=BadStatePartitionRecorder</depends>
-
- <!-- ClusterPartition requires a TreeCache for state management -->
- <depends optional-attribute-name="TreeCache"
- proxy-type="attribute">jboss:service=ClusterTreeCache,partition=StateTransferTestPartition</depends>
-
- <!-- Name of the partition being built -->
- <attribute name="PartitionName">BadStatePartition</attribute>
-
- <!-- The address used to determine the node name -->
- <attribute name="NodeAddress">${jboss.bind.address}</attribute>
-
- <!-- Determine if deadlock detection is enabled -->
- <attribute name="DeadlockDetection">False</attribute>
-
- <!-- Keep this timeout short -->
- <attribute name="StateTransferTimeout">2000</attribute>
-
- </mbean>
-
- <mbean code="org.jboss.test.cluster.partition.BadHAPartitionStateTransfer"
- name="jboss.test:service=BadHAPartitionStateTransfer,returnState=true">
-
- <depends optional-attribute-name="ClusterPartition"
- proxy-type="attribute">jboss:service=BadStatePartition</depends>
-
- <attribute name="ReturnState">true</attribute>
-
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Partition used for testing no state -->
- <!-- ==================================================================== -->
-
-
- <!-- Service to record and cache any failures in the partition -->
- <mbean code="org.jboss.test.cluster.partition.HAPartitionRecorder"
- name="jboss:service=NoStatePartitionRecorder"/>
-
- <mbean code="org.jboss.test.cluster.partition.StartupTestClusterPartition"
- name="jboss:service=NoStatePartition">
-
- <depends optional-attribute-name="StartupRecorder"
- proxy-type="attribute">jboss:service=NoStatePartitionRecorder</depends>
-
- <!-- ClusterPartition requires a TreeCache for state management -->
- <depends optional-attribute-name="TreeCache"
- proxy-type="attribute">jboss:service=ClusterTreeCache,partition=StateTransferTestPartition</depends>
-
- <!-- Name of the partition being built -->
- <attribute name="PartitionName">NoStatePartition</attribute>
-
- <!-- The address used to determine the node name -->
- <attribute name="NodeAddress">${jboss.bind.address}</attribute>
-
- <!-- Determine if deadlock detection is enabled -->
- <attribute name="DeadlockDetection">False</attribute>
-
- <!-- Keep this timeout short -->
- <attribute name="StateTransferTimeout">2000</attribute>
-
- </mbean>
-
- <!-- ==================================================================== -->
- <!-- Partition used for testing successful state transfer -->
- <!-- ==================================================================== -->
-
-
- <!-- Service to record and cache any failures in the partition -->
- <mbean code="org.jboss.test.cluster.partition.HAPartitionRecorder"
- name="jboss:service=GoodStatePartitionRecorder"/>
-
- <mbean code="org.jboss.test.cluster.partition.StartupTestClusterPartition"
- name="jboss:service=GoodStatePartition">
-
- <depends optional-attribute-name="StartupRecorder"
- proxy-type="attribute">jboss:service=GoodStatePartitionRecorder</depends>
-
- <!-- ClusterPartition requires a TreeCache for state management -->
- <depends optional-attribute-name="TreeCache"
- proxy-type="attribute">jboss:service=ClusterTreeCache,partition=StateTransferTestPartition</depends>
-
- <!-- Name of the partition being built -->
- <attribute name="PartitionName">GoodStatePartition</attribute>
-
- <!-- The address used to determine the node name -->
- <attribute name="NodeAddress">${jboss.bind.address}</attribute>
-
- <!-- Determine if deadlock detection is enabled -->
- <attribute name="DeadlockDetection">False</attribute>
-
- <!-- Keep this timeout short -->
- <attribute name="StateTransferTimeout">2000</attribute>
-
- </mbean>
-
- <mbean code="org.jboss.test.cluster.partition.SimpleHAPartitionStateTransfer"
- name="jboss.test:service=SimpleHAPartitionStateTransfer">
-
- <depends optional-attribute-name="ClusterPartition"
- proxy-type="attribute">jboss:service=GoodStatePartition</depends>
-
- </mbean>
-
- <mbean code="org.jboss.test.cluster.partition.CustomStateHAPartitionStateTransfer"
- name="jboss.test:service=CustomStateHAPartitionStateTransfer">
-
- <depends optional-attribute-name="ClusterPartition"
- proxy-type="attribute">jboss:service=GoodStatePartition</depends>
-
- </mbean>
-
-</server>
Modified: trunk/testsuite/src/resources/cluster/partition/partition-restart-beans.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/partition/partition-restart-beans.xml 2008-05-02 00:59:05 UTC (rev 72966)
+++ trunk/testsuite/src/resources/cluster/partition/partition-restart-beans.xml 2008-05-02 01:00:41 UTC (rev 72967)
@@ -29,12 +29,26 @@
<!-- First we create a Configuration object for the cache -->
<bean name="RestartPartition-HAPartitionCacheConfig"
class="org.jboss.cache.config.Configuration">
+
+ <!-- When we're installed, register ourself -->
+ <install bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>restart-partition</parameter>
+ <parameter><this/></parameter>
+ </install>
+
+ <!-- When we're uninstalled, unregister ourself -->
+ <uninstall bean="CacheConfigurationRegistry" method="registerConfiguration">
+ <parameter>restart-partition</parameter>
+ </uninstall>
+ <!-- The ClusterPartition beans need to wait until we are completely
+ installed and have register ourself -->
+ <supply>RestartPartitionCacheConfigSupply</supply>
+
<!-- Externally injected services -->
<property name="runtimeConfig">
<bean name="RestartPartition-HAPartitionCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
<property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
- <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
</bean>
</property>
@@ -74,14 +88,6 @@
<property name="exposeManagementStatistics">true</property>
</bean>
-
- <!-- Add a handle to the cache to JMX -->
- <bean name="RestartPartition-HAPartitionCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=HAPartitionCache,partitionName=RestartPartition", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
-
- <property name="configuration"><inject bean="RestartPartition-HAPartitionCacheConfig"/></property>
-
- </bean>
<!-- ==================================================================== -->
<!-- DistributedState Service, a legacy wrapper around JBoss Cache -->
@@ -98,34 +104,26 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=RestartPartition", exposedInterface=org.jboss.ha.framework.server.ClusterPartitionMBean.class)</annotation>
- <constructor>
- <parameter>
- <bean name="RestartPartition-ClusterPartitionConfig" class="org.jboss.ha.framework.server.ClusterPartitionConfig">
+ <demand>RestartPartitionCacheConfigSupply</demand>
+
+ <!-- ClusterPartition requires a Cache for state management -->
+ <property name="cacheManager"><inject bean="CacheManager"/></property>
+ <property name="cacheConfigName">restart-partition</property>
- <!-- ClusterPartition requires a Cache for state management -->
- <property name="clusteredCache"><inject bean="RestartPartition-HAPartitionCache" property="cache"/></property>
-
- <!-- Name of the partition being built -->
- <property name="partitionName">RestartPartition</property>
+ <!-- Name of the partition being built -->
+ <property name="partitionName">RestartPartition</property>
- <!-- The address used to determine the node name -->
- <property name="nodeAddress">${jboss.bind.address}</property>
+ <!-- The address used to determine the node name -->
+ <property name="nodeAddress">${jboss.bind.address}</property>
- <!-- Inject the naming service port as an aid in creating a nodeUniqueId. Not needed if nodeUniqueId is set -->
- <property name="namingServicePort"><inject bean="jboss:service=Naming" property="Port"/></property>
-
- <!-- Determine if deadlock detection is enabled -->
- <property name="deadlockDetection">false</property>
+ <!-- Determine if deadlock detection is enabled -->
+ <property name="deadlockDetection">false</property>
+
+ <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
+ <property name="stateTransferTimeout">30000</property>
- <!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
- <property name="stateTransferTimeout">30000</property>
-
- <!-- Max time (in ms) to wait for RPC calls to complete. -->
- <property name="methodCallTimeout">60000</property>
-
- </bean>
- </parameter>
- </constructor>
+ <!-- Max time (in ms) to wait for RPC calls to complete. -->
+ <property name="methodCallTimeout">60000</property>
<property name="distributedReplicantManagerImpl">
<bean name="RestartPartitionDRM" class="org.jboss.ha.framework.server.DistributedReplicantManagerImpl">
@@ -137,7 +135,6 @@
<bean name="RestartDistributedState"
class="org.jboss.ha.framework.server.DistributedStateImpl">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=DistributedState,partitionName=RestartPartition", exposedInterface=org.jboss.ha.framework.server.DistributedStateImplMBean.class, registerDirectly=true)</annotation>
- <property name="clusteredCache"><inject bean="RestartPartition-HAPartitionCache" property="cache"/></property>
</bean>
</property>
@@ -175,7 +172,7 @@
<depends>RestartPartition</depends>
<property name="HAPartition"><inject bean="RestartPartition"/></property>
- <property name="clusteredCache"><inject bean="RestartPartition-HAPartitionCache" property="cache"/></property>
+ <property name="clusteredCache"><inject bean="RestartPartition" property="clusteredCache"/></property>
<!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
<property name="bindAddress">${jboss.bind.address}</property>
More information about the jboss-cvs-commits
mailing list