[jboss-cvs] JBoss Messaging SVN: r1567 - in branches/Branch_Client_Failover_Experiment: src/etc/server/default/deploy src/etc/xmdesc src/main/org/jboss/jms/client src/main/org/jboss/jms/client/ha src/main/org/jboss/jms/server src/main/org/jboss/jms/server/connectionfactory src/main/org/jboss/jms/server/ha src/main/org/jboss/messaging/core/plugin src/main/org/jboss/messaging/core/plugin/contract src/main/org/jboss/messaging/core/plugin/postoffice/cluster tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 16 18:02:23 EST 2006
Author: clebert.suconic at jboss.com
Date: 2006-11-16 18:02:13 -0500 (Thu, 16 Nov 2006)
New Revision: 1567
Added:
branches/Branch_Client_Failover_Experiment/src/etc/xmdesc/ClusteredConnectionFactory-xmbean.xml
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredClientConnectionFactoryDelegateServer.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredConnectionFactoryClient.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java
Modified:
branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml
branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/JBossConnectionFactory.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ServerPeer.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java
branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java
branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java
branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java
branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java
Log:
Adding ClusteredConnectionFactory (Initial version) and adding fields into NodeInformation
Modified: branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/clustered-mysql-persistence-service.xml 2006-11-16 23:02:13 UTC (rev 1567)
@@ -62,6 +62,7 @@
xmbean-dd="xmdesc/ClusteredPostOffice-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+ <depends>jboss.messaging.destination:service=ConnectionFactory</depends>
<depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
<attribute name="PostOfficeName">Clustered Queue</attribute>
<attribute name="DataSource">java:/DefaultDS</attribute>
@@ -126,6 +127,7 @@
xmbean-dd="xmdesc/ClusteredPostOffice-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
+ <depends>jboss.messaging.destination:service=ConnectionFactory</depends>
<depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
<attribute name="PostOfficeName">Clustered Topic</attribute>
<attribute name="DataSource">java:/DefaultDS</attribute>
Modified: branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml 2006-11-16 23:02:13 UTC (rev 1567)
@@ -23,4 +23,21 @@
</attribute>
</mbean>
+
+ <!-- TODO: Move this MBean to its own XML -->
+ <mbean code="org.jboss.jms.server.ha.ClusteredConnectionFactory"
+ name="jboss.messaging.destination:service=ClusteredConnectionFactory"
+ xmbean-dd="xmdesc/ClusteredConnectionFactory-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends optional-attribute-name="ClusteredPostOffice">jboss.messaging:service=QueuePostOffice</depends>
+ <attribute name="JNDIBindings">
+ <bindings>
+ <binding>/HAConnectionFactory</binding>
+ <binding>/HAXAConnectionFactory</binding>
+ <binding>java:/HAConnectionFactory</binding>
+ <binding>java:/HAXAConnectionFactory</binding>
+ </bindings>
+ </attribute>
+ </mbean>
+
</server>
\ No newline at end of file
Added: branches/Branch_Client_Failover_Experiment/src/etc/xmdesc/ClusteredConnectionFactory-xmbean.xml
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/etc/xmdesc/ClusteredConnectionFactory-xmbean.xml 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/etc/xmdesc/ClusteredConnectionFactory-xmbean.xml 2006-11-16 23:02:13 UTC (rev 1567)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE mbean PUBLIC
+ "-//JBoss//DTD JBOSS XMBEAN 1.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_2.dtd">
+
+<!-- $Id: ConnectionFactory-xmbean.xml 1178 2006-08-02 14:57:43 -0600 (Wed, 02 Aug 2006) ovidiu.feodorov at jboss.com $ -->
+
+
+<mbean>
+ <description>A deployable JBoss Messaging Clustered Connection Factory</description>
+ <class>org.jboss.jms.server.ha.ClusteredConnectionFactory</class>
+
+ <!-- Managed constructors -->
+
+ <constructor>
+ <name>ClusteredConnectionFactory</name>
+ </constructor>
+
+ <!-- Managed attributes -->
+
+ <!-- This attribute is writable to allow configuring an arbitrary set of JNDI names in the
+ queue's service deployment descriptor. Any attempt to change the attribute after
+ initialization will be ignored.
+ -->
+ <attribute access="read-write" getMethod="getJNDIBindings" setMethod="setJNDIBindings">
+ <description>The element containing the JNDI bindings this connection factory is to be bound under</description>
+ <name>JNDIBindings</name>
+ <type>org.w3c.dom.Element</type>
+ </attribute>
+
+ <!-- ServerPeer ObjectName is configured as a dependency optional-attribute-name, this is the
+ only reason for this attribute to be writable. Any write attempt on this attribute after
+ initialization will be ignored.
+ -->
+ <attribute access="read-write" getMethod="getServerPeer" setMethod="setServerPeer">
+ <description>The ObjectName of the server peer this destination was deployed on</description>
+ <name>ServerPeer</name>
+ <type>javax.management.ObjectName</type>
+ </attribute>
+
+
+ <attribute access="read-write" getMethod="getClusteredPostOffice" setMethod="setClusteredPostOffice">
+ <description>The ObjectName any clustered post office that will have a list of active nodes in a cluster</description>
+ <name>ClusteredPostOffice</name>
+ <type>javax.management.ObjectName</type>
+ </attribute>
+
+
+ <!-- Managed operations -->
+
+ <operation>
+ <description>JBoss Service lifecycle operation</description>
+ <name>create</name>
+ </operation>
+
+ <operation>
+ <description>JBoss Service lifecycle operation</description>
+ <name>start</name>
+ </operation>
+
+ <operation>
+ <description>JBoss Service lifecycle operation</description>
+ <name>stop</name>
+ </operation>
+
+ <operation>
+ <description>JBoss Service lifecycle operation</description>
+ <name>destroy</name>
+ </operation>
+
+</mbean>
\ No newline at end of file
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/JBossConnectionFactory.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/JBossConnectionFactory.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/JBossConnectionFactory.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,26 +22,13 @@
package org.jboss.jms.client;
import java.io.Serializable;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.XAConnection;
-import javax.jms.XAConnectionFactory;
-import javax.jms.XAQueueConnection;
-import javax.jms.XAQueueConnectionFactory;
-import javax.jms.XATopicConnection;
-import javax.jms.XATopicConnectionFactory;
+import javax.jms.*;
import javax.naming.NamingException;
import javax.naming.Reference;
-
import org.jboss.aop.Advised;
import org.jboss.jms.client.container.JmsClientAspectXMLLoader;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.client.ha.ClusteredConnectionFactoryClient;
import org.jboss.jms.delegate.ConnectionDelegate;
import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.referenceable.SerializableObjectRefAddr;
@@ -193,7 +180,7 @@
{
tccc.set(getClass().getClassLoader());
- ensureAOPConfigLoaded((ClientConnectionFactoryDelegate)delegate);
+ ensureAOPConfigLoaded(delegate);
initDelegate();
// The version used by the connection is the minimum of the server version for the
@@ -213,12 +200,20 @@
{
if (!initialised)
{
- ((ClientConnectionFactoryDelegate)delegate).init();
+ if (delegate instanceof ClientConnectionFactoryDelegate)
+ {
+ ((ClientConnectionFactoryDelegate)delegate).init();
+ }
+ else
+ {
+ ((ClusteredConnectionFactoryClient)delegate).init();
+ }
initialised = true;
}
}
-
- protected void ensureAOPConfigLoaded(ClientConnectionFactoryDelegate delegate)
+
+
+ protected void ensureAOPConfigLoaded(ConnectionFactoryDelegate delegate)
{
try
{
@@ -226,14 +221,21 @@
{
if (!configLoaded)
{
+ ClientConnectionFactoryDelegate currentDelegate = null;
+ if (delegate instanceof ClusteredConnectionFactoryClient)
+ {
+ currentDelegate = ((ClusteredConnectionFactoryClient)delegate).getRoundRobbinFactoryDelegate();
+ }
+ else
+ {
+ currentDelegate = (ClientConnectionFactoryDelegate)delegate;
+ }
// Load the client side aspect stack configuration from the server and apply it
- delegate.init();
-
- byte[] clientAOPConfig = delegate.getClientAOPConfig();
+ byte[] clientAOPConfig = currentDelegate.getClientAOPConfig();
// Remove interceptor since we don't want it on the front of the stack
- ((Advised)delegate)._getInstanceAdvisor().removeInterceptor(delegate.getName());
+ ((Advised)currentDelegate)._getInstanceAdvisor().removeInterceptor(currentDelegate.getName());
JmsClientAspectXMLLoader loader = new JmsClientAspectXMLLoader();
Added: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredClientConnectionFactoryDelegateServer.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredClientConnectionFactoryDelegateServer.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredClientConnectionFactoryDelegateServer.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -0,0 +1,100 @@
+/*
+ * 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.jms.client.ha;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import javax.jms.JMSException;
+import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.delegate.ConnectionDelegate;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
+import org.jboss.messaging.core.plugin.IdBlock;
+import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NodeAddressInfo;
+
+/**
+ * This connection factory looks up for Active Servers in one PostOffice and sends them to the client, by
+ * doing a writeResolve what means it would send an updated list of servers.
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @version <tt>$Revision:$</tt>
+ * <p/>
+ * $Id:$
+ */
+public class ClusteredClientConnectionFactoryDelegateServer implements ConnectionFactoryDelegate, Serializable
+{
+
+ ClusteredPostOffice postOffice;
+
+ transient ClusteredConnectionFactoryClient currentDelegate = null;
+
+ public ClusteredClientConnectionFactoryDelegateServer(ClusteredPostOffice clusteredPostOffice)
+ {
+ this.postOffice = clusteredPostOffice;
+ }
+
+
+ private ClusteredConnectionFactoryClient createClient()
+ {
+ NodeAddressInfo[] addresses = postOffice.getClusterNodes();
+
+ ArrayList delegatesList = new ArrayList();
+
+ for (int i = 0; i < addresses.length; i++)
+ {
+ ConnectionFactoryDelegate delegateArray[] = addresses[i].getConnectionFactoryDelegates();
+
+ for (int j = 0; j < delegateArray.length; j++)
+ {
+ delegatesList.add(delegateArray[j]);
+ }
+ }
+ ClientConnectionFactoryDelegate[] delegateFinal = (ClientConnectionFactoryDelegate[]) delegatesList.toArray(new ClientConnectionFactoryDelegate[delegatesList.size()]);
+
+ return new ClusteredConnectionFactoryClient(delegateFinal);
+ }
+
+ public ConnectionDelegate createConnectionDelegate(String username, String password) throws JMSException
+ {
+ if (currentDelegate == null)
+ {
+ currentDelegate = createClient();
+ }
+ return currentDelegate.createConnectionDelegate(username, password);
+ }
+
+ public byte[] getClientAOPConfig() throws JMSException
+ {
+ throw new RuntimeException("It shouldn't be called here");
+ }
+
+ public IdBlock getIdBlock(int size) throws JMSException
+ {
+ throw new RuntimeException("It shouldn't be called here");
+ }
+
+ private Object writeReplace()
+ {
+ return createClient();
+ }
+}
Added: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredConnectionFactoryClient.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredConnectionFactoryClient.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/ha/ClusteredConnectionFactoryClient.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -0,0 +1,60 @@
+package org.jboss.jms.client.ha;
+
+import java.io.Serializable;
+import javax.jms.JMSException;
+import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.delegate.ConnectionDelegate;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
+import org.jboss.messaging.core.plugin.IdBlock;
+
+/**
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @version <tt>$Revision:$</tt>
+ * <p/>
+ * $Id:$
+ */
+public class ClusteredConnectionFactoryClient implements ConnectionFactoryDelegate, Serializable
+{
+
+ private int current;
+ ClientConnectionFactoryDelegate[] delegates;
+
+ public ClusteredConnectionFactoryClient(ClientConnectionFactoryDelegate[] delegates)
+ {
+ this.delegates = delegates;
+ }
+
+ public ConnectionDelegate createConnectionDelegate(String username, String password) throws JMSException
+ {
+ return getRoundRobbinFactoryDelegate().createConnectionDelegate(username, password);
+ }
+
+
+ public synchronized ClientConnectionFactoryDelegate getRoundRobbinFactoryDelegate()
+ {
+ ClientConnectionFactoryDelegate currentDelegate = delegates[current++];
+ if (current >= delegates.length)
+ {
+ current = 0;
+ }
+ return currentDelegate;
+ }
+
+ public byte[] getClientAOPConfig() throws JMSException
+ {
+ throw new RuntimeException("Shouldn't be called here");
+ }
+
+ public IdBlock getIdBlock(int size) throws JMSException
+ {
+ throw new RuntimeException("Shouldn't be called here");
+ }
+
+ public synchronized void init()
+ {
+ for (int i=0;i<delegates.length;i++)
+ {
+ delegates[i].init();
+ }
+ }
+}
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,21 +22,21 @@
package org.jboss.jms.server;
import org.jboss.jms.server.connectionfactory.JNDIBindings;
+import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.contract.MessagingComponent;
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
* @version <tt>$Revision$</tt>
- *
- * $Id$
+ * <p/>
+ * $Id$
*/
public interface ConnectionFactoryManager extends MessagingComponent
{
/**
* @param jndiBindings - if null, the connection factory will be created and registered with the
- * AOP subsystem, but not bound in JNDI.
- *
+ * AOP subsystem, but not bound in JNDI.
* @return an identifier that uniques identifies the registered ConnectionFactory.
*/
int registerConnectionFactory(String clientID, JNDIBindings jndiBindings,
@@ -46,7 +46,13 @@
int defaultTempQueuePageSize,
int defaultTempQueueDownCacheSize) throws Exception;
+ void registerClusteredConnectionFactory(ClusteredPostOffice postOffice,
+ JNDIBindings jndiBindings) throws Exception;
+
void unregisterConnectionFactory(int connectionFactoryID) throws Exception;
javax.jms.ConnectionFactory getConnectionFactory(int connectionFactoryID);
+
+ javax.jms.ConnectionFactory[] getAllConnectionFactories();
+
}
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ServerPeer.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ServerPeer.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,6 +22,14 @@
package org.jboss.jms.server;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+import java.util.Set;
+import javax.management.Attribute;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
import org.jboss.aop.AspectXmlLoader;
import org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper;
import org.jboss.jms.server.connectionmanager.SimpleConnectionManager;
@@ -49,15 +57,6 @@
import org.jboss.system.ServiceMBeanSupport;
import org.w3c.dom.Element;
-import javax.management.Attribute;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Map;
-import java.util.Set;
-
/**
* A JMS server peer.
*
@@ -86,7 +85,6 @@
private int serverPeerID;
private byte[] clientAOPConfig;
private Version version;
- private String remotingLocator;
private String defaultQueueJNDIContext;
private String defaultTopicJNDIContext;
@@ -292,11 +290,6 @@
// JMX Attributes ------------------------------------------------
- public String getRemotingLocator()
- {
- return remotingLocator;
- }
-
public ObjectName getPersistenceManager()
{
return persistenceManagerObjectName;
@@ -723,11 +716,6 @@
JMSWireFormat wf = new JMSWireFormat();
MarshalFactory.addMarshaller("jms", wf, wf);
-
- //TODO : Maybe we should put this name under a static definition. But where?
- ObjectName name = new ObjectName("jboss.messaging:service=Connector,transport=socket");
- this.remotingLocator = (String)getServer().getAttribute(name,"InvokerLocator");
-
}
private void loadServerAOPConfig() throws Exception
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -21,16 +21,12 @@
*/
package org.jboss.jms.server.connectionfactory;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
+import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
-
import org.jboss.jms.client.JBossConnectionFactory;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.client.ha.ClusteredClientConnectionFactoryDelegateServer;
import org.jboss.jms.server.ConnectionFactoryManager;
import org.jboss.jms.server.ServerPeer;
import org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint;
@@ -38,6 +34,7 @@
import org.jboss.jms.server.remoting.JMSDispatcher;
import org.jboss.jms.util.JNDIUtil;
import org.jboss.logging.Logger;
+import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
/**
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
@@ -72,6 +69,27 @@
// ConnectionFactoryManager implementation -----------------------
+ public synchronized void registerClusteredConnectionFactory(ClusteredPostOffice postOffice,
+ JNDIBindings jndiBindings) throws Exception
+ {
+
+ ClusteredClientConnectionFactoryDelegateServer factory
+ = new ClusteredClientConnectionFactoryDelegateServer(postOffice);
+
+ JBossConnectionFactory cf = new JBossConnectionFactory(factory);
+
+ if (jndiBindings != null)
+ {
+ List jndiNames = jndiBindings.getNames();
+ for(Iterator i = jndiNames.iterator(); i.hasNext(); )
+ {
+ String jndiName = (String)i.next();
+ JNDIUtil.rebind(initialContext, jndiName, cf);
+ }
+ }
+ }
+
+
public synchronized int registerConnectionFactory(String clientID,
JNDIBindings jndiBindings,
String locatorURI,
@@ -94,7 +112,7 @@
serverPeer.getServerPeerID(), clientPing);
ConnectionFactoryAdvised connFactoryAdvised = new ConnectionFactoryAdvised(endpoint);
-
+
JMSDispatcher.instance.registerTarget(new Integer(id), connFactoryAdvised);
endpoints.put(new Integer(id), endpoint);
@@ -139,6 +157,17 @@
{
return (javax.jms.ConnectionFactory)factories.get(new Integer(connectionFactoryID));
}
+
+ public synchronized javax.jms.ConnectionFactory[] getAllConnectionFactories()
+ {
+ ArrayList list = new ArrayList();
+ for (Iterator iter = factories.values().iterator();iter.hasNext();)
+ {
+ list.add(iter.next());
+ }
+
+ return (javax.jms.ConnectionFactory[])list.toArray(new JBossConnectionFactory[list.size()]);
+ }
// MessagingComponent implementation -----------------------------
Added: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -0,0 +1,131 @@
+/*
+ * 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.jms.server.ha;
+
+import javax.management.ObjectName;
+import org.jboss.jms.server.ServerPeer;
+import org.jboss.jms.server.connectionfactory.JNDIBindings;
+import org.jboss.jms.util.ExceptionUtil;
+import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
+import org.jboss.system.ServiceMBeanSupport;
+import org.w3c.dom.Element;
+
+/**
+ * A deployable JBoss Messaging clustered connection factory.
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @version <tt>$Revision:$</tt>
+ * $Id:$
+ */
+public class ClusteredConnectionFactory extends ServiceMBeanSupport
+{
+ protected ObjectName serverPeerObjectName;
+
+ protected ObjectName clusteredPostOffice;
+
+ protected JNDIBindings jndiBindings;
+
+ boolean started = false;
+
+ public ClusteredConnectionFactory()
+ {
+ super();
+ }
+
+ public ClusteredConnectionFactory(String clientID)
+ {
+ super(clientID);
+ }
+
+ public void setJNDIBindings(Element e) throws Exception
+ {
+ jndiBindings = new JNDIBindings(e);
+ }
+
+ public Element getJNDIBindings()
+ {
+ if (jndiBindings == null)
+ {
+ return null;
+ }
+ return jndiBindings.getDelegate();
+ }
+
+ public void setServerPeer(ObjectName on)
+ {
+ if (started)
+ {
+ log.warn("Cannot change the value of associated " +
+ "server ObjectName after initialization!");
+ return;
+ }
+
+ serverPeerObjectName = on;
+ }
+
+ public ObjectName getServerPeer()
+ {
+ return serverPeerObjectName;
+ }
+
+
+ public ObjectName getClusteredPostOffice()
+ {
+ return clusteredPostOffice;
+ }
+
+ public void setClusteredPostOffice(ObjectName clusteredPostOffice)
+ {
+ this.clusteredPostOffice = clusteredPostOffice;
+ }
+
+ public synchronized void startService() throws Exception
+ {
+ try
+ {
+ if (serverPeerObjectName == null)
+ {
+ throw new IllegalArgumentException("ServerPeer must be specified for each Clustered Connection Factory");
+ }
+
+ if (clusteredPostOffice == null)
+ {
+ throw new IllegalArgumentException("ClusteredPostOffice must be specified for each Clustered Connection Factory");
+ }
+
+ ServerPeer serverPeer = (ServerPeer) server.getAttribute(serverPeerObjectName, "Instance");
+
+ ClusteredPostOffice postOffice = (ClusteredPostOffice) server.getAttribute(clusteredPostOffice, "Instance");
+
+ serverPeer.getConnectionFactoryManager().registerClusteredConnectionFactory(postOffice, this.jndiBindings);
+
+ started = true;
+ }
+ catch (Throwable t)
+ {
+ throw ExceptionUtil.handleJMXInvocation(t, this + " startService");
+ }
+
+ }
+
+}
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -21,6 +21,10 @@
*/
package org.jboss.messaging.core.plugin;
+import javax.management.ObjectName;
+import javax.transaction.TransactionManager;
+import org.jboss.jms.client.JBossConnectionFactory;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.selector.SelectorFactory;
import org.jboss.jms.server.QueuedExecutorPool;
import org.jboss.jms.server.ServerPeer;
@@ -35,9 +39,6 @@
import org.jboss.messaging.core.tx.TransactionRepository;
import org.w3c.dom.Element;
-import javax.management.ObjectName;
-import javax.transaction.TransactionManager;
-
/**
* A ClusteredPostOfficeService
*
@@ -226,7 +227,15 @@
TransactionManager tm = getTransactionManagerReference();
ServerPeer serverPeer = (ServerPeer)server.getAttribute(serverPeerObjectName, "Instance");
-
+
+ // Getting connectionDelegates information
+ JBossConnectionFactory[] factories = (JBossConnectionFactory[]) serverPeer.getConnectionFactoryManager().getAllConnectionFactories();
+ ConnectionFactoryDelegate[] delegates = new ConnectionFactoryDelegate[factories.length];
+ for (int i=0;i<delegates.length;i++)
+ {
+ delegates[i] = factories[i].getDelegate();
+ }
+
MessageStore ms = serverPeer.getMessageStore();
TransactionRepository tr = serverPeer.getTxRepository();
@@ -248,7 +257,7 @@
FilterFactory ff = new SelectorFactory();
postOffice = new DefaultClusteredPostOffice(ds, tm, sqlProperties, createTablesOnStartup,
- nodeId, serverPeer.getRemotingLocator(), officeName, ms,
+ nodeId, delegates, officeName, ms,
pm, tr, ff, pool,
groupName,
syncChannelConfig, asyncChannelConfig,
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,9 +22,9 @@
package org.jboss.messaging.core.plugin.contract;
import java.util.Collection;
-
import org.jboss.messaging.core.plugin.postoffice.Binding;
import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NodeAddressInfo;
/**
*
@@ -61,4 +61,6 @@
public void failOver(int nodeId) throws Exception;
Binding getBindingforChannelId(long channelId) throws Exception;
+
+ NodeAddressInfo[] getClusterNodes();
}
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,6 +22,11 @@
package org.jboss.messaging.core.plugin.postoffice.cluster;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import java.io.*;
+import java.util.*;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.jms.server.QueuedExecutorPool;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.*;
@@ -44,11 +49,6 @@
import org.jgroups.blocks.RequestHandler;
import org.w3c.dom.Element;
-import javax.sql.DataSource;
-import javax.transaction.TransactionManager;
-import java.io.*;
-import java.util.*;
-
/**
*
* A DefaultClusteredPostOffice
@@ -122,7 +122,7 @@
private StatsSender statsSender;
/** Used for failover mapping */
- private String remotingLocator;
+ private ConnectionFactoryDelegate[] connectionFactoryDelegates;
private boolean started;
@@ -143,7 +143,7 @@
*/
public DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
boolean createTablesOnStartup,
- int nodeId, String remotingLocator, String officeName, MessageStore ms,
+ int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
PersistenceManager pm,
TransactionRepository tr,
FilterFactory filterFactory,
@@ -156,7 +156,7 @@
ClusterRouterFactory rf,
long statsSendPeriod) throws Exception
{
- this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, remotingLocator, officeName, ms,
+ this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, connectionFactoryDelegates, officeName, ms,
pm, tr, filterFactory, pool, groupName, stateTimeout, castTimeout, redistributionPolicy,
rf, statsSendPeriod);
@@ -169,7 +169,7 @@
*/
public DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
boolean createTablesOnStartup,
- int nodeId, String remotingLocator, String officeName, MessageStore ms,
+ int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
PersistenceManager pm,
TransactionRepository tr,
FilterFactory filterFactory,
@@ -182,7 +182,7 @@
ClusterRouterFactory rf,
long statsSendPeriod) throws Exception
{
- this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, remotingLocator, officeName, ms,
+ this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, connectionFactoryDelegates, officeName, ms,
pm, tr, filterFactory, pool, groupName, stateTimeout, castTimeout, redistributionPolicy,
rf, statsSendPeriod);
@@ -192,7 +192,7 @@
private DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
boolean createTablesOnStartup,
- int nodeId, String remotingLocator, String officeName, MessageStore ms,
+ int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
PersistenceManager pm,
TransactionRepository tr,
FilterFactory filterFactory,
@@ -206,7 +206,7 @@
super (ds, tm, sqlProperties, createTablesOnStartup, nodeId, officeName, ms, pm, tr, filterFactory,
pool);
- this.remotingLocator = remotingLocator;
+ this.connectionFactoryDelegates = connectionFactoryDelegates;
this.pm = pm;
@@ -277,7 +277,7 @@
Address asyncAddress = asyncChannel.getLocalAddress();
- NodeAddressInfo info = new NodeAddressInfo(syncAddress, asyncAddress, remotingLocator);
+ NodeAddressInfo info = new NodeAddressInfo(nodeId, syncAddress, asyncAddress, connectionFactoryDelegates);
handleAddressNodeMapping(info, nodeId);
@@ -542,7 +542,14 @@
{
return listBindingsForConditionInternal(condition, false);
}
-
+
+ public NodeAddressInfo[] getClusterNodes()
+ {
+ ArrayList nodesList = new ArrayList();
+ nodesList.addAll(nodeIdAddressesMap.values());
+ return (NodeAddressInfo[])nodesList.toArray(new NodeAddressInfo[nodesList.size()]);
+ }
+
// PostOfficeInternal implementation ------------------------------------------------------------------
/*
@@ -625,17 +632,19 @@
{
lock.writeLock().acquire();
+ // TODO: Remove this info before merging into trunk
+ log.info("Received new NodeAddressInfo->" + info);
+
if (trace)
{
- log.trace(this.nodeId + " Adding address node mapping for " + info.getSyncChannelAddress() +
- "," + info.getAsyncChannelAddress() + " nodeId=" + nodeId + " and remotingLocator=" + info.getRemotingLocator());
+ log.trace("Adding NodeAddressInfo=" + info.toString());
}
try
{
nodeIdAddressesMap.put(new Integer(nodeId), info);
}
- finally
+ finally
{
lock.writeLock().release();
}
Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -21,41 +21,45 @@
*/
package org.jboss.messaging.core.plugin.postoffice.cluster;
+import java.io.*;
+import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
+import org.jboss.jms.delegate.ConnectionFactoryDelegate;
import org.jboss.messaging.util.Streamable;
import org.jgroups.Address;
import org.jgroups.stack.IpAddress;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-
/**
* A NodeAddressInfo
- *
+ * Note: I have made this class public as I'm using on ConnectionFactoriesServer to prepare ConnectionFactories before being sent to clients
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
* @version <tt>$Revision: 1.1 $</tt>
*
* $Id$
*
*/
-class NodeAddressInfo implements Streamable
+public class NodeAddressInfo implements Streamable
{
private Address syncChannelAddress;
private Address asyncChannelAddress;
- private String remotingLocator;
+ private int nodeId;
+ private ConnectionFactoryDelegate[] connectionFactoryDelegates;
+
public NodeAddressInfo()
{
}
- NodeAddressInfo(Address syncChannelAddress, Address asyncChannelAddress, String locator)
+ NodeAddressInfo(int nodeId, Address syncChannelAddress, Address asyncChannelAddress, ConnectionFactoryDelegate[] connectionFactoryDelegates)
{
+ this.nodeId = nodeId;
+
this.syncChannelAddress = syncChannelAddress;
this.asyncChannelAddress = asyncChannelAddress;
- this.remotingLocator = locator;
+ this.connectionFactoryDelegates = connectionFactoryDelegates;
}
Address getSyncChannelAddress()
@@ -69,13 +73,14 @@
}
- public String getRemotingLocator()
- {
- return remotingLocator;
+ public ConnectionFactoryDelegate[] getConnectionFactoryDelegates() {
+ return connectionFactoryDelegates;
}
public void read(DataInputStream in) throws Exception
{
+ nodeId = in.readInt();
+
syncChannelAddress = new IpAddress();
syncChannelAddress.readFrom(in);
@@ -84,11 +89,17 @@
asyncChannelAddress.readFrom(in);
- this.remotingLocator = in.readUTF();
+ byte[] byteInput = new byte[in.readInt()];
+
+ in.read(byteInput);
+
+ this.connectionFactoryDelegates = (ConnectionFactoryDelegate[])readRequest(byteInput);
}
public void write(DataOutputStream out) throws Exception
{
+ out.writeInt(nodeId);
+
if (!(syncChannelAddress instanceof IpAddress))
{
throw new IllegalStateException("Address must be IpAddress");
@@ -103,7 +114,52 @@
asyncChannelAddress.writeTo(out);
- out.writeUTF(remotingLocator);
+ byte[] byteOut = writeRequest(connectionFactoryDelegates);
+
+ out.writeInt(byteOut.length);
+
+ out.write(byteOut);
}
+
+ private static byte[] writeRequest(Object obj) throws Exception
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
+
+ ObjectOutputStream objout = new ObjectOutputStream(baos);
+
+ objout.writeObject(obj);
+
+ objout.flush();
+
+ return baos.toByteArray();
+ }
+
+ private static Object readRequest(byte[] bytes) throws Exception
+ {
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+
+ ObjectInputStream objinput = new ObjectInputStream(bais);
+
+ return objinput.readObject();
+ }
+
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("nodeId=" + nodeId + ", syncChannelAddress=" + syncChannelAddress +
+ ", asyncChannelAddress=" + asyncChannelAddress +", ");
+
+ if (connectionFactoryDelegates!=null)
+ {
+ for (int i=0;i<connectionFactoryDelegates.length;i++)
+ {
+ buffer.append("delegate["+ i + "]=" + ((ClientConnectionFactoryDelegate)connectionFactoryDelegates[i]).getServerLocatorURI());
+ }
+ }
+
+ return buffer.toString();
+ }
+
}
Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,6 +22,9 @@
package org.jboss.test.messaging.core.plugin.postoffice.cluster;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
import org.jboss.messaging.core.FilterFactory;
import org.jboss.messaging.core.Message;
import org.jboss.messaging.core.MessageReference;
@@ -36,10 +39,6 @@
import org.jboss.test.messaging.core.plugin.postoffice.DefaultPostOfficeTest;
import org.jboss.test.messaging.util.CoreMessageFactory;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
/**
*
* A DefaultClusteredPostOfficeTest
@@ -2238,7 +2237,7 @@
DefaultClusteredPostOffice postOffice =
new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
- sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "", "Clustered", ms, pm, tr, ff, pool,
+ sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
groupName,
JGroupsUtil.getControlStackProperties(),
JGroupsUtil.getDataStackProperties(),
Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,6 +22,7 @@
package org.jboss.test.messaging.core.plugin.postoffice.cluster;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import java.util.List;
import org.jboss.messaging.core.FilterFactory;
import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.Binding;
@@ -30,8 +31,6 @@
import org.jboss.test.messaging.core.SimpleReceiver;
import org.jboss.test.messaging.core.plugin.base.PostOfficeTestBase;
-import java.util.List;
-
/**
*
* A DefaultClusteredPostOfficeWithDefaultRouterTest
@@ -374,7 +373,7 @@
DefaultClusteredPostOffice postOffice =
new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
- sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "", "Clustered", ms, pm, tr, ff, pool,
+ sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
groupName,
JGroupsUtil.getControlStackProperties(),
JGroupsUtil.getDataStackProperties(),
Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -21,6 +21,9 @@
*/
package org.jboss.test.messaging.core.plugin.postoffice.cluster;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import org.jboss.messaging.core.*;
import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.cluster.*;
@@ -30,10 +33,6 @@
import org.jboss.test.messaging.core.plugin.base.PostOfficeTestBase;
import org.jboss.test.messaging.util.CoreMessageFactory;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
/**
*
* A DefaultRouterTest
@@ -339,7 +338,7 @@
DefaultClusteredPostOffice postOffice =
new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
- sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "", "Clustered", ms, pm, tr, ff, pool,
+ sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
groupName,
JGroupsUtil.getControlStackProperties(),
JGroupsUtil.getDataStackProperties(),
Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -22,6 +22,7 @@
package org.jboss.test.messaging.core.plugin.postoffice.cluster;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import java.util.List;
import org.jboss.messaging.core.FilterFactory;
import org.jboss.messaging.core.Message;
import org.jboss.messaging.core.MessageReference;
@@ -35,8 +36,6 @@
import org.jboss.test.messaging.core.plugin.base.PostOfficeTestBase;
import org.jboss.test.messaging.util.CoreMessageFactory;
-import java.util.List;
-
/**
*
* A RecoveryTest
@@ -351,7 +350,7 @@
DefaultClusteredPostOffice postOffice =
new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
- sc.getClusteredPostOfficeSQLProperties(), true, nodeId,"", "Clustered", ms, pm, tr, ff, pool,
+ sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
groupName,
JGroupsUtil.getControlStackProperties(),
JGroupsUtil.getDataStackProperties(),
Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java 2006-11-16 09:45:45 UTC (rev 1566)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java 2006-11-16 23:02:13 UTC (rev 1567)
@@ -23,6 +23,9 @@
import EDU.oswego.cs.dl.util.concurrent.Executor;
import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import org.jboss.messaging.core.*;
import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
import org.jboss.messaging.core.plugin.postoffice.Binding;
@@ -33,10 +36,6 @@
import org.jboss.test.messaging.core.plugin.base.PostOfficeTestBase;
import org.jboss.test.messaging.util.CoreMessageFactory;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
/**
*
* A RedistributionWithDefaultMessagePullPolicyTest
@@ -1135,7 +1134,7 @@
DefaultClusteredPostOffice postOffice =
new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
- sc.getClusteredPostOfficeSQLProperties(), true, nodeId,"", "Clustered", ms, pm, tr, ff, pool,
+ sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
groupName,
JGroupsUtil.getControlStackProperties(),
JGroupsUtil.getDataStackProperties(),
More information about the jboss-cvs-commits
mailing list