Author: aidan
Date: Thu Apr 17 08:05:53 2008
New Revision: 649141

URL: http://svn.apache.org/viewvc?rev=649141&view=rev
Log:
QPID-831 fix compile errors

Modified:
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?rev=649141&r1=649140&r2=649141&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 Thu Apr 17 08:05:53 2008
@@ -854,7 +854,8 @@
 
 
                 if (consumer.isAutoClose())
-                {     // There is a small window where the message is between 
the two queues in the dispatcher.
+                {     
+                    // There is a small window where the message is between 
the two queues in the dispatcher.
                     if (consumer.isClosed())
                     {
                         if (_logger.isInfoEnabled())
@@ -863,11 +864,6 @@
                         }
 
                         deregisterConsumer(consumer);
-
-                    }
-                    else
-                    {
-                        _queue.add(new 
UnprocessedMessage.CloseConsumerMessage(consumer));
                     }
                 }
             }
@@ -2957,8 +2953,7 @@
                                 dispatchMessage(message);
                             }
 
-                            if (!(message instanceof 
UnprocessedMessage.CloseConsumerMessage)
-                                && (message.getDeliverBody().getDeliveryTag() 
<= _rollbackMark.get()))
+                            if (message.getDeliveryTag() <= 
_rollbackMark.get())
                             {
                                 rejectMessage(message, true);
                             }

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java?rev=649141&r1=649140&r2=649141&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
 Thu Apr 17 08:05:53 2008
@@ -455,20 +455,6 @@
          return o;
      }
 
-    private boolean closeOnAutoClose() throws JMSException
-    {
-        if (isAutoClose() && _closeWhenNoMessages && 
_synchronousQueue.isEmpty())
-        {
-            close(false);
-
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
     public Message receiveNoWait() throws JMSException
     {
         checkPreConditions();
@@ -541,12 +527,6 @@
 
             throw e;
         }
-        else if (o instanceof UnprocessedMessage.CloseConsumerMessage)
-        {
-            _closed.set(true);
-            deregisterConsumer();
-            return null;
-        }
         else
         {
             return (AbstractJMSMessage) o;
@@ -670,12 +650,6 @@
      */
     void notifyMessage(UnprocessedMessage messageFrame)
     {
-        if (messageFrame instanceof UnprocessedMessage.CloseConsumerMessage)
-        {
-            notifyCloseMessage((UnprocessedMessage.CloseConsumerMessage) 
messageFrame);
-            return;
-        }
-
         final boolean debug = _logger.isDebugEnabled();
 
         if (debug)
@@ -724,32 +698,6 @@
 
     public abstract AbstractJMSMessage 
createJMSMessageFromUnprocessedMessage(UnprocessedMessage<H, B> messageFrame)
             throws Exception;
-
-
-    /** @param closeMessage this message signals that we should close the 
browser */
-    public void notifyCloseMessage(UnprocessedMessage.CloseConsumerMessage 
closeMessage)
-    {
-        if (isMessageListenerSet())
-        {
-            // Currently only possible to get this msg type with a browser.
-            // If we get the message here then we should probably just close 
this consumer.
-            // Though an AutoClose consumer with message listener is quite 
odd...
-            // Just log out the fact so we know where we are
-            _logger.warn("Using an AutoCloseconsumer with message listener is 
not supported.");
-        }
-        else
-        {
-            try
-            {
-                _synchronousQueue.put(closeMessage);
-            }
-            catch (InterruptedException e)
-            {
-                _logger.info(" SynchronousQueue.put interupted. Usually result 
of connection closing," +
-                             "but we shouldn't have close yet");
-            }
-        }
-    }
 
     /** @param jmsMessage this message has already been processed so can't 
redo preDeliver */
     public void notifyMessage(AbstractJMSMessage jmsMessage)

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java?rev=649141&r1=649140&r2=649141&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
 Thu Apr 17 08:05:53 2008
@@ -340,15 +340,11 @@
         VmPipeAddress pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
         if (pipe != null)
         {
-            VmPipeAddress pipe = (VmPipeAddress) _inVmPipeAddress.get(port);
-            if (pipe != null)
-            {
-                _logger.info("Killing VM Broker:" + port);
-                _inVmPipeAddress.remove(port);
-                // This does need to be sychronized as otherwise mina can hang
-                // if a new connection is made
-                _acceptor.unbind(pipe);
-            }
+            _logger.info("Killing VM Broker:" + port);
+            _inVmPipeAddress.remove(port);
+            // This does need to be sychronized as otherwise mina can hang
+            // if a new connection is made
+            _acceptor.unbind(pipe);
         }
     }
 


Reply via email to