[jboss-cvs] JBoss Messaging SVN: r2432 - in trunk/src/main/org/jboss: jms/client/delegate and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Feb 25 19:07:38 EST 2007


Author: ovidiu.feodorov at jboss.com
Date: 2007-02-25 19:07:38 -0500 (Sun, 25 Feb 2007)
New Revision: 2432

Modified:
   trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
   trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
   trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
   trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/DefaultPostOffice.java
Log:
minor

Modified: trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -51,9 +51,9 @@
 
    private DelegateSupport delegate;
 
-   // We need to cache connectionState here
-   // IMPORTANT - We must not cache the fcc or valve since these need to be replaced when failover occurs
-   // and if we cache them we wil end up using the old ones
+   // We need to cache connectionState here.
+   // IMPORTANT - We must not cache the fcc or valve since these need to be replaced when failover
+   //             occurs and if we cache them we wil end up using the old ones.
    private ConnectionState connectionState;
 
    // Constructors ---------------------------------------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConnectionDelegate.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -30,7 +30,6 @@
 import javax.jms.JMSException;
 import javax.jms.ServerSessionPool;
 
-import org.jboss.jms.client.FailoverCommandCenter;
 import org.jboss.jms.client.FailoverListener;
 import org.jboss.jms.client.JBossConnectionConsumer;
 import org.jboss.jms.client.remoting.JMSRemotingConnection;
@@ -51,7 +50,6 @@
 import org.jboss.jms.wireformat.ConnectionStartRequest;
 import org.jboss.jms.wireformat.ConnectionStopRequest;
 import org.jboss.jms.wireformat.RequestSupport;
-import org.jboss.logging.Logger;
 import org.jboss.messaging.core.tx.MessagingXid;
 
 /**
@@ -69,9 +67,6 @@
 {
    // Constants ------------------------------------------------------------------------------------
    
-   private static final Logger log = Logger.getLogger(ClientConnectionDelegate.class);
-
-
    // Attributes -----------------------------------------------------------------------------------
 
    private int serverID;
@@ -161,7 +156,6 @@
    /**
     * This invocation should either be handled by the client-side interceptor chain or by the
     * server-side endpoint.
-    * @see org.jboss.jms.client.container.AsfAspect#handleCreateConnectionConsumer(org.jboss.aop.joinpoint.Invocation)
     */
    public JBossConnectionConsumer createConnectionConsumer(Destination dest,
                                                            String subscriptionName,
@@ -176,8 +170,10 @@
                                                 int acknowledgmentMode,
                                                 boolean isXA) throws JMSException
    {
-      RequestSupport req = new ConnectionCreateSessionDelegateRequest(id, version,
-                                                                      transacted, acknowledgmentMode, isXA);      
+      RequestSupport req =
+         new ConnectionCreateSessionDelegateRequest(id, version, transacted,
+                                                    acknowledgmentMode, isXA);
+
       return (SessionDelegate)doInvoke(client, req);     
    }
   
@@ -298,7 +294,7 @@
 
    public String toString()
    {
-      return "ConnectionDelegate[" + id + ", SID=" + serverID + "] " + System.identityHashCode(this);
+      return "ConnectionDelegate[" + id + ", SID=" + serverID + "]." + System.identityHashCode(this);
    }
 
    // Protected ------------------------------------------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientConsumerDelegate.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -37,7 +37,6 @@
 import org.jboss.jms.wireformat.ConsumerCancelInflightMessagesRequest;
 import org.jboss.jms.wireformat.ConsumerChangeRateRequest;
 import org.jboss.jms.wireformat.RequestSupport;
