[rhmessaging-commits] rhmessaging commits: r4101 - mgmt/newdata/cumin/python/cumin/messaging.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Sun Jul 11 18:10:39 EDT 2010
Author: justi9
Date: 2010-07-11 18:10:39 -0400 (Sun, 11 Jul 2010)
New Revision: 4101
Modified:
mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
Log:
Replace sqlobject based navigation
Modified: mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py 2010-07-11 21:47:39 UTC (rev 4100)
+++ mgmt/newdata/cumin/python/cumin/messaging/brokerlink.py 2010-07-11 22:10:39 UTC (rev 4101)
@@ -340,14 +340,25 @@
def do_invoke(self, invoc, vhost, host, port, durable, username,
password, transport):
- broker = vhost.broker # XXX
+ # XXX ugh. need to pass session into do_invoke instead of
+ # this
+ cls = self.app.model.org_apache_qpid_broker.Broker
+
+ conn = self.app.database.get_connection()
+ cursor = conn.cursor()
+
+ try:
+ obj = cls.get_object(cursor, _id=vhost._brokerRef_id)
+ finally:
+ conn.close()
+
if username == "anonymous":
mech = "ANONYMOUS"
else:
mech = "PLAIN"
- self.qmf_call(invoc, broker, "connect",
+ self.qmf_call(invoc, obj, "connect",
host, port, durable, mech, username, password, transport)
class BrokerLinkAddForm(ObjectTaskForm):
More information about the rhmessaging-commits
mailing list