qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r795209 - in /qpid/trunk/qpid: python/qmf/console.py ruby/lib/qpid/qmf.rb
Date Fri, 17 Jul 2009 19:54:10 GMT
Author: tross
Date: Fri Jul 17 19:54:09 2009
New Revision: 795209

URL: http://svn.apache.org/viewvc?rev=795209&view=rev
Log:
QPID-1973 - Calling session.objects fails to return objects in certain cases

There is a window during which object queries fail because the console does not have
up-to-date agent information.  This fix closes the window completely.  I would like to
find a more elegant and efficient solution to this problem, but this will work for now.


Modified:
    qpid/trunk/qpid/python/qmf/console.py
    qpid/trunk/qpid/ruby/lib/qpid/qmf.rb

Modified: qpid/trunk/qpid/python/qmf/console.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qmf/console.py?rev=795209&r1=795208&r2=795209&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qmf/console.py (original)
+++ qpid/trunk/qpid/python/qmf/console.py Fri Jul 17 19:54:09 2009
@@ -609,6 +609,12 @@
       brokerList = self.brokers
     for broker in brokerList:
       broker._waitForStable()
+      if broker.isConnected():
+        if "_package" not in kwargs or "_class" not in kwargs or \
+              kwargs["_package"] != "org.apache.qpid.broker" or \
+              kwargs["_class"] != "agent":
+          self.getObjects(_package = "org.apache.qpid.broker", _class = "agent",
+                     _agent = broker.getAgent(1,0))
 
     agentList = []
     if "_agent" in kwargs:

Modified: qpid/trunk/qpid/ruby/lib/qpid/qmf.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/ruby/lib/qpid/qmf.rb?rev=795209&r1=795208&r2=795209&view=diff
==============================================================================
--- qpid/trunk/qpid/ruby/lib/qpid/qmf.rb (original)
+++ qpid/trunk/qpid/ruby/lib/qpid/qmf.rb Fri Jul 17 19:54:09 2009
@@ -333,7 +333,12 @@
       else
         broker_list = @brokers
       end
-      broker_list.each { |broker| broker.wait_for_stable }
+      broker_list.each { |broker|
+        broker.wait_for_stable
+        if kwargs[:package] != "org.apache.qpid.broker" or kwargs[:class] != "agent"
+          objects(:agent => broker.agent(1,0), :package => "org.apache.qpid.broker",
:class => "agent") if broker.connected?
+        end
+      }
 
       agent_list = []
       if kwargs.include?(:agent)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message