[jboss-cvs] JBoss Messaging SVN: r3923 - in branches/Branch_JBossMessaging_1_4_0_SP3_CP/src: etc/xmdesc and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 25 08:56:31 EDT 2008
Author: timfox
Date: 2008-03-25 08:56:30 -0400 (Tue, 25 Mar 2008)
New Revision: 3923
Modified:
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/clustered-hsqldb-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mssql-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mysql-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/null-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/oracle-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/postgresql-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/sybase-persistence-service.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/xmdesc/MessagingPostOffice-xmbean.xml
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/client/container/ClusteringAspect.java
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/server/ServerPeer.java
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/jmx/MessagingPostOfficeService.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-1230
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/clustered-hsqldb-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/clustered-hsqldb-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/clustered-hsqldb-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -83,7 +83,11 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">50000</attribute>
-
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
+
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mssql-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mssql-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mssql-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -145,7 +145,11 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">30000</attribute>
-
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
+
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mysql-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mysql-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/mysql-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -145,6 +145,10 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">300000</attribute>
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/null-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/null-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/null-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -48,7 +48,11 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">300000</attribute>
-
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
+
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/oracle-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/oracle-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/oracle-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -149,7 +149,11 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">30000</attribute>
-
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
+
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/postgresql-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/postgresql-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/postgresql-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -146,17 +146,10 @@
<attribute name="CastTimeout">30000</attribute>
- <!-- Max number of concurrent replications -->
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
- <attribute name="MaxConcurrentReplications">50</attribute>
-
- <!--
- <attribute name="ChannelFactoryName">jgroups.mux:name=Multiplexer</attribute>
- <attribute name="ControlChannelName">udp-sync</attribute>
- <attribute name="DataChannelName">udp</attribute>
- <attribute name="ChannelPartitionName">${jboss.partition.name:DefaultPartition}-JMS</attribute>
- -->
-
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/sybase-persistence-service.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/sybase-persistence-service.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/server/default/deploy/sybase-persistence-service.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -150,7 +150,11 @@
<!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
<attribute name="CastTimeout">30000</attribute>
-
+
+ <!-- Set this to true if you want failover of connections to occur when a node is shut down -->
+
+ <attribute name="FailoverOnNodeLeave">true</attribute>
+
<!-- JGroups stack configuration for the data channel - used for sending data across the cluster -->
<!-- By default we use the TCP stack for data -->
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/xmdesc/MessagingPostOffice-xmbean.xml
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/xmdesc/MessagingPostOffice-xmbean.xml 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/etc/xmdesc/MessagingPostOffice-xmbean.xml 2008-03-25 12:56:30 UTC (rev 3923)
@@ -125,6 +125,12 @@
<type>int</type>
</attribute>
+ <attribute access="read-write" getMethod="isFailoverOnNodeLeave" setMethod="setFailoverOnNodeLeave">
+ <description>If true then failover will occur when a node cleanly leaves the group - i.e. it is cleanly shut down</description>
+ <name>FailoverOnNodeLeave</name>
+ <type>boolean</type>
+ </attribute>
+
<attribute access="read-only" getMethod="getNodeIDView">
<description>Get the set of nodes in the cluster</description>
<name>NodeIDView</name>
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/client/container/ClusteringAspect.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2008-03-25 12:56:30 UTC (rev 3923)
@@ -214,9 +214,6 @@
if (delegate == null)
{
- // the delegate corresponding to the actualServerID not found among the cached
- // delegates. TODO Could this ever happen? Should we send back the cf, or update it
- // instead of just the id??
throw new JMSException("Cannot find a cached connection factory delegate for " +
"node " + actualServerID);
}
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/server/ServerPeer.java 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/jms/server/ServerPeer.java 2008-03-25 12:56:30 UTC (rev 3923)
@@ -341,8 +341,6 @@
return;
}
- log.info(this + " is Stopping. NOTE! Stopping the server peer cleanly will NOT cause failover to occur");
-
started = false;
//Tell the invocation handler we are closed - this is so we don't attempt to handle
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/impl/postoffice/MessagingPostOffice.java 2008-03-25 12:56:30 UTC (rev 3923)
@@ -230,6 +230,8 @@
private ClearableSemaphore replicateSemaphore;
private boolean useJGroupsWorkaround;
+
+ private boolean failoverOnNodeLeave;
// Constructors ---------------------------------------------------------------------------------
@@ -298,7 +300,8 @@
ChannelFactory jChannelFactory,
long stateTimeout, long castTimeout,
boolean supportsFailover,
- int maxConcurrentReplications)
+ int maxConcurrentReplications,
+ boolean failoverOnNodeLeave)
throws Exception
{
this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, officeName, ms, pm, tr,
@@ -306,6 +309,8 @@
this.clustered = true;
+ this.failoverOnNodeLeave = failoverOnNodeLeave;
+
groupMember = new GroupMember(groupName, stateTimeout, castTimeout, jChannelFactory, this, this);
this.supportsFailover = supportsFailover;
@@ -921,9 +926,9 @@
{
throw new IllegalStateException(this + " cannot find node ID for address " + address);
}
+
+ boolean crashed = failoverOnNodeLeave || !leaveMessageReceived(leftNodeID);
- boolean crashed = !leaveMessageReceived(leftNodeID);
-
log.debug(this + ": node " + leftNodeID + " has " + (crashed ? "crashed" : "cleanly left the group"));
Integer fnodeID = (Integer)oldFailoverMap.get(leftNodeID);
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/jmx/MessagingPostOfficeService.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/jmx/MessagingPostOfficeService.java 2008-03-25 12:55:05 UTC (rev 3922)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/src/main/org/jboss/messaging/core/jmx/MessagingPostOfficeService.java 2008-03-25 12:56:30 UTC (rev 3923)
@@ -97,6 +97,8 @@
private boolean clustered;
private int maxConcurrentReplications = 25;
+
+ private boolean failoverOnNodeLeave;
private MessagingPostOffice postOffice;
@@ -314,9 +316,30 @@
public void setMaxConcurrentReplications(int number)
{
+ if (started)
+ {
+ log.warn("Cannot set attribute when service is started");
+ return;
+ }
this.maxConcurrentReplications = number;
}
+ public boolean isFailoverOnNodeLeave()
+ {
+ return failoverOnNodeLeave;
+ }
+
+ public void setFailoverOnNodeLeave(boolean failoverOnNodeLeave)
+ {
+ if (started)
+ {
+ log.warn("Cannot set attribute when service is started");
+ return;
+ }
+ this.failoverOnNodeLeave = failoverOnNodeLeave;
+ }
+
+
public String listBindings()
{
return postOffice.printBindingInformation();
@@ -412,7 +435,8 @@
jChannelFactory,
stateTimeout, castTimeout,
serverPeer.isSupportsFailover(),
- maxConcurrentReplications);
+ maxConcurrentReplications,
+ failoverOnNodeLeave);
}
else
{
More information about the jboss-cvs-commits
mailing list