[jboss-cvs] JBoss Messaging SVN: r4115 - in trunk: src/main/org/jboss/messaging/core/client/impl and 20 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 24 14:04:32 EDT 2008
Author: timfox
Date: 2008-04-24 14:04:32 -0400 (Thu, 24 Apr 2008)
New Revision: 4115
Modified:
trunk/src/etc/jbm-configuration.xml
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionInternal.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/LocationImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnection.java
trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/config/Configuration.java
trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
trunk/src/main/org/jboss/messaging/core/postoffice/Binding.java
trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java
trunk/src/main/org/jboss/messaging/core/postoffice/impl/BindingImpl.java
trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMBaseTestCase.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/QueueTest.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ConfigurationHelper.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientExitTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java
trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSLTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/QueueSettingsDeployerTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/jms/network/ClientNetworkFailureTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/jms/server/ConnectionManagerTest.java
Log:
Removed server id
Modified: trunk/src/etc/jbm-configuration.xml
===================================================================
--- trunk/src/etc/jbm-configuration.xml 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/etc/jbm-configuration.xml 2008-04-24 18:04:32 UTC (rev 4115)
@@ -3,9 +3,6 @@
<!-- TODO!! Should specify all available properties in here -->
- <!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
- <server-peer-id>0</server-peer-id>
-
<strict-tck>true</strict-tck>
<clustered>false</clustered>
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -68,8 +68,6 @@
private final PacketDispatcher dispatcher;
- private final int serverID;
-
private final boolean strictTck;
private final int defaultConsumerWindowSize;
@@ -85,12 +83,11 @@
// Constructors ---------------------------------------------------------------------------------
- public ClientConnectionFactoryImpl(final int serverID, final Location location, final ConnectionParams connectionParams,
+ public ClientConnectionFactoryImpl(final Location location, final ConnectionParams connectionParams,
final boolean strictTck,
final int defaultConsumerWindowSize, final int defaultConsumerMaxRate,
final int defaultProducerWindowSize, final int defaultProducerMaxRate)
{
- this.serverID = serverID;
this.location = location;
this.strictTck = strictTck;
this.defaultConsumerWindowSize = defaultConsumerWindowSize;
@@ -101,9 +98,8 @@
this.connectionParams = connectionParams;
}
- public ClientConnectionFactoryImpl(final int serverID, final Location location)
+ public ClientConnectionFactoryImpl(final Location location)
{
- this.serverID = serverID;
this.location = location;
this.strictTck = false;
this.defaultConsumerWindowSize = 1000;
@@ -114,9 +110,8 @@
connectionParams = new ConnectionParamsImpl();
}
- public ClientConnectionFactoryImpl(final int serverID, final Location location, final ConnectionParams connectionParams)
+ public ClientConnectionFactoryImpl(final Location location, final ConnectionParams connectionParams)
{
- this.serverID = serverID;
this.location = location;
this.strictTck = false;
this.defaultConsumerWindowSize = 1000;
@@ -151,7 +146,7 @@
CreateConnectionResponse response =
(CreateConnectionResponse)remotingConnection.send(0, request);
- return new ClientConnectionImpl(response.getConnectionTargetID(), serverID, strictTck, remotingConnection,
+ return new ClientConnectionImpl(response.getConnectionTargetID(), strictTck, remotingConnection,
defaultConsumerWindowSize, defaultConsumerMaxRate,
defaultProducerWindowSize, defaultProducerMaxRate, response.getServerVersion());
}
@@ -195,11 +190,6 @@
return defaultProducerWindowSize;
}
- public int getServerID()
- {
- return serverID;
- }
-
public boolean isStrictTck()
{
return strictTck;
@@ -209,9 +199,7 @@
{
return defaultProducerMaxRate;
}
-
-
-
+
// Public ---------------------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -62,8 +62,6 @@
private final long serverTargetID;
- private final int serverID;
-
private final RemotingConnection remotingConnection;
private final boolean strictTck;
@@ -87,7 +85,8 @@
// Constructors ---------------------------------------------------------------------------------
- public ClientConnectionImpl(final long serverTargetID, final int serverID, final boolean strictTck,
+ public ClientConnectionImpl(final long serverTargetID,
+ final boolean strictTck,
final RemotingConnection connection,
final int defaultConsumerWindowSize,
final int defaultConsumerMaxRate,
@@ -97,8 +96,6 @@
{
this.serverTargetID = serverTargetID;
- this.serverID = serverID;
-
this.strictTck = strictTck;
this.remotingConnection = connection;
@@ -186,11 +183,6 @@
// ClientConnectionInternal implementation --------------------------------------------------------
- public int getServerID()
- {
- return serverID;
- }
-
public RemotingConnection getRemotingConnection()
{
return remotingConnection;
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionInternal.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionInternal.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionInternal.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -18,8 +18,6 @@
*/
public interface ClientConnectionInternal extends ClientConnection
{
- int getServerID();
-
RemotingConnection getRemotingConnection();
void removeSession(ClientSession session);
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -650,7 +650,8 @@
ClientSessionImpl other = (ClientSessionImpl)xares;
- return this.connection.getServerID() == other.getConnection().getServerID();
+ return connection.getRemotingConnection().getLocation()
+ .equals(other.getConnection().getRemotingConnection().getLocation());
}
public int prepare(final Xid xid) throws XAException
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/LocationImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/LocationImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/LocationImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -21,18 +21,18 @@
*/
package org.jboss.messaging.core.client.impl;
+import org.jboss.messaging.core.client.Location;
import org.jboss.messaging.core.remoting.TransportType;
-import org.jboss.messaging.core.client.Location;
-import java.io.Serializable;
-
/**
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ * @author <a href="tim.fox at redhat.com">Tim Fox</a>
*/
public class LocationImpl implements Location
{
-
- protected TransportType transport;
+ private static final long serialVersionUID = -1101852656621257742L;
+
+ protected TransportType transport;
protected String host;
protected int port = DEFAULT_REMOTING_PORT;
@@ -75,4 +75,17 @@
{
return getLocation();
}
+
+ public boolean equals(Object other)
+ {
+ if (other instanceof Location == false)
+ {
+ return false;
+ }
+ Location lother = (Location)other;
+
+ return this.transport.equals(lother.getLocation()) &&
+ this.host.equals(lother.getHost()) &&
+ this.port == lother.getPort();
+ }
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnection.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnection.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -1,5 +1,6 @@
package org.jboss.messaging.core.client.impl;
+import org.jboss.messaging.core.client.Location;
import org.jboss.messaging.core.client.RemotingSessionListener;
import org.jboss.messaging.core.exception.MessagingException;
import org.jboss.messaging.core.remoting.Packet;
@@ -33,4 +34,6 @@
void setRemotingSessionListener(RemotingSessionListener newListener);
PacketDispatcher getPacketDispatcher();
+
+ public Location getLocation();
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -203,6 +203,11 @@
{
return dispatcher;
}
+
+ public Location getLocation()
+ {
+ return location;
+ }
// Package protected ----------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/messaging/core/config/Configuration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/config/Configuration.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -37,9 +37,6 @@
*/
public interface Configuration
{
-
- int getMessagingServerID();
-
List<String> getDefaultInterceptors();
Boolean isStrictTck();
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/ConfigurationImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -21,19 +21,17 @@
*/
package org.jboss.messaging.core.config.impl;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import org.jboss.messaging.core.client.ConnectionParams;
+import org.jboss.messaging.core.client.Location;
+import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
+import org.jboss.messaging.core.client.impl.LocationImpl;
import org.jboss.messaging.core.config.Configuration;
import org.jboss.messaging.core.remoting.TransportType;
import org.jboss.messaging.core.server.JournalType;
-import org.jboss.messaging.core.client.impl.LocationImpl;
-import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
-import org.jboss.messaging.core.client.Location;
-import org.jboss.messaging.core.client.ConnectionParams;
/**
* @author <a href="mailto:ataylor at redhat.com>Andy Taylor</a>
@@ -54,8 +52,6 @@
public static final boolean DEFAULT_INVM_DISABLED = false;
public static final boolean DEFAULT_SSL_ENABLED = false;
- protected int messagingServerID = 0;
-
protected List<String> defaultInterceptors = new ArrayList<String>();
protected boolean strictTck = false;
@@ -109,16 +105,6 @@
protected String trustStorePath;
protected String trustStorePassword;
- public int getMessagingServerID()
- {
- return messagingServerID;
- }
-
- public void setMessagingServerID(int id)
- {
- this.messagingServerID = id;
- }
-
public List<String> getDefaultInterceptors()
{
return defaultInterceptors;
Modified: trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/config/impl/FileConfiguration.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -55,8 +55,6 @@
xml = XMLUtil.replaceSystemProps(xml);
Element e = XMLUtil.stringToElement(xml);
- messagingServerID = getInteger(e, "server-peer-id", messagingServerID);
-
strictTck = getBoolean(e, "strict-tck", strictTck);
clustered = getBoolean(e, "clustered", clustered);
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -480,7 +480,7 @@
Queue queue = queueFactory.createQueue(id, queueName, filter, true, false);
- Binding binding = new BindingImpl(0, address, queue);
+ Binding binding = new BindingImpl(address, queue);
bindings.add(binding);
}
Modified: trunk/src/main/org/jboss/messaging/core/postoffice/Binding.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/Binding.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/Binding.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -33,8 +33,6 @@
*/
public interface Binding
{
- int getNodeID();
-
String getAddress();
Queue getQueue();
Modified: trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -70,7 +70,7 @@
List<MessageReference> route(String address, Message message) throws Exception;
- void routeFromCluster(String address, Message message) throws Exception;
+ // void routeFromCluster(String address, Message message) throws Exception;
//Flow control
Modified: trunk/src/main/org/jboss/messaging/core/postoffice/impl/BindingImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/impl/BindingImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/impl/BindingImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -32,9 +32,7 @@
*
*/
public class BindingImpl implements Binding
-{
- private final int nodeID;
-
+{
private final String address;
private final Queue queue;
@@ -43,10 +41,8 @@
private int hash;
- public BindingImpl(final int nodeID, final String address, final Queue queue)
+ public BindingImpl(final String address, final Queue queue)
{
- this.nodeID = nodeID;
-
this.address = address;
this.queue = queue;
@@ -57,11 +53,6 @@
return address;
}
- public int getNodeID()
- {
- return nodeID;
- }
-
public Queue getQueue()
{
return queue;
@@ -75,9 +66,8 @@
}
Binding bother = (Binding)other;
- return (this.nodeID == bother.getNodeID()) &&
- this.address.equals(bother.getAddress()) &&
- this.queue.equals(bother.getQueue());
+ return (this.address.equals(bother.getAddress()) &&
+ this.queue.equals(bother.getQueue()));
}
public int hashCode()
@@ -85,7 +75,6 @@
if (!hashAssigned)
{
hash = 17;
- hash = 37 * hash + nodeID;
hash = 37 * hash + address.hashCode();
hash = 37 * hash + queue.hashCode();
Modified: trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -22,6 +22,7 @@
package org.jboss.messaging.core.postoffice.impl;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -56,7 +57,7 @@
{
private static final Logger log = Logger.getLogger(PostOfficeImpl.class);
- private final int nodeID;
+ //private final int nodeID;
private final ConcurrentMap<String, List<Binding>> mappings = new ConcurrentHashMap<String, List<Binding>>();
@@ -72,11 +73,9 @@
private final StorageManager storageManager;
- public PostOfficeImpl(final int nodeID, final StorageManager storageManager,
+ public PostOfficeImpl(final StorageManager storageManager,
final QueueFactory queueFactory, final boolean checkAllowable)
{
- this.nodeID = nodeID;
-
this.storageManager = storageManager;
this.queueFactory = queueFactory;
@@ -173,22 +172,16 @@
public List<Binding> getBindingsForAddress(final String address)
{
- List<Binding> list = new ArrayList<Binding>();
-
List<Binding> bindings = mappings.get(address);
if (bindings != null)
{
- for (Binding binding: bindings)
- {
- if (binding.getNodeID() == nodeID)
- {
- list.add(binding);
- }
- }
- }
-
- return list;
+ return bindings;
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
}
public Binding getBinding(final String queueName)
@@ -229,28 +222,28 @@
return refs;
}
- public void routeFromCluster(final String address, final Message message) throws Exception
- {
- List<Binding> bindings = mappings.get(address);
-
- for (Binding binding: bindings)
- {
- Queue queue = binding.getQueue();
-
- if (binding.getNodeID() == nodeID)
- {
- if (queue.getFilter() == null || queue.getFilter().match(message))
- {
- MessageReference ref = message.createReference(queue);
+// public void routeFromCluster(final String address, final Message message) throws Exception
+// {
+// List<Binding> bindings = mappings.get(address);
+//
+// for (Binding binding: bindings)
+// {
+// Queue queue = binding.getQueue();
+//
+// if (binding.getNodeID() == nodeID)
+// {
+// if (queue.getFilter() == null || queue.getFilter().match(message))
+// {
+// MessageReference ref = message.createReference(queue);
+//
+// //We never route durably from other nodes - so no need to persist
+//
+// queue.addLast(ref);
+// }
+// }
+// }
+// }
- //We never route durably from other nodes - so no need to persist
-
- queue.addLast(ref);
- }
- }
- }
- }
-
public Map<String, List<Binding>> getMappings()
{
return mappings;
@@ -268,7 +261,7 @@
{
Queue queue = queueFactory.createQueue(-1, name, filter, durable, temporary);
- Binding binding = new BindingImpl(this.nodeID, address, queue);
+ Binding binding = new BindingImpl(address, queue);
return binding;
}
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -151,11 +151,6 @@
return;
}
- if (configuration.getMessagingServerID() < 0)
- {
- throw new IllegalStateException("MessagingServer ID not set");
- }
-
log.debug(this + " starting");
// Create the wired components
@@ -170,8 +165,7 @@
queueFactory = new QueueFactoryImpl(scheduledExecutor, queueSettingsRepository);
connectionManager = new ConnectionManagerImpl();
memoryManager = new SimpleMemoryManager();
- postOffice = new PostOfficeImpl(configuration.getMessagingServerID(),
- storageManager, queueFactory, configuration.isRequireDestinations());
+ postOffice = new PostOfficeImpl(storageManager, queueFactory, configuration.isRequireDestinations());
queueSettingsDeployer = new QueueSettingsDeployer(postOffice, queueSettingsRepository);
if (createTransport)
@@ -324,11 +318,6 @@
this.securityManager = securityManager;
}
- public String toString()
- {
- return "MessagingServer[" + configuration.getMessagingServerID() + "]";
- }
-
public CreateConnectionResponse createConnection(final String username, final String password,
final long remotingClientSessionID, final String clientAddress,
final int incrementVersion)
Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnection.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -359,12 +359,6 @@
return "JBossConnection->" + connection;
}
- //For testing only
- public int getServerID()
- {
- return ((ClientConnectionInternal)connection).getServerID();
- }
-
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -82,8 +82,6 @@
private final ConnectionParams connectionParams;
- private final int serverID;
-
private final boolean strictTck;
private final int defaultConsumerWindowSize;
@@ -99,8 +97,7 @@
public JBossConnectionFactory(final String clientID,
final int dupsOKBatchSize,
final Location location,
- final ConnectionParams connectionParams,
- final int serverID,
+ final ConnectionParams connectionParams,
final boolean strictTck,
final int defaultConsumerWindowSize,
final int defaultConsumerMaxRate,
@@ -111,7 +108,6 @@
this.dupsOKBatchSize = dupsOKBatchSize;
this.location = location;
this.connectionParams = connectionParams;
- this.serverID = serverID;
this.strictTck = strictTck;
this.defaultConsumerMaxRate = defaultConsumerMaxRate;
this.defaultConsumerWindowSize = defaultConsumerWindowSize;
@@ -221,7 +217,7 @@
{
if(connectionFactory == null)
{
- connectionFactory = new ClientConnectionFactoryImpl(serverID,
+ connectionFactory = new ClientConnectionFactoryImpl(
location,
connectionParams,
strictTck,
@@ -246,7 +242,7 @@
{
if(connectionFactory == null)
{
- connectionFactory = new ClientConnectionFactoryImpl(serverID,
+ connectionFactory = new ClientConnectionFactoryImpl(
location,
connectionParams,
strictTck,
Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -251,8 +251,7 @@
{
cf = new JBossConnectionFactory( clientID, dupsOKBatchSize,
messagingServerManagement.getConfiguration().getLocation(),
- messagingServerManagement.getConfiguration().getConnectionParams(),
- messagingServerManagement.getConfiguration().getMessagingServerID(),
+ messagingServerManagement.getConfiguration().getConnectionParams(),
messagingServerManagement.getConfiguration().isStrictTck() || strictTck,
consumerWindowSize, consumerMaxRate, producerWindowSize, producerMaxRate
);
@@ -281,7 +280,6 @@
cf = new JBossConnectionFactory( clientID, dupsOKBatchSize,
messagingServerManagement.getConfiguration().getLocation(),
messagingServerManagement.getConfiguration().getConnectionParams(),
- messagingServerManagement.getConfiguration().getMessagingServerID(),
messagingServerManagement.getConfiguration().isStrictTck() || strictTck,
consumerWindowSize, consumerMaxRate, producerWindowSize, producerMaxRate
);
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMBaseTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMBaseTestCase.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/JBMBaseTestCase.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -244,84 +244,6 @@
}
}
- protected XAConnection createXAConnectionOnServer(XAConnectionFactory factory, int serverId)
- throws Exception
- {
- int count=0;
-
- while (true)
- {
- if (count++>10)
- return null;
-
- XAConnection connection = factory.createXAConnection();
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
- /**
- * @param conn a JMS connection
- * @return the ID of the ServerPeer the connection is communicating with.
- */
- protected static int getServerId(Connection conn)
- {
- return ((JBossConnection) conn).getServerID();
- }
-
- protected Connection createConnectionOnServer(ConnectionFactory factory, int serverId)
- throws Exception
- {
- int count=0;
-
- while (true)
- {
- if (count++>10)
- throw new IllegalStateException("Cannot make connection to node " + serverId);
-
- Connection connection = factory.createConnection();
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
- protected Connection createConnectionOnServer(ConnectionFactory factory, int serverId, String user, String password)
- throws Exception
- {
- int count=0;
-
- while (true)
- {
- if (count++>10)
- throw new IllegalStateException("Cannot make connection to node " + serverId);
-
- Connection connection = factory.createConnection(user, password);
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
protected void checkNoSubscriptions(Topic topic) throws Exception
{
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -525,84 +525,8 @@
return ServerManagement.isRemote();
}
- /**
- * @param conn a JMS connection
- * @return the ID of the ServerPeer the connection is communicating with.
- */
- protected static int getServerId(Connection conn)
- {
- return ((JBossConnection) conn).getServerID();
- }
- protected Connection createConnectionOnServer(ConnectionFactory factory, int serverId)
- throws Exception
- {
- int count=0;
- while (true)
- {
- if (count++>10)
- throw new IllegalStateException("Cannot make connection to node " + serverId);
-
- Connection connection = factory.createConnection();
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
- protected Connection createConnectionOnServer(ConnectionFactory factory, int serverId, String user, String password)
- throws Exception
- {
- int count=0;
-
- while (true)
- {
- if (count++>10)
- throw new IllegalStateException("Cannot make connection to node " + serverId);
-
- Connection connection = factory.createConnection(user, password);
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
- protected XAConnection createXAConnectionOnServer(XAConnectionFactory factory, int serverId)
- throws Exception
- {
- int count=0;
-
- while (true)
- {
- if (count++>10)
- return null;
-
- XAConnection connection = factory.createXAConnection();
-
- if (getServerId(connection) == serverId)
- {
- return connection;
- }
- else
- {
- connection.close();
- }
- }
- }
-
/** Some testcases are time sensitive, and we need to make sure a GC would happen before certain scenarios*/
protected void forceGC()
{
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/QueueTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/QueueTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/QueueTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -170,12 +170,8 @@
{
conn1 = cf.createConnection();
- assertEquals(0, getServerId(conn1));
-
conn2 = cf.createConnection();
- assertEquals(0, getServerId(conn2));
-
Session s = conn1.createSession(true, Session.AUTO_ACKNOWLEDGE);
MessageProducer p = s.createProducer(queue1);
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ConfigurationHelper.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ConfigurationHelper.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ConfigurationHelper.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -68,12 +68,11 @@
public void start()
{
- JBMPropertyKernelConfig config = (JBMPropertyKernelConfig) kernelControllerContext.getKernel().getConfig();
- HashMap<String, Object> configuration = configs.get(config.getServerID());
- ConfigurationImpl actualConfiguration = (ConfigurationImpl) kernelControllerContext.getKernel().getRegistry().getEntry("Configuration").getTarget();
- actualConfiguration.setMessagingServerID(config.getServerID());
- actualConfiguration.setPort(actualConfiguration.getPort() + config.getServerID());
- alterConfig(actualConfiguration, configuration);
+// JBMPropertyKernelConfig config = (JBMPropertyKernelConfig) kernelControllerContext.getKernel().getConfig();
+// ConfigurationImpl actualConfiguration = (ConfigurationImpl) kernelControllerContext.getKernel().getRegistry().getEntry("Configuration").getTarget();
+// actualConfiguration.setMessagingServerID(config.getServerID());
+// actualConfiguration.setPort(actualConfiguration.getPort() + config.getServerID());
+// alterConfig(actualConfiguration, configuration);
}
public static void addServerConfig(int serverID, HashMap<String, Object> configuration)
@@ -86,7 +85,7 @@
{
Hashtable<String, Serializable> env = new Hashtable<String, Serializable>();
env.put("java.naming.factory.initial", "org.jboss.test.messaging.tools.container.InVMInitialContextFactory");
- env.put("jboss.messaging.test.server.index", "" + configuration.getMessagingServerID());
+ env.put("jboss.messaging.test.server.index", "0");
return env;
}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -31,20 +31,9 @@
*/
public class JBMPropertyKernelConfig extends PropertyKernelConfig
{
- private int serverID = -1;
public JBMPropertyKernelConfig(Properties properties)
{
super(properties); //To change body of overridden methods use File | Settings | File Templates.
}
-
- public int getServerID()
- {
- return serverID;
- }
-
- public void setServerID(int serverID)
- {
- this.serverID = serverID;
- }
}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -141,7 +141,7 @@
ConfigurationHelper.addServerConfig(getServerID(), configuration);
JBMPropertyKernelConfig propertyKernelConfig = new JBMPropertyKernelConfig(System.getProperties());
- propertyKernelConfig.setServerID(getServerID());
+ //propertyKernelConfig.setServerID(getServerID());
bootstrap = new JBMBootstrapServer(containerConfig, propertyKernelConfig);
System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, ""+getServerID());
bootstrap.run();
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -55,7 +55,7 @@
public void testINVMCoreClient() throws Exception
{
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(INVM));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(INVM));
ClientConnection conn = cf.createConnection();
ClientSession session = conn.createClientSession(false, true, true, -1, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -165,7 +165,7 @@
server = new MessagingServerImpl(config);
server.start();
- cf = new ClientConnectionFactoryImpl(0, new LocationImpl(TCP,"localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT));
+ cf = new ClientConnectionFactoryImpl(new LocationImpl(TCP,"localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT));
}
@Override
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientExitTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientExitTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientExitTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -104,7 +104,7 @@
server = new MessagingServerImpl(config);
server.start();
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(TCP, "localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(TCP, "localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT));
connection = cf.createConnection(null, null);
ClientSession session = connection.createClientSession(false, true, true, -1, false, false);
session.createQueue(QUEUE, QUEUE, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -73,7 +73,7 @@
int numberOfConnections = Integer.parseInt(args[0]);
Location location = new LocationImpl(TCP, "localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT);
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, location);
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(location);
ClientConnection conn = cf.createConnection();
ClientSession session = conn.createClientSession(false, true, true, -1, false, false);
ClientProducer producer = session.createProducer(QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -56,7 +56,7 @@
{
Location config = new LocationImpl(TCP, "localhost", ConfigurationImpl.DEFAULT_REMOTING_PORT);
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, config);
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(config);
ClientConnection conn = cf.createConnection(null, null);
ClientSession session = conn.createClientSession(false, true, true, -1, false, false);
ClientProducer producer = session.createProducer(QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -53,7 +53,7 @@
DummyInterceptor interceptorA = null;
DummyInterceptorB interceptorB = null;
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(INVM));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(INVM));
ClientConnection conn = null;
try
{
@@ -160,7 +160,7 @@
interceptor.sendException=false;
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(INVM));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(INVM));
conn = cf.createConnection();
conn.start();
ClientSession session = conn.createClientSession(false, true, true, -1, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -71,7 +71,7 @@
connectionParams.setKeyStorePath(keyStorePath);
connectionParams.setKeyStorePassword(keyStorePassword);
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, config, connectionParams);
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(config, connectionParams);
ClientConnection conn = cf.createConnection(null, null);
ClientSession session = conn.createClientSession(false, true, true, -1, false, false);
ClientProducer producer = session.createProducer(CoreClientOverSSLTest.QUEUE);
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSLTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSLTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSLTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -129,7 +129,7 @@
server = new MessagingServerImpl(config);
server.start();
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, config.getLocation());
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(config.getLocation());
connection = cf.createConnection(null, null);
ClientSession session = connection.createClientSession(false, true, true, -1, false, false);
session.createQueue(QUEUE, QUEUE, null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/config/impl/ConfigurationTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -48,11 +48,6 @@
configuration = null;
}
- public void testSetServerPeerId() throws Exception
- {
- assertEquals("failed to set ServerPeerId", 10, configuration.getMessagingServerID());
- }
-
public void testSetStrictTck() throws Exception
{
assertEquals("failed to set strict tck", Boolean.TRUE, configuration.isStrictTck());
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/QueueSettingsDeployerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/QueueSettingsDeployerTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/deployers/impl/QueueSettingsDeployerTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -72,12 +72,12 @@
queueSettings.setMessageCounterHistoryDayLimit(1000);
Queue mockDLQ = EasyMock.createMock(Queue.class);
queueSettings.setDLQ(mockDLQ);
- EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl(0, "DLQtest", mockDLQ));
- EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl(0, "DLQtest", mockDLQ));
+ EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl("DLQtest", mockDLQ));
+ EasyMock.expect(postOffice.getBinding("DLQtest")).andReturn(new BindingImpl("DLQtest", mockDLQ));
Queue mockQ = EasyMock.createMock(Queue.class);
queueSettings.setExpiryQueue(mockQ);
- EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl(0, "ExpiryQueueTest", mockQ));
- EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl(0, "ExpiryQueueTest", mockQ));
+ EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl("ExpiryQueueTest", mockQ));
+ EasyMock.expect(postOffice.getBinding("ExpiryQueueTest")).andReturn(new BindingImpl("ExpiryQueueTest", mockQ));
EasyMock.replay(postOffice);
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -54,10 +54,8 @@
QueueFactory qf = EasyMock.createStrictMock(QueueFactory.class);
- final int nodeID = 21;
+ PostOffice po = new PostOfficeImpl(pm, qf, false);
- PostOffice po = new PostOfficeImpl(nodeID, pm, qf, false);
-
final long id = 324;
final String name = "wibb22";
final Filter filter = new FakeFilter();
@@ -70,7 +68,7 @@
final String condition = "queue.wibble";
- Binding expected = new BindingImpl(nodeID, condition, queue);
+ Binding expected = new BindingImpl(condition, queue);
pm.addBinding(EasyMock.eq(expected));
@@ -105,10 +103,8 @@
QueueFactory qf = EasyMock.createStrictMock(QueueFactory.class);
- final int nodeID = 21;
+ PostOffice po = new PostOfficeImpl(pm, qf, false);
- PostOffice po = new PostOfficeImpl(nodeID, pm, qf, false);
-
final long id = 324;
final String name = "wibb22";
final Filter filter = new FakeFilter();
@@ -121,7 +117,7 @@
final String condition = "queue.wibble";
- Binding expected = new BindingImpl(nodeID, condition, queue);
+ Binding expected = new BindingImpl(condition, queue);
pm.addBinding(EasyMock.eq(expected));
@@ -168,10 +164,8 @@
QueueFactory qf = new FakeQueueFactory();
- final int nodeID = 21;
+ PostOffice po = new PostOfficeImpl(pm, qf, false);
- PostOffice po = new PostOfficeImpl(nodeID, pm, qf, false);
-
final String condition1 = "queue.wibble";
po.addBinding(condition1, "queue1", null, false, false);
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/jms/network/ClientNetworkFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/jms/network/ClientNetworkFailureTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/jms/network/ClientNetworkFailureTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -106,7 +106,7 @@
public void testServerResourcesCleanUpWhenClientCommThrowsException()
throws Exception
{
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(TCP, "localhost", 5400));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(TCP, "localhost", 5400));
ClientConnection conn = cf.createConnection();
@@ -146,7 +146,7 @@
public void testServerResourcesCleanUpWhenClientCommDropsPacket()
throws Exception
{
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(TCP, "localhost", 5400));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(TCP, "localhost", 5400));
ClientConnection conn = cf.createConnection();
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/jms/server/ConnectionManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/jms/server/ConnectionManagerTest.java 2008-04-24 16:38:22 UTC (rev 4114)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/jms/server/ConnectionManagerTest.java 2008-04-24 18:04:32 UTC (rev 4115)
@@ -78,7 +78,7 @@
{
assertActiveConnectionsOnTheServer(0);
- ClientConnectionFactory cf = new ClientConnectionFactoryImpl(0, new LocationImpl(INVM));
+ ClientConnectionFactory cf = new ClientConnectionFactoryImpl(new LocationImpl(INVM));
ClientConnection conn_1 = cf.createConnection();
More information about the jboss-cvs-commits
mailing list