[jboss-cvs] JBoss Messaging SVN: r2284 - in trunk: src/main/org/jboss/jms/client/remoting and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 13 01:47:23 EST 2007


Author: ovidiu.feodorov at jboss.com
Date: 2007-02-13 01:47:23 -0500 (Tue, 13 Feb 2007)
New Revision: 2284

Modified:
   trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
   trunk/src/main/org/jboss/jms/client/remoting/CallbackManager.java
   trunk/src/main/org/jboss/jms/message/JBossMapMessage.java
   trunk/src/main/org/jboss/jms/message/JBossMessage.java
   trunk/src/main/org/jboss/jms/message/MessageProxy.java
   trunk/src/main/org/jboss/jms/selector/Selector.java
   trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java
   trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java
   trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
   trunk/src/main/org/jboss/jms/wireformat/CallbackSupport.java
   trunk/src/main/org/jboss/jms/wireformat/ClientDelivery.java
   trunk/src/main/org/jboss/jms/wireformat/Dispatcher.java
   trunk/src/main/org/jboss/messaging/core/ChannelSupport.java
   trunk/src/main/org/jboss/messaging/core/Delivery.java
   trunk/src/main/org/jboss/messaging/core/local/RoundRobinPointToPointRouter.java
   trunk/src/main/org/jboss/messaging/core/message/MessageFactory.java
   trunk/tests/src/org/jboss/test/messaging/core/SimpleReceiver.java
   trunk/tests/src/org/jboss/test/messaging/core/message/JBossMessageTest.java
   trunk/tests/src/org/jboss/test/messaging/core/paging/PagingTest.java
   trunk/tests/src/org/jboss/test/messaging/core/paging/SingleChannel_ReloadTest.java
   trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/DLQTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/MessageProxyTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
Log:
minor reformatting

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -209,8 +209,8 @@
    public void sendTransaction(TransactionRequest request,
                                boolean checkForDuplicates) throws JMSException
    {
-      RequestSupport req = new ConnectionSendTransactionRequest(id, version, request,
-         checkForDuplicates);
+      RequestSupport req =
+         new ConnectionSendTransactionRequest(id, version, request, checkForDuplicates);
       
       doInvoke(client, req);
    }

Modified: trunk/src/main/org/jboss/jms/client/remoting/CallbackManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/CallbackManager.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/client/remoting/CallbackManager.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -91,8 +91,8 @@
          
          Message msg = dr.getMessage();
          
-         MessageProxy proxy =
-            JBossMessage.createThinDelegate(dr.getDeliveryId(), (JBossMessage)msg, dr.getDeliveryCount());
+         MessageProxy proxy = JBossMessage.
+            createThinDelegate(dr.getDeliveryId(), (JBossMessage)msg, dr.getDeliveryCount());
 
          MessageCallbackHandler handler =
             (MessageCallbackHandler)callbackHandlers.get(new Integer(dr.getConsumerId()));

Modified: trunk/src/main/org/jboss/jms/message/JBossMapMessage.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/JBossMapMessage.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/message/JBossMapMessage.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -492,8 +492,7 @@
    protected Object readPayload(DataInputStream in, int length)
       throws Exception
    {
-      HashMap m = StreamUtils.readMap(in, true);
-      return m;
+      return StreamUtils.readMap(in, true);
    }
 
    // Private -------------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/message/JBossMessage.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/JBossMessage.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/message/JBossMessage.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -1076,7 +1076,9 @@
       }
 
       if (name.regionMatches(false, 0, "JMSX", 0, 4) &&
-         !name.equals("JMSXGroupID") && !name.equals("JMSXGroupSeq") && !name.equals("JMSXDeliveryCount"))
+         !name.equals("JMSXGroupID") &&
+         !name.equals("JMSXGroupSeq") &&
+         !name.equals("JMSXDeliveryCount"))
       {
          throw new JMSException("Can only set JMSXGroupId, JMSXGroupSeq, JMSXDeliveryCount");
       }           

Modified: trunk/src/main/org/jboss/jms/message/MessageProxy.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/MessageProxy.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/message/MessageProxy.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -30,7 +30,6 @@
 import javax.jms.MessageNotWriteableException;
 
 import org.jboss.jms.delegate.SessionDelegate;