-import org.jboss.logging.Logger;
 
 /**
  * The client-side Consumer delegate class.
@@ -53,9 +52,6 @@
 {
    // Constants ------------------------------------------------------------------------------------
    
-   private static final Logger log = Logger.getLogger(ClientConsumerDelegate.class);
-
-
    // Attributes -----------------------------------------------------------------------------------
    
    private int bufferSize;
@@ -217,7 +213,7 @@
 
    public String toString()
    {
-      return "ConsumerDelegate[" + id + "] " + System.identityHashCode(this);
+      return "ConsumerDelegate[" + id + "]." + System.identityHashCode(this);
    }
    
    public int getBufferSize()

Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -65,7 +65,6 @@
 import org.jboss.jms.wireformat.SessionRecoverDeliveriesRequest;
 import org.jboss.jms.wireformat.SessionSendRequest;
 import org.jboss.jms.wireformat.SessionUnsubscribeRequest;
-import org.jboss.logging.Logger;
 
 /**
  * The client-side Session delegate class.
@@ -90,9 +89,6 @@
 
    // Static ---------------------------------------------------------------------------------------
 
-   private static final Logger log = Logger.getLogger(ClientSessionDelegate.class);
-
-   
    // Constructors ---------------------------------------------------------------------------------
 
    public ClientSessionDelegate(int objectID, int dupsOKBatchSize)
@@ -198,7 +194,8 @@
       throw new IllegalStateException("This invocation should not be handled here!");
    }
 
-   public BrowserDelegate createBrowserDelegate(JBossDestination queue, String messageSelector) throws JMSException
+   public BrowserDelegate createBrowserDelegate(JBossDestination queue, String messageSelector)
+      throws JMSException
    {
       RequestSupport req = new SessionCreateBrowserDelegateRequest(id, version, queue,
                                                   messageSelector);
@@ -490,7 +487,7 @@
    
    public String toString()
    {
-      return "SessionDelegate[" + id + "] " + System.identityHashCode(this);
+      return "SessionDelegate[" + id + "]." + System.identityHashCode(this);
    }
    
    // Protected ------------------------------------------------------------------------------------

Modified: trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/delegate/DelegateSupport.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -28,9 +28,7 @@
 
 import javax.jms.JMSException;
 
-import org.jboss.jms.client.state.ConnectionState;
 import org.jboss.jms.client.state.HierarchicalState;
-import org.jboss.jms.client.state.SessionState;
 import org.jboss.jms.util.MessagingJMSException;
 import org.jboss.jms.util.MessagingNetworkFailureException;
 import org.jboss.jms.wireformat.RequestSupport;

Modified: trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -230,32 +230,33 @@
    }
         
    // Public ---------------------------------------------------------------------------------------
-      
 
    /**
-    * Handles a message sent from the server
+    * Handles a message sent from the server.
+    *
     * @param message The message
     */
-   
-
    public void handleMessage(final Object message) throws Exception
    {
-      //TODO - we temporarily need to execute on a different thread to 
-      //avoid a deadlock situation in failover
-      //where a message is sent then the valve is locked, and the message send cause a message
-      //delivery back to the same client which tries to ack but can't get through the valve
+      //TODO - we temporarily need to execute on a different thread to avoid a deadlock situation in
+      //       failover where a message is sent then the valve is locked, and the message send cause
+      //       a message delivery back to the same client which tries to ack but can't get through
+      //       the valve.
       this.sessionExecutor.execute(
-               new Runnable() { public void run()
+         new Runnable()
+         {
+            public void run()
+            {
+               try
                {
-                  try
-                  {
-                     handleMessageInternal(message);
-                  }
-                  catch (Exception e)
-                  {
-                     log.error("Failed to handle message", e);
-                  }
-               } });
+                  handleMessageInternal(message);
+               }
+               catch (Exception e)
+               {
+                  log.error("Failed to handle message", e);
+               }
+            }
+         });
    }
    
    public void handleMessageInternal(Object message) throws Exception
@@ -546,7 +547,7 @@
 
       buffer.clear();
       
-      //need to reset toggle state
+      // need to reset toggle state
       serverSending = true;
       
    }

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -52,8 +52,6 @@
 import org.jboss.remoting.callback.HandleCallbackException;
 import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
 
-import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
-
 /**
  * Concrete implementation of ConsumerEndpoint. Lives on the boundary between
  * Messaging Core and the JMS Facade. Handles delivery of messages from the

Modified: trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java
===================================================================
--- trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/jms/wireformat/ConsumerChangeRateRequest.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -25,10 +25,7 @@
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 
-import org.jboss.jms.server.ServerPeer;
 import org.jboss.jms.server.endpoint.ConsumerEndpoint;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.invocation.OnewayInvocation;
 
 /**
  * 
@@ -88,8 +85,8 @@
       os.flush();
    }
    
-   //Until we have NBIO transport this needs to be synchronous otherwise we can get out of sync
-   //due to earlier invocations overtaking later invocations
+   // Until we have NBIO transport this needs to be synchronous otherwise we can get out of sync
+   // due to earlier invocations overtaking later invocations.
    
 //   public Object getPayload()
 //   {

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/DefaultPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/DefaultPostOffice.java	2007-02-25 22:38:43 UTC (rev 2431)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/DefaultPostOffice.java	2007-02-26 00:07:38 UTC (rev 2432)
@@ -641,9 +641,6 @@
       }
    }
 
-   /**
-    * @param failedNodeID - ignored for non-clustered bindings.
-    */
    protected Binding createBinding(int nodeID, Condition condition, String queueName,
                                    long channelID, String filterString, boolean durable,
                                    boolean isClustered) throws Exception
@@ -653,9 +650,6 @@
                            filter, durable, isClustered);
    }
 
-   /**
-    * @param failedNodeID - ignored for non-clustered bindings.
-    */
    protected Binding createBinding(int nodeID, Condition condition, String queueName,
                                    long channelID, Filter filter, boolean durable,
                                    boolean isClustered)




More information about the jboss-cvs-commits mailing list