[jboss-cvs] JBoss Messaging SVN: r3641 - in trunk: src/main/org/jboss/jms/client/remoting and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 29 09:47:53 EST 2008
Author: jmesnil
Date: 2008-01-29 09:47:52 -0500 (Tue, 29 Jan 2008)
New Revision: 3641
Modified:
trunk/src/main/org/jboss/jms/client/impl/ClientBrowserImpl.java
trunk/src/main/org/jboss/jms/client/impl/ClientConnectionFactoryImpl.java
trunk/src/main/org/jboss/jms/client/impl/ClientConnectionImpl.java
trunk/src/main/org/jboss/jms/client/impl/ClientConsumerImpl.java
trunk/src/main/org/jboss/jms/client/impl/ClientSessionImpl.java
trunk/src/main/org/jboss/jms/client/remoting/MessagingRemotingConnection.java
trunk/src/main/org/jboss/messaging/core/remoting/Client.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/ClientImpl.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/mina/MinaService.java
trunk/tests/src/org/jboss/messaging/core/remoting/impl/ClientTestBase.java
trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/MinaClientTest.java
trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/ServerKeepAliveTest.java
trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/stress/PacketStressTest.java
trunk/tests/src/org/jboss/messaging/core/remoting/test/unit/ClientTest.java
Log:
* refactoring: in Client interface, merged methods sendOneWay(AbstractPacket) and sendBlocking(AbstractPacket) into a single method send(AbstractPacket, boolean oneWay)
Modified: trunk/src/main/org/jboss/jms/client/impl/ClientBrowserImpl.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/impl/ClientBrowserImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/impl/ClientBrowserImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -32,6 +32,7 @@
import org.jboss.messaging.core.remoting.wireformat.BrowserHasNextMessageResponse;
import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageBlockRequest;
import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageBlockResponse;
+import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageRequest;
import org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageResponse;
import org.jboss.messaging.core.remoting.wireformat.BrowserResetMessage;
import org.jboss.messaging.core.remoting.wireformat.CloseMessage;
@@ -84,7 +85,7 @@
try
{
- remotingConnection.sendBlocking(id, new CloseMessage());
+ remotingConnection.send(id, new CloseMessage());
}
finally
{
@@ -101,14 +102,14 @@
return;
}
- remotingConnection.sendBlocking(id, new ClosingMessage());
+ remotingConnection.send(id, new ClosingMessage());
}
public void reset() throws JMSException
{
checkClosed();
- remotingConnection.sendBlocking(id, new BrowserResetMessage());
+ remotingConnection.send(id, new BrowserResetMessage());
}
public boolean hasNextMessage() throws JMSException
@@ -116,7 +117,7 @@
checkClosed();
BrowserHasNextMessageResponse response =
- (BrowserHasNextMessageResponse)remotingConnection.sendBlocking(id, new BrowserHasNextMessageRequest());
+ (BrowserHasNextMessageResponse)remotingConnection.send(id, new BrowserHasNextMessageRequest());
return response.hasNext();
}
@@ -126,7 +127,7 @@
checkClosed();
BrowserNextMessageResponse response =
- (BrowserNextMessageResponse)remotingConnection.sendBlocking(id, new org.jboss.messaging.core.remoting.wireformat.BrowserNextMessageRequest());
+ (BrowserNextMessageResponse)remotingConnection.send(id, new BrowserNextMessageRequest());
return response.getMessage();
}
@@ -136,7 +137,7 @@
checkClosed();
BrowserNextMessageBlockResponse response =
- (BrowserNextMessageBlockResponse)remotingConnection.sendBlocking(id, new BrowserNextMessageBlockRequest(maxMessages));
+ (BrowserNextMessageBlockResponse)remotingConnection.send(id, new BrowserNextMessageBlockRequest(maxMessages));
return response.getMessages();
}
Modified: trunk/src/main/org/jboss/jms/client/impl/ClientConnectionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/impl/ClientConnectionFactoryImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/impl/ClientConnectionFactoryImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -133,7 +133,7 @@
prefetchSize, dupsOKBatchSize, clientID);
CreateConnectionResponse response =
- (CreateConnectionResponse)remotingConnection.sendBlocking(id, request);
+ (CreateConnectionResponse)remotingConnection.send(id, request);
ClientConnectionImpl connection =
new ClientConnectionImpl(response.getConnectionID(), serverID, strictTck, version, remotingConnection);
Modified: trunk/src/main/org/jboss/jms/client/impl/ClientConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/impl/ClientConnectionImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/impl/ClientConnectionImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -124,7 +124,7 @@
try
{
- remotingConnection.sendBlocking(id, new CloseMessage());
+ remotingConnection.send(id, new CloseMessage());
}
finally
{
@@ -153,7 +153,7 @@
closeChildren();
- remotingConnection.sendBlocking(id, new ClosingMessage());
+ remotingConnection.send(id, new ClosingMessage());
}
// ClientConnection implementation ------------------------------------------------------------
@@ -187,7 +187,7 @@
CreateSessionRequest request = new CreateSessionRequest(transacted, acknowledgementMode, isXA);
- CreateSessionResponse response = (CreateSessionResponse)remotingConnection.sendBlocking(id, request);
+ CreateSessionResponse response = (CreateSessionResponse)remotingConnection.send(id, request);
int ackBatchSize;
@@ -227,7 +227,7 @@
if (clientID == null)
{
//Get from the server
- clientID = ((GetClientIDResponse)remotingConnection.sendBlocking(id, new GetClientIDRequest())).getClientID();
+ clientID = ((GetClientIDResponse)remotingConnection.send(id, new GetClientIDRequest())).getClientID();
}
return clientID;
}
@@ -278,7 +278,7 @@
this.justCreated = false;
- remotingConnection.sendBlocking(id, new SetClientIDMessage(clientID));
+ remotingConnection.send(id, new SetClientIDMessage(clientID));
}
@@ -301,7 +301,7 @@
justCreated = false;
- remotingConnection.sendOneWay(id, new StartConnectionMessage());
+ remotingConnection.send(id, new StartConnectionMessage(), true);
}
public void stop() throws JMSException
@@ -310,7 +310,7 @@
justCreated = false;
- remotingConnection.sendBlocking(id, new StopConnectionMessage());
+ remotingConnection.send(id, new StopConnectionMessage());
}
public MessagingRemotingConnection getRemotingConnection()
Modified: trunk/src/main/org/jboss/jms/client/impl/ClientConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/impl/ClientConsumerImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/impl/ClientConsumerImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -114,7 +114,7 @@
try
{
- remotingConnection.sendBlocking(id, new CloseMessage());
+ remotingConnection.send(id, new CloseMessage());
}
finally
{
@@ -134,7 +134,7 @@
try
{
- remotingConnection.sendBlocking(id, new ClosingMessage());
+ remotingConnection.send(id, new ClosingMessage());
//Important! We set the handler to null so the next ListenerRunner won't run
if (handler != null)
@@ -185,7 +185,7 @@
{
checkClosed();
- remotingConnection.sendOneWay(id, new ConsumerChangeRateMessage(newRate));
+ remotingConnection.send(id, new ConsumerChangeRateMessage(newRate), true);
}
public MessageHandler getMessageHandler() throws JMSException
Modified: trunk/src/main/org/jboss/jms/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/impl/ClientSessionImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/impl/ClientSessionImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -155,7 +155,7 @@
try
{
- remotingConnection.sendBlocking(id, new CloseMessage());
+ remotingConnection.send(id, new CloseMessage());
executor.shutdownNow();
}
@@ -182,7 +182,7 @@
ClosingMessage request = new ClosingMessage();
- remotingConnection.sendBlocking(id, request);
+ remotingConnection.send(id, request);
}
public ClientConnection getConnection()
@@ -194,7 +194,7 @@
{
checkClosed();
- remotingConnection.sendBlocking(id, new AddTemporaryDestinationMessage(destination));
+ remotingConnection.send(id, new AddTemporaryDestinationMessage(destination), false);
}
public void commit() throws JMSException
@@ -210,7 +210,7 @@
//instead of this we could possibly add the lastDeliveryID in the SessionCommitMessage
acknowledgeInternal(false);
- remotingConnection.sendBlocking(id, new SessionCommitMessage());
+ remotingConnection.send(id, new SessionCommitMessage());
}
public void rollback() throws JMSException
@@ -234,7 +234,7 @@
//instead of this we could possibly add the lastDeliveryID in the SessionRollbackMessage
acknowledgeInternal(false);
- remotingConnection.sendBlocking(id, new SessionRollbackMessage());
+ remotingConnection.send(id, new SessionRollbackMessage());
}
public ClientBrowser createClientBrowser(Destination queue, String messageSelector)
@@ -246,7 +246,7 @@
CreateBrowserRequest request = new CreateBrowserRequest(queue, coreSelector);
- CreateBrowserResponse response = (CreateBrowserResponse)remotingConnection.sendBlocking(id, request);
+ CreateBrowserResponse response = (CreateBrowserResponse)remotingConnection.send(id, request);
ClientBrowser browser = new ClientBrowserImpl(remotingConnection, this, response.getBrowserID());
@@ -265,7 +265,7 @@
CreateConsumerRequest request =
new CreateConsumerRequest(destination, coreSelector, noLocal, subscriptionName, false);
- CreateConsumerResponse response = (CreateConsumerResponse)remotingConnection.sendBlocking(id, request);
+ CreateConsumerResponse response = (CreateConsumerResponse)remotingConnection.send(id, request);
ClientConsumer consumer =
new ClientConsumerImpl(this, response.getConsumerID(), response.getBufferSize(),
@@ -301,7 +301,7 @@
CreateDestinationRequest request = new CreateDestinationRequest(queueName, true);
- CreateDestinationResponse response = (CreateDestinationResponse)remotingConnection.sendBlocking(id, request);
+ CreateDestinationResponse response = (CreateDestinationResponse)remotingConnection.send(id, request);
return (JBossQueue) response.getDestination();
}
@@ -312,7 +312,7 @@
CreateDestinationRequest request = new CreateDestinationRequest(topicName, false);
- CreateDestinationResponse response = (CreateDestinationResponse)remotingConnection.sendBlocking(id, request);
+ CreateDestinationResponse response = (CreateDestinationResponse)remotingConnection.send(id, request);
return (JBossTopic) response.getDestination();
}
@@ -321,7 +321,7 @@
{
checkClosed();
- remotingConnection.sendBlocking(id, new DeleteTemporaryDestinationMessage(destination));
+ remotingConnection.send(id, new DeleteTemporaryDestinationMessage(destination));
}
//Internal method to be called from consumerImpl - should not expose this publicly
@@ -348,7 +348,7 @@
if (deliveryExpired)
{
- remotingConnection.sendOneWay(id, new SessionCancelMessage(lastID, true));
+ remotingConnection.send(id, new SessionCancelMessage(lastID, true), true);
toAckCount = 0;
}
@@ -377,28 +377,8 @@
return;
}
- if (broken)
- {
- if (block)
- {
- remotingConnection.sendBlocking(id, new SessionAcknowledgeMessage(lastID, false));
- }
- else
- {
- remotingConnection.sendOneWay(id, new SessionAcknowledgeMessage(lastID, false));
- }
- }
- else
- {
- if (block)
- {
- remotingConnection.sendBlocking(id, new SessionAcknowledgeMessage(lastID, true));
- }
- else
- {
- remotingConnection.sendOneWay(id, new SessionAcknowledgeMessage(lastID, true));
- }
- }
+ SessionAcknowledgeMessage message = new SessionAcknowledgeMessage(lastID, !broken);
+ remotingConnection.send(id, message, !block);
acked = true;
}
@@ -407,7 +387,7 @@
{
checkClosed();
- remotingConnection.sendBlocking(id, new UnsubscribeMessage(subscriptionName));
+ remotingConnection.send(id, new UnsubscribeMessage(subscriptionName));
}
public XAResource getXAResource()
@@ -421,14 +401,7 @@
SessionSendMessage message = new SessionSendMessage(m);
- if (m.isDurable())
- {
- remotingConnection.sendBlocking(id, message);
- }
- else
- {
- remotingConnection.sendOneWay(id, message);
- }
+ remotingConnection.send(id, message, !m.isDurable());
}
public void removeConsumer(ClientConsumer consumer) throws JMSException
@@ -441,7 +414,7 @@
//2. cancel all deliveries on server but not in tx
- remotingConnection.sendBlocking(id, new SessionCancelMessage(-1, false));
+ remotingConnection.send(id, new SessionCancelMessage(-1, false));
}
public void removeProducer(ClientProducer producer)
Modified: trunk/src/main/org/jboss/jms/client/remoting/MessagingRemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/MessagingRemotingConnection.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/jms/client/remoting/MessagingRemotingConnection.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -36,7 +36,6 @@
import org.jboss.messaging.core.remoting.wireformat.AbstractPacket;
import org.jboss.messaging.core.remoting.wireformat.JMSExceptionMessage;
import org.jboss.messaging.util.Logger;
-import org.jboss.messaging.util.Version;
import org.jgroups.persistence.CannotConnectException;
/**
@@ -122,21 +121,29 @@
{
return client.getSessionID();
}
-
- public void sendOneWay(String id, AbstractPacket packet) throws JMSException
+
+ /**
+ * send the packet and block until a response is received (<code>oneWay</code> is set to <code>false</code>)
+ */
+ public AbstractPacket send(String id, AbstractPacket packet) throws JMSException
{
- packet.setTargetID(id);
- client.sendOneWay(packet);
+ return send(id, packet, false);
}
- public AbstractPacket sendBlocking(String id, AbstractPacket packet) throws JMSException
+ public AbstractPacket send(String id, AbstractPacket packet, boolean oneWay) throws JMSException
{
+ assert packet != null;
+
packet.setTargetID(id);
-
try
{
- AbstractPacket response = (AbstractPacket) client.sendBlocking(packet);
+ AbstractPacket response = (AbstractPacket) client.send(packet, oneWay);
+ if (oneWay == false && response == null)
+ {
+ throw new IllegalStateException("No response received for " + packet);
+ }
+
if (response instanceof JMSExceptionMessage)
{
JMSExceptionMessage message = (JMSExceptionMessage) response;
@@ -151,7 +158,7 @@
catch (Throwable t)
{
throw handleThrowable(t);
- }
+ }
}
public synchronized void addConnectionListener(ConsolidatedRemotingConnectionListener listener)
Modified: trunk/src/main/org/jboss/messaging/core/remoting/Client.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/Client.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/messaging/core/remoting/Client.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -33,11 +33,24 @@
String getSessionID();
- void sendOneWay(AbstractPacket packet) throws JMSException;
+ /**
+ * @param packet
+ * The packet which is sent
+ * @param oneWay
+ * if the packet must be sent one-way (i.e. do not wait for a
+ * response)
+ * @return an {@link AbstractPacket} (if <code>oneWay</code> was set to
+ * <code>false</code>) or <code>null</code> (if
+ * <code>oneWay</code> was set to <code>true</code>)
+ *
+ * @throws JMSException
+ * if an exception has occured on the server
+ * @throws IOException
+ * if an exception has occured on the network
+ */
+ AbstractPacket send(AbstractPacket packet, boolean oneWay)
+ throws JMSException, IOException;
- AbstractPacket sendBlocking(AbstractPacket packet) throws IOException,
- JMSException;
-
void setBlockingRequestTimeout(int timeout, TimeUnit unit);
void addConnectionListener(
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/ClientImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/ClientImpl.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/ClientImpl.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -7,6 +7,7 @@
package org.jboss.messaging.core.remoting.impl;
import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.jboss.messaging.core.remoting.impl.mina.MinaService.TIMEOUT_KEY;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
@@ -57,9 +58,9 @@
this.connector = connector;
this.serverLocator = locator;
- if (locator.getParameters().containsKey("timeout"))
+ if (locator.getParameters().containsKey(TIMEOUT_KEY))
{
- int timeout = Integer.parseInt(locator.getParameters().get("timeout"));
+ int timeout = Integer.parseInt(locator.getParameters().get(TIMEOUT_KEY));
setBlockingRequestTimeout(timeout, SECONDS);
}
}
@@ -99,32 +100,20 @@
return session.getID();
}
- public void sendOneWay(AbstractPacket packet) throws JMSException
+ public AbstractPacket send(AbstractPacket packet, boolean oneWay)
+ throws JMSException, IOException
{
assert packet != null;
checkConnected();
- packet.setOneWay(true);
-
- session.write(packet);
- }
+ packet.setOneWay(oneWay);
- public AbstractPacket sendBlocking(AbstractPacket packet)
- throws IOException, JMSException
- {
- assert packet != null;
- checkConnected();
-
- packet.setOneWay(false);
- try
+ if (oneWay)
{
- AbstractPacket response = (AbstractPacket) session.writeAndBlock(packet,
- blockingRequestTimeout, blockingRequestTimeUnit);
- return response;
- } catch (Throwable t)
+ sendOneWay(packet);
+ return null;
+ } else
{
- IOException ioe = new IOException();
- ioe.initCause(t);
- throw ioe;
+ return sendBlocking(packet);
}
}
@@ -199,6 +188,27 @@
+ " is not connected.");
}
}
+
+ private void sendOneWay(AbstractPacket packet) throws JMSException
+ {
+ session.write(packet);
+ }
+ private AbstractPacket sendBlocking(AbstractPacket packet)
+ throws IOException, JMSException
+ {
+ try
+ {
+ AbstractPacket response = (AbstractPacket) session.writeAndBlock(packet,
+ blockingRequestTimeout, blockingRequestTimeUnit);
+ return response;
+ } catch (Throwable t)
+ {
+ IOException ioe = new IOException();
+ ioe.initCause(t);
+ throw ioe;
+ }
+ }
+
// Inner classes -------------------------------------------------
}
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/mina/MinaService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/mina/MinaService.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/mina/MinaService.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -44,6 +44,7 @@
private static final Logger log = Logger.getLogger(MinaService.class);
+ public static final String TIMEOUT_KEY = "timeout";
public static final String KEEP_ALIVE_INTERVAL_KEY = "keepAliveInterval";
public static final String KEEP_ALIVE_TIMEOUT_KEY = "keepAliveTimeout";
public static final String DISABLE_INVM_KEY = "disable-invm";
Modified: trunk/tests/src/org/jboss/messaging/core/remoting/impl/ClientTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/remoting/impl/ClientTestBase.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/tests/src/org/jboss/messaging/core/remoting/impl/ClientTestBase.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -72,7 +72,7 @@
TextPacket packet = new TextPacket("testSendOneWay");
packet.setTargetID(serverPacketHandler.getID());
- client.sendOneWay(packet);
+ client.send(packet, true);
assertTrue(serverPacketHandler.await(2, SECONDS));
@@ -91,7 +91,7 @@
{
packets[i] = new TextPacket("testSendManyOneWay " + i);
packets[i].setTargetID(serverPacketHandler.getID());
- client.sendOneWay(packets[i]);
+ client.send(packets[i], true);
}
assertTrue(serverPacketHandler.await(10, SECONDS));
@@ -116,7 +116,7 @@
packet.setTargetID(serverPacketHandler.getID());
packet.setCallbackID(callbackHandler.getID());
- client.sendOneWay(packet);
+ client.send(packet, true);
assertTrue(callbackHandler.await(5, SECONDS));
@@ -130,7 +130,7 @@
TextPacket request = new TextPacket("testSendBlocking");
request.setTargetID(serverPacketHandler.getID());
- AbstractPacket receivedPacket = client.sendBlocking(request);
+ AbstractPacket receivedPacket = client.send(request, false);
assertNotNull(receivedPacket);
assertTrue(receivedPacket instanceof TextPacket);
@@ -143,13 +143,13 @@
TextPacket request = new TextPacket("testSendBlocking");
request.setTargetID(serverPacketHandler.getID());
- AbstractPacket receivedPacket = client.sendBlocking(request);
+ AbstractPacket receivedPacket = client.send(request, false);
long correlationID = request.getCorrelationID();
assertNotNull(receivedPacket);
assertEquals(request.getCorrelationID(), receivedPacket.getCorrelationID());
- receivedPacket = client.sendBlocking(request);
+ receivedPacket = client.send(request, false);
assertEquals(correlationID + 1, request.getCorrelationID());
assertEquals(correlationID + 1, receivedPacket.getCorrelationID());
}
@@ -167,7 +167,7 @@
packet.setTargetID(serverPacketHandler.getID());
// send a packet to create a sender when the server
// handles the packet
- client.sendOneWay(packet);
+ client.send(packet, true);
assertTrue(serverPacketHandler.await(2, SECONDS));
Modified: trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/MinaClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/MinaClientTest.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/MinaClientTest.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -52,7 +52,7 @@
try
{
- client.sendBlocking(packet);
+ client.send(packet, false);
fail("a IOException should be thrown");
} catch (IOException e)
{
Modified: trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/ServerKeepAliveTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/ServerKeepAliveTest.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/integration/test/ServerKeepAliveTest.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -96,7 +96,7 @@
NIOSession session = connector.connect();
boolean firedKeepAliveNotification = latch.await(KEEP_ALIVE_INTERVAL
- + KEEP_ALIVE_TIMEOUT + 1, SECONDS);
+ + KEEP_ALIVE_TIMEOUT + 2, SECONDS);
assertTrue(firedKeepAliveNotification);
assertEquals(session.getID(), sessionIDNotResponding[0]);
Modified: trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/stress/PacketStressTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/stress/PacketStressTest.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/tests/src/org/jboss/messaging/core/remoting/impl/mina/stress/PacketStressTest.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -93,7 +93,7 @@
long start = System.currentTimeMillis();
for (int i = 0; i < MANY_MESSAGES; i++)
{
- client.sendOneWay(packet);
+ client.send(packet, true);
if (i % spinner == 0)
System.out.print('#');
}
Modified: trunk/tests/src/org/jboss/messaging/core/remoting/test/unit/ClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/core/remoting/test/unit/ClientTest.java 2008-01-29 11:33:39 UTC (rev 3640)
+++ trunk/tests/src/org/jboss/messaging/core/remoting/test/unit/ClientTest.java 2008-01-29 14:47:52 UTC (rev 3641)
@@ -156,7 +156,7 @@
Client client = new ClientImpl(connector, serverLocator);
try
{
- client.sendOneWay(new NullPacket());
+ client.send(new NullPacket(), true);
fail("can not send a packet if the dispatcher is not connected");
} catch (IllegalStateException e)
{
More information about the jboss-cvs-commits
mailing list