-import org.jboss.logging.Logger;
 
 /**
  * 
@@ -57,8 +56,6 @@
 
    private static final long serialVersionUID = 5903095946142192468L;
    
-   private static final Logger log = Logger.getLogger(MessageProxy.class);   
-   
    // Static --------------------------------------------------------
 
    // Attributes ----------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/selector/Selector.java
===================================================================
--- trunk/src/main/org/jboss/jms/selector/Selector.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/selector/Selector.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -46,9 +46,6 @@
  */
 public class Selector implements Filter
 {
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 1456143116781848968L;
-
    /** The logging interface */
    static Logger cat = Logger.getLogger(Selector.class);
    

Modified: trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -30,7 +30,6 @@
 import org.jboss.jms.server.JMSCondition;
 import org.jboss.jms.server.messagecounter.MessageCounter;
 import org.jboss.jms.util.MessageQueueNameHelper;
-import org.jboss.logging.Logger;
 import org.jboss.messaging.core.Queue;
 import org.jboss.messaging.core.message.Message;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
@@ -48,8 +47,6 @@
  */
 public class ManagedTopic extends ManagedDestination
 {  
-   private static final Logger log = Logger.getLogger(ManagedTopic.class); 
-   
    public ManagedTopic()
    {      
    }

Modified: trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -193,7 +193,7 @@
                }
                catch (SQLException e) 
                {
-                  log.warn("Failed to execute: " + statement, e);
+                  log.warn("Failed to execute " + statement, e);
                }  
             }      
          }

Modified: trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -28,7 +28,6 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -40,7 +39,6 @@
 import org.jboss.jms.wireformat.ResponseSupport;
 import org.jboss.jms.wireformat.SerializedPacket;
 import org.jboss.logging.Logger;
-import org.jboss.remoting.Client;
 import org.jboss.remoting.InvocationRequest;
 import org.jboss.remoting.InvocationResponse;
 import org.jboss.remoting.callback.Callback;
@@ -80,14 +78,6 @@
    
    // Static ---------------------------------------------------------------------------------------
 
-   private static Map ONE_WAY_METADATA;
-   
-   static
-   {
-      ONE_WAY_METADATA = new HashMap();
-      ONE_WAY_METADATA.put(Client.ONEWAY_FLAG, "true");
-   }
-
    // Attributes -----------------------------------------------------------------------------------
 
    protected boolean trace;
@@ -236,10 +226,11 @@
                // List of polled Callbacks, this is how messages are delivered when using
                // polled callbacks e.g. the HTTP transport
                
-               //Sanity check
+               // Sanity check
                if (((List)param).isEmpty())
                {
-                  log.error("Got a polled callback list - but it is empty!!! See http://jira.jboss.org/jira/browse/JBMESSAGING-818");
+                  log.error("Got a polled callback list - but it is empty!!! " +
+                     "See http://jira.jboss.org/jira/browse/JBMESSAGING-818");
                }
                
                packet = new PolledCallbacksDelivery((List)param, resp.getSessionId());             

Modified: trunk/src/main/org/jboss/jms/wireformat/CallbackSupport.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/CallbackSupport.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/wireformat/CallbackSupport.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -59,11 +59,8 @@
 
       OnewayInvocation oi = new OnewayInvocation(ii);
 
-      InvocationRequest request
-         = new InvocationRequest(null, CallbackManager.JMS_CALLBACK_SUBSYSTEM,
-                                 oi, ONE_WAY_METADATA, null, null);
-      
-      return request;
+      return new InvocationRequest(null, CallbackManager.JMS_CALLBACK_SUBSYSTEM, oi,
+                                   ONE_WAY_METADATA, null, null);
    }
    
 }

Modified: trunk/src/main/org/jboss/jms/wireformat/ClientDelivery.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ClientDelivery.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/wireformat/ClientDelivery.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -24,7 +24,6 @@
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 
-import org.jboss.logging.Logger;
 import org.jboss.messaging.core.message.Message;
 import org.jboss.messaging.core.message.MessageFactory;
 
