Author: ritchiem
Date: Tue Oct  9 06:45:25 2007
New Revision: 583169

URL: http://svn.apache.org/viewvc?rev=583169&view=rev
Log:
Merged revisions 
573738-573739,573741-574077,574079-574236,574238-574265,574267-574503,574505-574554,574556-574584,574586-574873,574875-574901,574903-575737,575739-575787,575789-575810,575812-577772,577774-577940,577942-578057,578059-578732,578734,578736-578744,578746-578827,578829-578844,578846-579114,579116-579146,579148-579197,579199-579228,579230-579573,579575-579576,579579-579601,579603-579613,579615-579708,579710-580021,580023-580039,580042-580060,580062-580065,580067-580080,580082-580257,580259-580264,580266-580350,580352-580984,580986-580991,580994-581001,581003-581170,581172-581188,581190-581206,581208-581245,581247-581292,581294-581539,581541-581565,581567-581620,581622-581626,581628-581646,581648-581967,581969-582197,582199-582200,582203-582204,582206-582262,582264,582267-583156
 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1

........
  r583085 | ritchiem | 2007-10-09 10:25:00 +0100 (Tue, 09 Oct 2007) | 1 line
  
  Update to Error message to contain the thrown exception message.
........
  r583086 | ritchiem | 2007-10-09 10:29:08 +0100 (Tue, 09 Oct 2007) | 2 lines
  
  Update to provide a UUID.randomUUID() when getLocalHost() throws an 
UnknownHostException.
  Update to formatting
........
  r583088 | ritchiem | 2007-10-09 10:31:40 +0100 (Tue, 09 Oct 2007) | 1 line
  
  Update to correct error log that would occur when using selectors.
........
  r583105 | rgodfrey | 2007-10-09 11:48:25 +0100 (Tue, 09 Oct 2007) | 1 line
  
  QPID-625 : Fix commit rollback test to prevent failures caused by incorrect 
assertions in the test
........
  r583147 | ritchiem | 2007-10-09 14:11:41 +0100 (Tue, 09 Oct 2007) | 1 line
  
  Qpid-626 : Patch provided by Aidan Skinner to address AMQSession Deadlocks.
........
  r583154 | ritchiem | 2007-10-09 14:19:37 +0100 (Tue, 09 Oct 2007) | 1 line
  
  Qpid-627 Patch provided by Aidan Skinner to address hangs in 
DurableSubscriptionTest.
........

Modified:
    incubator/qpid/branches/M2/   (props changed)
    
incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
    
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
    
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
    
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
    
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
    
incubator/qpid/branches/M2/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java

Propchange: incubator/qpid/branches/M2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Oct  9 06:45:25 2007
@@ -1 +1 @@
-/incubator/qpid/branches/M2.1:1-573736,573738-577772,577774-578732,578734,578736-578744,578746-578827,578829-582269
+/incubator/qpid/branches/M2.1:1-573736,573738-577772,577774-578732,578734,578736-578744,578746-578827,578829-583156

Modified: 
incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
 (original)
+++ 
incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentSelectorDeliveryManager.java
 Tue Oct  9 06:45:25 2007
@@ -857,9 +857,16 @@
             else
             {
 
-                if (_messages.size() > 0)
+                if (s.filtersMessages())
                 {
-                    _log.error("Direct delivery with queued msgs:" + 
_messages.size());
+                    if (s.getPreDeliveryQueue().size() > 0)
+                    {
+                        _log.error("Direct delivery from PDQ with queued 
msgs:" + s.getPreDeliveryQueue().size());
+                    }
+                }
+                else if (_messages.size() > 0)
+                {
+                    _log.error("Direct delivery from MainQueue queued msgs:" + 
_messages.size());
                 }
 
                 //release lock now

Modified: 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
 (original)
+++ 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
 Tue Oct  9 06:45:25 2007
@@ -23,6 +23,7 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Hashtable;
+import java.util.UUID;
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
@@ -125,21 +126,25 @@
         }
         _defaultPassword = password;
     }
-    
+
     /**
      * Getter for SSLConfiguration
+     *
      * @return SSLConfiguration if set, otherwise null
      */
