[jboss-cvs] JBoss Messaging SVN: r2019 - in trunk: tests/src/org/jboss/test/thirdparty/remoting and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 22 21:31:33 EST 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-01-22 21:31:33 -0500 (Mon, 22 Jan 2007)
New Revision: 2019
Modified:
trunk/src/main/org/jboss/jms/client/remoting/ConnectionFactoryCallbackHandler.java
trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
trunk/tests/src/org/jboss/test/thirdparty/remoting/ManualConnectionValidatorTest.java
Log:
minor reformatting
Modified: trunk/src/main/org/jboss/jms/client/remoting/ConnectionFactoryCallbackHandler.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/ConnectionFactoryCallbackHandler.java 2007-01-22 16:53:05 UTC (rev 2018)
+++ trunk/src/main/org/jboss/jms/client/remoting/ConnectionFactoryCallbackHandler.java 2007-01-23 02:31:33 UTC (rev 2019)
@@ -57,6 +57,8 @@
this.connectionDelegate = connectionDelegate;
}
+ // Public ---------------------------------------------------------------------------------------
+
public void handleMessage(Object message)
{
if (trace) { log.trace(this + " handling " + message); }
@@ -75,8 +77,6 @@
}
}
- // Public ---------------------------------------------------------------------------------------
-
public String toString()
{
return "ConnectionFactoryCallbackHandler[" + connectionDelegate + "]";
Modified: trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java 2007-01-22 16:53:05 UTC (rev 2018)
+++ trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java 2007-01-23 02:31:33 UTC (rev 2019)
@@ -53,11 +53,11 @@
*/
public class MessageCallbackHandler
{
- // Constants -----------------------------------------------------
+ // Constants ------------------------------------------------------------------------------------
private static final Logger log;
- // Static --------------------------------------------------------
+ // Static ---------------------------------------------------------------------------------------
private static boolean trace;
@@ -128,7 +128,8 @@
return;
}
- DeliveryInfo deliveryInfo = new DeliveryInfo(m, consumerID, channelID, connectionConsumerSession);
+ DeliveryInfo deliveryInfo =
+ new DeliveryInfo(m, consumerID, channelID, connectionConsumerSession);
m.incDeliveryCount();
@@ -168,8 +169,8 @@
{
// postDeliver only if the session is not closed
- // If this is the callback-handler for a connection consumer we don't want to acknowledge or
- // add anything to the tx for this session
+ // If this is the callback-handler for a connection consumer we don't want to acknowledge
+ // or add anything to the tx for this session
if (!isConnectionConsumer)
{
sess.postDeliver();
@@ -177,7 +178,7 @@
}
}
- // Attributes ----------------------------------------------------
+ // Attributes -----------------------------------------------------------------------------------
/*
* The buffer is now a priority linked list
@@ -205,7 +206,7 @@
private boolean startSendingMessageSent;
private long lastDeliveryId = -1;
- // Constructors --------------------------------------------------
+ // Constructors ---------------------------------------------------------------------------------
public MessageCallbackHandler(boolean isCC, int ackMode,
SessionDelegate sess, ConsumerDelegate cons, int consumerID,
@@ -233,7 +234,7 @@
this.startSendingMessageSent = true;
}
- // Public --------------------------------------------------------
+ // Public ---------------------------------------------------------------------------------------
/**
@@ -288,7 +289,8 @@
if (receiverThread != null)
{
// Should never happen
- throw new IllegalStateException("Consumer is currently in receive(..) Cannot set MessageListener");
+ throw new IllegalStateException("Consumer is currently in receive(..). " +
+ "Cannot set MessageListener");
}
this.listener = listener;
@@ -306,17 +308,17 @@
{
synchronized (mainLock)
{
- // Now we cancel anything left in the buffer. The reason we do this now is that otherwise the
- // deliveries wouldn't get cancelled until session close (since we don't cancel consumer's
- // deliveries until then), which is too late - since we need to preserve the order of messages
- // delivered in a session.
+ // Now we cancel anything left in the buffer. The reason we do this now is that otherwise
+ // the deliveries wouldn't get cancelled until session close (since we don't cancel
+ // consumer's deliveries until then), which is too late - since we need to preserve the
+ // order of messages delivered in a session.
if (!buffer.isEmpty())
{
// Now we cancel any deliveries that might be waiting in our buffer. This is because
// otherwise the messages wouldn't get cancelled until the corresponding session died.
- // So if another consumer in another session tried to consume from the channel before that
- // session died it wouldn't receive those messages.
+ // So if another consumer in another session tried to consume from the channel before
+ // that session died it wouldn't receive those messages.
// We can't just cancel all the messages in the SCE since some of those messages might
// have actually been delivered (unlike these) and we may want to acknowledge them
// later, after this consumer has been closed
@@ -327,7 +329,8 @@
{
MessageProxy mp = (MessageProxy)i.next();
- DefaultCancel ack = new DefaultCancel(mp.getDeliveryId(), mp.getDeliveryCount(), false, false);
+ DefaultCancel ack =
+ new DefaultCancel(mp.getDeliveryId(), mp.getDeliveryCount(), false, false);
cancels.add(ack);
}
@@ -391,7 +394,8 @@
if (listener != null)
{
- throw new JMSException("The consumer has a MessageListener set, cannot call receive(..)");
+ throw new JMSException("The consumer has a MessageListener set, " +
+ "cannot call receive(..)");
}
receiverThread = Thread.currentThread();
@@ -443,7 +447,8 @@
if (trace) { log.trace(this + " received " + m + " after being blocked on buffer"); }
- boolean ignore = checkExpiredOrReachedMaxdeliveries(m, sessionDelegate, maxDeliveries);
+ boolean ignore =
+ checkExpiredOrReachedMaxdeliveries(m, sessionDelegate, maxDeliveries);
if (!isConnectionConsumer && !ignore)
{
@@ -554,11 +559,11 @@
}
}
- // Package protected ---------------------------------------------
+ // Package protected ----------------------------------------------------------------------------
- // Protected -----------------------------------------------------
+ // Protected ------------------------------------------------------------------------------------
- // Private -------------------------------------------------------
+ // Private --------------------------------------------------------------------------------------
private void waitForOnMessageToComplete()
{
@@ -712,7 +717,7 @@
return m;
}
- // Inner classes -------------------------------------------------
+ // Inner classes --------------------------------------------------------------------------------
/*
* This class is used to put on the listener executor to wait for onMessage
@@ -790,7 +795,8 @@
{
try
{
- callOnMessage(sessionDelegate, listener, consumerID, channelID, false, mp, ackMode, maxDeliveries, null);
+ callOnMessage(sessionDelegate, listener, consumerID, channelID,
+ false, mp, ackMode, maxDeliveries, null);
}
catch (JMSException e)
{
Modified: trunk/tests/src/org/jboss/test/thirdparty/remoting/ManualConnectionValidatorTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/thirdparty/remoting/ManualConnectionValidatorTest.java 2007-01-22 16:53:05 UTC (rev 2018)
+++ trunk/tests/src/org/jboss/test/thirdparty/remoting/ManualConnectionValidatorTest.java 2007-01-23 02:31:33 UTC (rev 2019)
@@ -9,17 +9,10 @@
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;
import org.jboss.test.messaging.tools.jmx.ServiceContainer;
-import org.jboss.test.thirdparty.remoting.util.RemotingTestSubsystemService;
import org.jboss.test.thirdparty.remoting.util.SimpleConnectionListener;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.Client;
-import org.jboss.remoting.CannotConnectException;
-import javax.management.ObjectName;
-import java.io.IOException;
-import java.util.Map;
-import java.util.HashMap;
-
/**
* This test sets the connection validator ping period to a very small value, and then let the
* client ping for a long time. To be used with netstat to see if it creates new sockets for each
More information about the jboss-cvs-commits
mailing list