@@ -41,15 +40,12 @@
  */
 public class ClientDelivery extends CallbackSupport
 {
-   // Constants -----------------------------------------------------
+   // Constants ------------------------------------------------------------------------------------
    
-   private static final Logger log = Logger.getLogger(ClientDelivery.class);
+   // Static ---------------------------------------------------------------------------------------
    
+   // Attributes -----------------------------------------------------------------------------------
    
-   // Static --------------------------------------------------------
-   
-   // Attributes ----------------------------------------------------
-   
    private Message msg;
          
    private int consumerId;
@@ -58,7 +54,7 @@
    
    private int deliveryCount;
     
-   // Constructors --------------------------------------------------
+   // Constructors ---------------------------------------------------------------------------------
    
    public ClientDelivery()
    {      
@@ -77,9 +73,8 @@
       this.deliveryCount = deliveryCount;
    }
          
-   // Streamable implementation
-   // ---------------------------------------------------------------
-   
+   // Streamable implementation --------------------------------------------------------------------
+
    public void write(DataOutputStream out) throws Exception
    {
 
@@ -114,7 +109,7 @@
       msg.read(in);
    }
 
-   // Public --------------------------------------------------------
+   // Public ---------------------------------------------------------------------------------------
    
    public Message getMessage()
    {
@@ -141,11 +136,11 @@
       return "ClientDelivery[" + msg + "]";
    }
 
-   // Package protected ---------------------------------------------
+   // Package protected ----------------------------------------------------------------------------
    
-   // Protected -----------------------------------------------------
+   // Protected ------------------------------------------------------------------------------------
    
-   // Private -------------------------------------------------------
+   // Private --------------------------------------------------------------------------------------
    
-   // Inner classes -------------------------------------------------   
+   // Inner classes --------------------------------------------------------------------------------   
 }