-    public final SSLConfiguration getSSLConfiguration() {
-       return _sslConfig;
+    public final SSLConfiguration getSSLConfiguration()
+    {
+        return _sslConfig;
     }
-    
+
     /**
      * Setter for SSLConfiguration
+     *
      * @param sslConfig config to store
      */
-    public final void setSSLConfiguration(SSLConfiguration sslConfig) {
-       _sslConfig = sslConfig;
+    public final void setSSLConfiguration(SSLConfiguration sslConfig)
+    {
+        _sslConfig = sslConfig;
     }
 
     /**
@@ -243,7 +248,7 @@
         }
         catch (UnknownHostException e)
         {
-            return null;
+            return "UnknownHost" + UUID.randomUUID();
         }
     }
 
@@ -336,7 +341,9 @@
      * @param name
      * @param ctx
      * @param env
+     *
      * @return AMQConnection,AMQTopic,AMQQueue, or AMQConnectionFactory.
+     *
      * @throws Exception
      */
     public Object getObjectInstance(Object obj, Name name, Context ctx,

Modified: 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 (original)
+++ 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 Tue Oct  9 06:45:25 2007
@@ -519,11 +519,11 @@
                          + Arrays.asList(stackTrace).subList(3, 
stackTrace.length - 1));
         }
 
-        synchronized (_messageDeliveryLock)
+        synchronized (_connection.getFailoverMutex())
         {
             // We must close down all producers and consumers in an orderly 
fashion. This is the only method
             // that can be called from a different thread of control from the 
one controlling the session.
-            synchronized (_connection.getFailoverMutex())
+            synchronized (_messageDeliveryLock)
             {
                 // Ensure we only try and close an open session.
                 if (!_closed.getAndSet(true))
@@ -577,9 +577,9 @@
      */
     public void closed(Throwable e) throws JMSException
     {
-        synchronized (_messageDeliveryLock)
+        synchronized (_connection.getFailoverMutex())
         {
-            synchronized (_connection.getFailoverMutex())
+            synchronized (_messageDeliveryLock)
             {
                 // An AMQException has an error code and message already and 
will be passed in when closure occurs as a
                 // result of a channel close request

Modified: 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
 (original)
+++ 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java
 Tue Oct  9 06:45:25 2007
@@ -143,17 +143,17 @@
         producer.send(session1.createTextMessage("A"));
 
         Message msg;
-        msg = consumer1.receive(100);
+        msg = consumer1.receive(500);
         assertNotNull("Message should be available", msg);
         assertEquals("Message Text doesn't match", "A", ((TextMessage) 
msg).getText());
 
-        msg = consumer1.receive(100);
+        msg = consumer1.receive(500);
         assertNull("There should be no more messages for consumption on 
consumer1.", msg);
 
         msg = consumer2.receive();
         assertNotNull(msg);
         assertEquals("Consumer 2 should also received the first msg.", "A", 
((TextMessage) msg).getText());
-        msg = consumer2.receive(100);
+        msg = consumer2.receive(500);
         assertNull("There should be no more messages for consumption on 
consumer2.", msg);
 
         consumer2.close();
@@ -164,21 +164,24 @@
         producer.send(session1.createTextMessage("B"));
 
         _logger.info("Receive message on consumer 1 :expecting B");
-        msg = consumer1.receive(100);
+        msg = consumer1.receive(500);
         assertNotNull("Consumer 1 should get message 'B'.", msg);
         assertEquals("Incorrect Message recevied on consumer1.", "B", 
((TextMessage) msg).getText());
         _logger.info("Receive message on consumer 1 :expecting null");
-        msg = consumer1.receive(100);
+        msg = consumer1.receive(500);
         assertNull("There should be no more messages for consumption on 
consumer1.", msg);
 
         _logger.info("Receive message on consumer 3 :expecting B");
-        msg = consumer3.receive(100);
+        msg = consumer3.receive(500);
         assertNotNull("Consumer 3 should get message 'B'.", msg);
         assertEquals("Incorrect Message recevied on consumer4.", "B", 
((TextMessage) msg).getText());
         _logger.info("Receive message on consumer 3 :expecting null");
-        msg = consumer3.receive(100);
+        msg = consumer3.receive(500);
         assertNull("There should be no more messages for consumption on 
consumer3.", msg);
-
+        
+        consumer1.close();
+        consumer3.close();
+        
         con.close();
     }
 

Modified: 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
 (original)
+++ 
incubator/qpid/branches/M2/java/client/src/test/java/org/apache/qpid/test/unit/transacted/CommitRollbackTest.java
 Tue Oct  9 06:45:25 2007
@@ -481,9 +481,16 @@
             assertEquals("2", ((TextMessage) result).getText());
         }
 
-        result = _consumer.receive(1000);
-        assertNotNull("test message was consumed and rolled back, but is 
gone", result);
-        assertTrue("Messasge is not marked as redelivered" + result, 
result.getJMSRedelivered());
+        Message result2 = _consumer.receive(1000);
+        assertNotNull("test message was consumed and rolled back, but is 
gone", result2);
+
+        // if this is message 1 then it should be marked as redelivered
+        if("1".equals(((TextMessage) result2).getText()))
+        {
+            assertTrue("Messasge is not marked as redelivered" + result2, 
result2.getJMSRedelivered());
+        }
+
+        assertNotSame("Messages should not have the same 
content",((TextMessage) result2).getText(), ((TextMessage) result).getText() );
 
         result = _consumer.receive(1000);
         assertNull("test message should be null:" + result, result);

Modified: 
incubator/qpid/branches/M2/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java?rev=583169&r1=583168&r2=583169&view=diff
==============================================================================
--- 
incubator/qpid/branches/M2/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
 (original)
+++ 
incubator/qpid/branches/M2/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
 Tue Oct  9 06:45:25 2007
@@ -342,7 +342,7 @@
         }
         catch (JMSException e)
         {
-            throw new RuntimeException("Got JMSException during close.", e);
+            throw new RuntimeException("Got JMSException during close:" + 
e.getMessage(), e);
         }
     }
 


Reply via email to