[jboss-cvs] JBoss Messaging SVN: r2843 - in trunk/src/main/org/jboss/jms: server/connectionfactory and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 4 21:31:16 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-07-04 21:31:15 -0400 (Wed, 04 Jul 2007)
New Revision: 2843
Modified:
trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
Log:
Fixing failoverMapper on Clustered CFs
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-07-04 23:45:50 UTC (rev 2842)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientClusteredConnectionFactoryDelegate.java 2007-07-05 01:31:15 UTC (rev 2843)
@@ -216,7 +216,7 @@
{
if (delegates.length != failoverMap.size())
{
- throw new IllegalStateException("Number of delegates and failover map size are not equal");
+ throw new IllegalStateException("Number of delegates (" + delegates.length + ") and failover map size (" + failoverMap.size() + " )are not equal");
}
}
Modified: trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-07-04 23:45:50 UTC (rev 2842)
+++ trunk/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2007-07-05 01:31:15 UTC (rev 2843)
@@ -321,7 +321,7 @@
else if ((notification.type == ClusterNotification.TYPE_REPLICATOR_PUT || notification.type == ClusterNotification.TYPE_REPLICATOR_REMOVE) &&
(notification.data instanceof String) && ((String)notification.data).startsWith(Replicator.CF_PREFIX))
{
- // A connection factory has been deployed / undeployed
+ // A connection factory has been deployed / undeployed
// NOTE! All connection factories MUST be deployed on all nodes!
// Otherwise the server might failover onto a node which doesn't have that connection factory deployed
@@ -361,8 +361,11 @@
(ClientConnectionFactoryDelegate[])newDels.
toArray(new ClientConnectionFactoryDelegate[newDels.size()]);
+ Map failoverMap = serverPeer.getPostOfficeInstance().getFailoverMap();
+
del.setDelegates(delArr);
-
+ del.setFailoverMap(failoverMap);
+
ServerConnectionFactoryEndpoint endpoint =
(ServerConnectionFactoryEndpoint)endpoints.get(uniqueName);
@@ -372,9 +375,7 @@
}
rebindConnectionFactory(initialContext, endpoint.getJNDIBindings(), del);
-
- Map failoverMap = serverPeer.getPostOfficeInstance().getFailoverMap();
-
+
endpoint.updateClusteredClients(delArr, failoverMap);
}
}
More information about the jboss-cvs-commits
mailing list