Modified: trunk/src/main/org/jboss/jms/wireformat/Dispatcher.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/Dispatcher.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/jms/wireformat/Dispatcher.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -72,21 +72,20 @@
    
    public boolean unregisterTarget(Integer id, Object endpoint)
    {
-      //Note that we pass the object id in, this is as a sanity check
-      //to ensure the object we are deregistering is the correct one
-      //since there have been bugs related to removing deregistering the wrong object
-      //This can happen if an earlier test opens a connection then the test ends without closing
-      //the connection, then on the server side the serverpeer is restarted which resets the object
-      //counter, so a different object is registered under the id of the old object.
-      //Remoting then times out the old connection and dereigsters the new object which is
-      //registered under the same id
-      //See http://jira.jboss.com/jira/browse/JBMESSAGING-812
+      // Note that we pass the object id in, this is as a sanity check to ensure the object we are
+      // deregistering is the correct one since there have been bugs related to deregistering the
+      // wrong object. This can happen if an earlier test opens a connection then the test ends
+      // without closing the connection, then on the server side the serverpeer is restarted which
+      // resets the object counter, so a different object is registered under the id of the old
+      // object. Remoting then times out the old connection and dereigsters the new object which is
+      // registered under the same id.
+      // See http://jira.jboss.com/jira/browse/JBMESSAGING-812
       
       AdvisedSupport advised = (AdvisedSupport)(targets.get(id));
       
       if (advised == null)
       {
-         //This can happen due to See http://jira.jboss.com/jira/browse/JBMESSAGING-812         
+         // This can happen due to http://jira.jboss.com/jira/browse/JBMESSAGING-812
          log.warn("Cannot find object with id " + id + " to register");
          return false;
       }

Modified: trunk/src/main/org/jboss/messaging/core/ChannelSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/ChannelSupport.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/messaging/core/ChannelSupport.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -47,16 +47,15 @@
 
 /**
  * 
- * This class provides much of the functionality needed to implement a channel.
+ * This class provides much of the functionality needed to implement a channel. This partial
+ * implementation supports atomicity, isolation and recoverability of reliable messages.
  * 
- * This partial implementation supports atomicity, isolation and recoverability of reliable messages.
+ * It uses a "SEDA-type" approach, where requests to handle messages, and deliver to receivers are
+ * not executed concurrently but placed on an event queue and executed serially by a single thread.
  * 
- * It uses a "SEDA-type" approach, where requests to handle messages,
- * and deliver to receivers are not executed concurrently but placed on an event
- * queue and executed serially by a single thread.
+ * Currently remoting does not support a non blocking API so a full SEDA approach is not possible
+ * at this stage.
  * 
- * Currently remoting does not support a non blocking API so a full SEDA approach is not possible at this stage.
- * 
  * @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: ChannelSupport.java,v 1.65

Modified: trunk/src/main/org/jboss/messaging/core/Delivery.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/Delivery.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/messaging/core/Delivery.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -43,8 +43,8 @@
 
    DeliveryObserver getObserver();
 
-   // TODO this doesn't actually belong in the delivery, the selector should be moved "inside" the channel
-   //      See http://jira.jboss.org/jira/browse/JBMESSAGING-275
+   // TODO this doesn't actually belong in the delivery, the selector should be moved "inside"
+   //      the channel. See http://jira.jboss.org/jira/browse/JBMESSAGING-275
 
    boolean isSelectorAccepted();
    

Modified: trunk/src/main/org/jboss/messaging/core/local/RoundRobinPointToPointRouter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/local/RoundRobinPointToPointRouter.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/messaging/core/local/RoundRobinPointToPointRouter.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -35,9 +35,9 @@
 
 /**
  *  
- * The router will always first try the next receiver in the list to the one it tried last time
- * This gives a more balanced distribution than the FirstReceiverPointToPointRouter and is
- * better suited when batching messages to consumers since we will end up with messages interleaved amongst
+ * The router will always first try the next receiver in the list to the one it tried last time.
+ * This gives a more balanced distribution than the FirstReceiverPointToPointRouter and is better
+ * suited when batching messages to consumers since we will end up with messages interleaved amongst
  * consumers rather than in contiguous blocks.
  *  
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
@@ -47,13 +47,13 @@
  */
 public class RoundRobinPointToPointRouter implements Router
 {
-   // Constants -----------------------------------------------------
+   // Constants ------------------------------------------------------------------------------------
 
    private static final Logger log = Logger.getLogger(RoundRobinPointToPointRouter.class);
 
-   // Static --------------------------------------------------------
+   // Static ---------------------------------------------------------------------------------------
    
-   // Attributes ----------------------------------------------------
+   // Attributes -----------------------------------------------------------------------------------
    
    private boolean trace = log.isTraceEnabled();
 
@@ -66,7 +66,7 @@
    
    private ArrayList receiversCopy;
    
-   // Constructors --------------------------------------------------
+   // Constructors ---------------------------------------------------------------------------------
 
    public RoundRobinPointToPointRouter()
    {
@@ -77,7 +77,7 @@
       makeCopy = true;
    }
 
-   // Router implementation -----------------------------------------
+   // Router implementation ------------------------------------------------------------------------
    
    public Delivery handle(DeliveryObserver observer, MessageReference ref, Transaction tx)
    {             
@@ -85,9 +85,9 @@
       {
          synchronized (this)
          {         
-            //We make a copy of the receivers to avoid a race condition:
-            //http://jira.jboss.org/jira/browse/JBMESSAGING-505
-            //Note that we do not make a copy every time - only when the receivers have changed
+            // We make a copy of the receivers to avoid a race condition:
+            // http://jira.jboss.org/jira/browse/JBMESSAGING-505
+            // Note that we do not make a copy every time - only when the receivers have changed
          
             receiversCopy = new ArrayList(receivers);
             
@@ -209,13 +209,13 @@
       return receivers.size();      
    }
 
-   // Public --------------------------------------------------------
+   // Public ---------------------------------------------------------------------------------------
 
-   // Package protected ---------------------------------------------
+   // Package protected ----------------------------------------------------------------------------
    
-   // Protected -----------------------------------------------------
+   // Protected ------------------------------------------------------------------------------------
 
-   // Private -------------------------------------------------------
+   // Private --------------------------------------------------------------------------------------
    
    private void incTarget()
    {
@@ -227,6 +227,6 @@
       }
    }
    
-   // Inner classes -------------------------------------------------   
+   // Inner classes --------------------------------------------------------------------------------
 }
 

Modified: trunk/src/main/org/jboss/messaging/core/message/MessageFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/MessageFactory.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/src/main/org/jboss/messaging/core/message/MessageFactory.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -39,9 +39,9 @@
  */
 public class MessageFactory
 {
-   // Constants -----------------------------------------------------
+   // Constants ------------------------------------------------------------------------------------
 
-   // Static --------------------------------------------------------
+   // Static ---------------------------------------------------------------------------------------
 
    public static Message createMessage(byte type)
    {
@@ -102,43 +102,44 @@
       {
          case JBossMessage.TYPE:
          {
-            m = new JBossMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m = new JBossMessage(messageID, reliable, expiration,
+                                 timestamp, priority, headers, payload);
             break;
          }
          case JBossObjectMessage.TYPE:
          {
-            m = new JBossObjectMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m =  new JBossObjectMessage(messageID, reliable, expiration,
+                                        timestamp, priority, headers, payload);
             break;
          }
          case JBossTextMessage.TYPE:
          {
-            m = new JBossTextMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m = new JBossTextMessage(messageID, reliable, expiration,
+                                     timestamp, priority, headers, payload);
             break;
          }
          case JBossBytesMessage.TYPE:
          {
-            m = new JBossBytesMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m = new JBossBytesMessage(messageID, reliable, expiration,
+                                      timestamp, priority, headers, payload);
             break;
          }
          case JBossMapMessage.TYPE:
          {
-            m = new JBossMapMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m = new JBossMapMessage(messageID, reliable, expiration,
+                                    timestamp, priority, headers, payload);
             break;
          }
          case JBossStreamMessage.TYPE:
          {
-            m = new JBossStreamMessage(messageID, reliable, expiration, timestamp, priority, headers,
-                     payload);
+            m = new JBossStreamMessage(messageID, reliable, expiration,
+                                       timestamp, priority, headers, payload);
             break;
          }
          case CoreMessage.TYPE:
          {
-            m = new CoreMessage(messageID, reliable, expiration, timestamp, priority, headers, payload);
+            m = new CoreMessage(messageID, reliable, expiration,
+                                timestamp, priority, headers, payload);
             break;
          }
          default:
@@ -152,18 +153,18 @@
       return m;
    }
 
-   // Attributes ----------------------------------------------------
+   // Attributes -----------------------------------------------------------------------------------
    
-   // Constructors --------------------------------------------------
+   // Constructors ---------------------------------------------------------------------------------
    
-   // Public --------------------------------------------------------
+   // Public ---------------------------------------------------------------------------------------
 
-   // Package protected ---------------------------------------------
+   // Package protected ----------------------------------------------------------------------------
    
-   // Protected -----------------------------------------------------
+   // Protected ------------------------------------------------------------------------------------
    
-   // Private -------------------------------------------------------
+   // Private --------------------------------------------------------------------------------------
    
-   // Inner classes -------------------------------------------------   
+   // Inner classes --------------------------------------------------------------------------------   
 }
 

Modified: trunk/tests/src/org/jboss/test/messaging/core/SimpleReceiver.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/SimpleReceiver.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/core/SimpleReceiver.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -159,7 +159,7 @@
 
          log.trace("State is:" + state);
          
-         boolean done = ACKING.equals(state) ? true : false;
+         boolean done = ACKING.equals(state);
          
          //NOTE! it is NOT Nacking, it is keeping - don't say NACKing - it is misleading (nack means cancel)         
          log.trace(this + " is " + (done ? "ACKing" : "Keeping") +  " message " + ref);

Modified: trunk/tests/src/org/jboss/test/messaging/core/message/JBossMessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/message/JBossMessageTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/core/message/JBossMessageTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -56,8 +56,8 @@
 
    protected void setUp() throws Exception
    {
-      ms = (MessageSupport)MessageFactory.createMessage(0, false, 0, 0, (byte)4, null,
-                                                             null, JBossMessage.TYPE);
+      ms = (MessageSupport)MessageFactory.
+         createMessage(0, false, 0, 0, (byte)4, null, null, JBossMessage.TYPE);
       super.setUp();
       log.debug("setup done");
    }

Modified: trunk/tests/src/org/jboss/test/messaging/core/paging/PagingTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/paging/PagingTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/core/paging/PagingTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -63,7 +63,9 @@
 
    public void testPaging() throws Exception
    {
-      PagingFilteredQueue p = new PagingFilteredQueue("queue0", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue p =
+         new PagingFilteredQueue("queue0", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
            
       CoreMessage m = null;
 

Modified: trunk/tests/src/org/jboss/test/messaging/core/paging/SingleChannel_ReloadTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/paging/SingleChannel_ReloadTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/core/paging/SingleChannel_ReloadTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -68,7 +68,9 @@
    
    public void testRecoverableQueueCrash() throws Throwable
    {
-      PagingFilteredQueue queue = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue queue =
+         new PagingFilteredQueue("queue1", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
 
       Message[] msgs = new Message[200];
       
@@ -129,7 +131,9 @@
 
       tr.start();
          
-      PagingFilteredQueue queue2 = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue queue2 =
+         new PagingFilteredQueue("queue1", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
       queue2.deactivate();
       queue2.load();
       
@@ -164,7 +168,9 @@
    {
       //Non recoverable queue - eg temporary queue
       
-      PagingFilteredQueue queue = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue queue =
+         new PagingFilteredQueue("queue1", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
       
       Message[] msgs = new Message[200];
       
@@ -225,7 +231,9 @@
       tr = new TransactionRepository(pm, ms, idm);
       tr.start();
 
-      PagingFilteredQueue queue2 = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue queue2 =
+         new PagingFilteredQueue("queue1", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
       queue2.deactivate();
       queue2.load();
       
@@ -254,7 +262,9 @@
    {
       //Non recoverable queue - eg temporary queue
       
-      PagingFilteredQueue queue = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), -1, null, 100, 20, 10);
+      PagingFilteredQueue queue =
+         new PagingFilteredQueue("queue1", 1, ms, pm, true, true,
+                                 new QueuedExecutor(), -1, null, 100, 20, 10);
   
       Message[] msgs = new Message[200];
       

Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -93,13 +93,15 @@
       
    }
    
-   protected void doSetup(boolean batch, boolean useBinaryStream, boolean trailingByte, int maxParams) throws Throwable
+   protected void doSetup(boolean batch, boolean useBinaryStream,
+                          boolean trailingByte, int maxParams) throws Throwable
    {
       pm = createPM(batch, useBinaryStream, trailingByte, maxParams);         
       ms = new SimpleMessageStore();      
    }
    
-   protected JDBCPersistenceManager createPM(boolean batch, boolean useBinaryStream, boolean trailingByte, int maxParams) throws Throwable
+   protected JDBCPersistenceManager createPM(boolean batch, boolean useBinaryStream,
+                                             boolean trailingByte, int maxParams) throws Throwable
    {      
       JDBCPersistenceManager p =
          new JDBCPersistenceManager(sc.getDataSource(), sc.getTransactionManager(),

Modified: trunk/tests/src/org/jboss/test/messaging/jms/DLQTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DLQTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DLQTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -440,8 +440,8 @@
          
          assertNull(m);
          
-         //So let's try and consume them - this should cause them to go to the DLQ - since they will then exceed max
-         //delivery attempts
+         // So let's try and consume them - this should cause them to go to the DLQ - since they
+         // will then exceed max delivery attempts
          m = cons.receive(1000);
          
          assertNull(m);
@@ -456,10 +456,12 @@
 
             assertEquals("Message:" + i, tm.getText());
             
-            //Check the headers
-            String origDest = tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_DESTINATION);
+            // Check the headers
+            String origDest =
+               tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_DESTINATION);
             
-            String origMessageId = tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_MESSAGE_ID);
+            String origMessageId =
+               tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_MESSAGE_ID);
             
             assertEquals(queue.toString(), origDest);
             

Modified: trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -114,8 +114,14 @@
       }
       finally
       {
-         if (c1 != null) c1.close();
-         if (c2 != null) c2.close();
+         if (c1 != null)
+         {
+            c1.close();
+         }
+         if (c2 != null)
+         {
+            c2.close();
+         }
       }
    }
 
@@ -133,9 +139,18 @@
       }
       finally
       {
-         if (c0 != null) c0.close();
-         if (c1 != null) c1.close();
-         if (c2 != null) c2.close();
+         if (c0 != null)
+         {
+            c0.close();
+         }
+         if (c1 != null)
+         {
+            c1.close();
+         }
+         if (c2 != null)
+         {
+            c2.close();
+         }
       }
    }
 

Modified: trunk/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/jms/ExpiryQueueTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -406,12 +406,15 @@
                break;
             }
             
-            //Check the headers
-            String origDest = tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_DESTINATION);
+            // Check the headers
+            String origDest =
+               tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_DESTINATION);
             
-            String origMessageId = tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_MESSAGE_ID);
+            String origMessageId =
+               tm.getStringProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ORIG_MESSAGE_ID);
             
-            long actualExpiryTime = tm.getLongProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ACTUAL_EXPIRY_TIME);
+            long actualExpiryTime =
+               tm.getLongProperty(ServerSessionEndpoint.JBOSS_MESSAGING_ACTUAL_EXPIRY_TIME);
             
             assertEquals(topic.toString(), origDest);
             

Modified: trunk/tests/src/org/jboss/test/messaging/jms/MessageProxyTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/MessageProxyTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/jms/MessageProxyTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -21,8 +21,6 @@
   */
 package org.jboss.test.messaging.jms;
 
-import java.util.Map;
-
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;

Modified: trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/jms/bridge/BridgeMBeanTest.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -38,7 +38,6 @@
 import org.jboss.jms.server.bridge.Bridge;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 
 /**
  * A BridgeMBeanTest

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainer.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -218,7 +218,7 @@
    private boolean jca;
    private boolean remoting;
    private boolean security;
-   private boolean httpDatasource;
+   private boolean httpConnectionFactory;
    private boolean multiplexer; // the JGroups channels multiplexer
 
    private List toUnbindAtExit;
@@ -482,17 +482,17 @@
       }
    }
 
-   public void startDataSources(ServiceAttributeOverrides attrOverrides) throws Exception
+   public void startConnectionFactories(ServiceAttributeOverrides attrOverrides) throws Exception
    {
-      deployDatasource("server/default/deploy/connection-factories-service.xml", attrOverrides);
+      deployConnectionFactories("server/default/deploy/connection-factories-service.xml", attrOverrides);
 
-      log.info("httpDatasource=" + httpDatasource);
-      if (httpDatasource)
+      log.info("HTTP ConnectionFactory " + httpConnectionFactory);
+      if (httpConnectionFactory)
       {
-         log.info("Installing HTTP datasource");
+         log.info("Installing HTTP connection factory");
          ServiceAttributeOverrides httpOverride = new ServiceAttributeOverrides();
          startRemoting(httpOverride, "http", HTTP_REMOTING_OBJECT_NAME);
-         deployDatasource("server/default/deploy/connection-factory-http.xml", attrOverrides);
+         deployConnectionFactories("server/default/deploy/connection-factory-http.xml", attrOverrides);
       }
 
       // bind the default JMS provider
@@ -501,7 +501,7 @@
       bindJCAJMSConnectionFactory();
    }
 
-   public void stopDatasources() throws Exception
+   public void stopConnectionFactories() throws Exception
    {
       for(Iterator i = connFactoryObjectNames.iterator(); i.hasNext(); )
       {
@@ -531,7 +531,7 @@
 
       stopService(REMOTING_OBJECT_NAME);
 
-      if (httpDatasource)
+      if (httpConnectionFactory)
       {
          stopService(HTTP_REMOTING_OBJECT_NAME);
       }
@@ -1653,8 +1653,8 @@
       }
    }
 
-   public void deployDatasource(String connFactoryConfigFile,
-                                ServiceAttributeOverrides attrOverrides) throws Exception
+   public void deployConnectionFactories(String connFactoryConfigFile,
+                                         ServiceAttributeOverrides attrOverrides) throws Exception
    {
 
       URL connFactoryConfigFileURL =
@@ -1717,7 +1717,7 @@
             jca = true;
             remoting = true;
             security = true;
-            httpDatasource = true;
+            httpConnectionFactory = true;
          }
          else if ("transaction".equals(tok))
          {

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/ServiceContainerConfiguration.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -98,8 +98,7 @@
    public String getDatabaseType()
    {
       DatabaseConfiguration dbc = (DatabaseConfiguration)dbConfigurations.get(database);
-      String databaseType = dbc.getDatabaseType();
-      return databaseType;
+      return dbc.getDatabaseType();
    }
 
    public String getDatabaseConnectionURL()

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2007-02-13 05:43:22 UTC (rev 2283)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2007-02-13 06:47:23 UTC (rev 2284)
@@ -22,7 +22,6 @@
 package org.jboss.test.messaging.tools.jmx.rmi;
 
 import java.net.URL;
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -399,7 +398,7 @@
 
          log.debug("deploying connection factories");
 
-         sc.startDataSources(attrOverrides);
+         sc.startConnectionFactories(attrOverrides);
       }
       catch (Exception e)
       {
@@ -432,7 +431,7 @@
 
          log.debug("stopping connection factories");
 
-         sc.stopDatasources();
+         sc.stopConnectionFactories();
 
          log.debug("stopping all destinations");
 




More information about the jboss-cvs-commits mailing list