rhmessaging commits: r2857 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-11-20 18:07:47 -0500 (Thu, 20 Nov 2008)
New Revision: 2857
Added:
mgmt/trunk/mint/python/mint/cache.py
Modified:
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/update.py
Log:
use commit/rollback-able cache to store mapping between qmf ids and database ids
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 22:21:56 UTC (rev 2856)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 23:07:47 UTC (rev 2857)
@@ -11,6 +11,7 @@
from qpid.datatypes import UUID
from mint.schema import *
from mint import update
+from mint.cache import MintCache
log = logging.getLogger("mint")
@@ -315,7 +316,9 @@
self.outstandingMethodCalls = dict()
self.managedBrokers = dict()
- self.qmfIdToDbIdMap = dict()
+ # cache contains mapping between qmf ids and database ids
+ # (idFirst, idSecond) -> dbId
+ self.cache = MintCache()
if self.debug:
log.setLevel(logging.DEBUG)
Added: mgmt/trunk/mint/python/mint/cache.py
===================================================================
--- mgmt/trunk/mint/python/mint/cache.py (rev 0)
+++ mgmt/trunk/mint/python/mint/cache.py 2008-11-20 23:07:47 UTC (rev 2857)
@@ -0,0 +1,47 @@
+from threading import RLock
+
+class MintCache:
+ staticInstance = None
+
+ def __init__(self):
+ assert MintCache.staticInstance is None
+ MintCache.staticInstance = self
+
+ self.__lock = RLock()
+ self.__cache = dict()
+ self.__pending = dict()
+ self.__dirty = False
+
+ def get(self, key, usePending=True):
+ result = None
+ self.__lock.acquire()
+ if key in self.__cache:
+ result = self.__cache[key]
+ elif usePending and key in self.__pending:
+ result = self.__pending[key]
+ self.__lock.release()
+ return result
+
+ def set(self, key, value):
+ self.__lock.acquire()
+ self.__pending[key] = value
+ self.__dirty = True
+ self.__lock.release()
+
+ def commit(self):
+ self.__lock.acquire()
+ self.__cache.update(self.__pending)
+ self.__pending.clear()
+ self.__dirty = False
+ self.__lock.release()
+
+ def rollback(self):
+ self.__lock.acquire()
+ self.__pending.clear()
+ self.__dirty = False
+ self.__lock.release()
+
+ def isDirty(self):
+ self.__lock.acquire()
+ return self.__dirty
+ self.__lock.release()
Property changes on: mgmt/trunk/mint/python/mint/cache.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-20 22:21:56 UTC (rev 2856)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-20 23:07:47 UTC (rev 2857)
@@ -56,9 +56,12 @@
try:
update.process(self.model, conn)
- conn.commit()
+ if self.dequeueCount % 100 == 0:
+ conn.commit()
+ self.model.cache.commit()
except:
conn.rollback()
+ self.model.cache.rollback()
log.exception("Update failed")
pass
@@ -95,8 +98,9 @@
foreignKey = name + "_id"
valueFirst = value.first
valueSecond = value.second
- if (valueFirst, valueSecond) in model.qmfIdToDbIdMap:
- results[foreignKey] = model.qmfIdToDbIdMap[(valueFirst, valueSecond)]
+ cachedId = model.cache.get((valueFirst, valueSecond))
+ if cachedId != None:
+ results[foreignKey] = cachedId
else:
model.addOrphanObject(className, valueFirst, valueSecond, self)
orphan = True
@@ -173,7 +177,8 @@
cursor.execute(sql)
log.debug("%s(%s) created", cls, id)
- if (idFirst, idSecond) not in model.qmfIdToDbIdMap:
+ dbId = model.cache.get((idFirst, idSecond))
+ if dbId is None:
if isUpdate:
sql = model.generateSQLSelect(sqlCls, id)
else:
@@ -182,9 +187,7 @@
cursor.execute(sql)
rec = cursor.fetchone()
dbId = rec[0]
- model.qmfIdToDbIdMap[(idFirst, idSecond)] = dbId
- else:
- dbId = model.qmfIdToDbIdMap[(idFirst, idSecond)]
+ model.cache.set((idFirst, idSecond), dbId)
if cls == "Broker" and str(self.broker.getBrokerId()) in model.managedBrokers:
broker, dbObjId = model.managedBrokers[str(self.broker.getBrokerId())]
@@ -241,8 +244,9 @@
return
attrs["recTime"] = time_unwarp(datetime.fromtimestamp(timestamps[0]/1000000000))
- if (idFirst, idSecond) in model.qmfIdToDbIdMap:
- attrs[sqlCls + "_id"] = model.qmfIdToDbIdMap[(idFirst, idSecond)]
+ cachedId = model.cache.get((idFirst, idSecond))
+ if cachedId != None:
+ attrs[sqlCls + "_id"] = cachedId
else:
model.addOrphanObject(cls, idFirst, idSecond, self)
15 years, 7 months
rhmessaging commits: r2856 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-11-20 17:21:56 -0500 (Thu, 20 Nov 2008)
New Revision: 2856
Modified:
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/schema.py
mgmt/trunk/mint/python/mint/tools.py
Log:
use sys.setcheckinterval for better thread switching performance; have mint-bench prints queue depth
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 22:21:56 UTC (rev 2856)
@@ -2,6 +2,7 @@
import qmf.console
import pickle
import struct
+import sys
import types
from threading import Lock, RLock
from sqlobject import *
@@ -24,6 +25,10 @@
except TypeError:
pass
+# get better thread switching performance
+sys.setcheckinterval(50)
+
+
Broker.sqlmeta.addColumn(ForeignKey("BrokerRegistration",
cascade="null", default=None,
name="registration"))
Modified: mgmt/trunk/mint/python/mint/schema.py
===================================================================
--- mgmt/trunk/mint/python/mint/schema.py 2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/schema.py 2008-11-20 22:21:56 UTC (rev 2856)
@@ -1,7 +1,7 @@
import mint
from sqlobject import *
from datetime import datetime
-from qpid.qmfconsole import ObjectId
+from qmf.console import ObjectId
class Pool(SQLObject):
class sqlmeta:
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2008-11-20 21:39:28 UTC (rev 2855)
+++ mgmt/trunk/mint/python/mint/tools.py 2008-11-20 22:21:56 UTC (rev 2856)
@@ -83,7 +83,7 @@
enq_last = 0
deq_last = 0
- print "enqs", "\t", "deqs"
+ print "enqs", "\t", "deqs", "\t", "depth"
while True:
sleep(1)
@@ -94,7 +94,7 @@
enq_rate = enq - enq_last
deq_rate = deq - deq_last
- print enq_rate, "\t", deq_rate
+ print enq_rate, "\t", deq_rate, "\t", enq - deq
enq_last = enq
deq_last = deq
15 years, 7 months
rhmessaging commits: r2855 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2008-11-20 16:39:28 -0500 (Thu, 20 Nov 2008)
New Revision: 2855
Modified:
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/schemaparser.py
Log:
Moved reference to qmf console
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 18:31:10 UTC (rev 2854)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-11-20 21:39:28 UTC (rev 2855)
@@ -1,5 +1,5 @@
import logging
-import qpid.qmfconsole
+import qmf.console
import pickle
import struct
import types
@@ -286,7 +286,7 @@
properties = SQLMultipleJoin("ConfigProperty", joinColumn="profile_id")
-class MintModel(qpid.qmfconsole.Console):
+class MintModel(qmf.console.Console):
staticInstance = None
def __init__(self, dataUri, specPath="", debug=False):
@@ -306,7 +306,7 @@
self.orphanObjectMap = dict()
self.updateThread = update.ModelUpdateThread(self)
- self.mgmtSession = qpid.qmfconsole.Session(self)
+ self.mgmtSession = qmf.console.Session(self)
self.outstandingMethodCalls = dict()
self.managedBrokers = dict()
Modified: mgmt/trunk/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/trunk/mint/python/mint/schemaparser.py 2008-11-20 18:31:10 UTC (rev 2854)
+++ mgmt/trunk/mint/python/mint/schemaparser.py 2008-11-20 21:39:28 UTC (rev 2855)
@@ -189,7 +189,7 @@
self.pythonOutput += "import mint\n"
self.pythonOutput += "from sqlobject import *\n"
self.pythonOutput += "from datetime import datetime\n"
- self.pythonOutput += "from qpid.qmfconsole import ObjectId\n\n"
+ self.pythonOutput += "from qmf.console import ObjectId\n\n"
self.pythonOutput += "class Pool(SQLObject):\n"
self.pythonOutput += " class sqlmeta:\n"
self.pythonOutput += " lazyUpdate = True\n"
15 years, 7 months
rhmessaging commits: r2854 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-11-20 13:31:10 -0500 (Thu, 20 Nov 2008)
New Revision: 2854
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
Also set the other side of the broker-registration association
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-20 15:44:42 UTC (rev 2853)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-20 18:31:10 UTC (rev 2854)
@@ -193,6 +193,16 @@
{"broker_id": dbId}, {"url": self.broker.getFullUrl()})
#log.debug("SQL: %s", sql)
cursor.execute(sql)
+
+ sql = """
+ update broker
+ set registration_id =
+ (select id from broker_registration where broker_id = %(id)s)
+ where id = %(id)s
+ """
+
+ cursor.execute(sql, {"id": dbId})
+
model.managedBrokers[str(self.broker.getBrokerId())] = (broker, dbId)
model.requeueIfOrphanParent(cls, idFirst, idSecond)
15 years, 7 months
rhmessaging commits: r2853 - store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: aidanskinner
Date: 2008-11-20 10:44:42 -0500 (Thu, 20 Nov 2008)
New Revision: 2853
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
RHM-7: Remove hasUpdates, ensure that we can't wait on a lock and have it not be notified after.
Modified: store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-11-19 23:30:45 UTC (rev 2852)
+++ store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-11-20 15:44:42 UTC (rev 2853)
@@ -1835,7 +1835,6 @@
private final AtomicReference<Queue<Commit>> _jobQueue = new AtomicReference<Queue<Commit>>(new ConcurrentLinkedQueue<Commit>());
private final CheckpointConfig _config = new CheckpointConfig();
private final Object _lock = new Object();
- private AtomicBoolean _hasJobs = new AtomicBoolean(false);
public CommitThread(String name)
{
@@ -1884,15 +1883,6 @@
{
commit.complete();
}
- if (_jobQueue.get().isEmpty())
- {
- _hasJobs.set(false);
- if (!_jobQueue.get().isEmpty())
- {
- _hasJobs.set(true);
- }
- }
-
}
catch (DatabaseException e)
{
@@ -1912,12 +1902,9 @@
public void addJob(Commit commit)
{
_jobQueue.get().add(commit);
- if (_hasJobs.compareAndSet(false, true))
+ synchronized (_lock)
{
- synchronized (_lock)
- {
- _lock.notifyAll();
- }
+ _lock.notifyAll();
}
}
15 years, 7 months
rhmessaging commits: r2852 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-11-19 18:30:45 -0500 (Wed, 19 Nov 2008)
New Revision: 2852
Modified:
mgmt/trunk/mint/python/mint/__init__.py
mgmt/trunk/mint/python/mint/update.py
Log:
more performance improvements: get rid of subquery, refactor and optimize orphan handling
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2008-11-19 23:01:38 UTC (rev 2851)
+++ mgmt/trunk/mint/python/mint/__init__.py 2008-11-19 23:30:45 UTC (rev 2852)
@@ -341,27 +341,6 @@
def setCloseListener(self, connCloseListener):
self.connCloseListener = connCloseListener
-# def getObjectId(self, cls, id, conn):
-# if isinstance(id, qpid.qmfconsole.ObjectId):
-# first = id.first
-# second = id.second
-# dbId = None
-# if (first, second) in self.qmfIdToDbIdMap:
-# dbId = self.qmfIdToDbIdMap[(first, second)]
-# else:
-# try:
-# cursor = conn.cursor()
-# cursor.execute("select id from %s where source_scope_id = %s and source_object_id = %s" \
-# % (self.dbStyle.pythonClassToDBTable(cls.__name__), first, second));
-# rec = cursor.fetchone()
-# dbId = rec[0]
-# self.qmfIdToDbIdMap[(first, second)] = dbId
-# except Exception:
-# raise ObjectNotFound()
-# return dbId
-# else:
-# raise ObjectNotFound()
-
def __pythonValueToDB(self, key, value):
if key == "qmfClassKey":
value = u"'%s'" % unicode(value, "raw_unicode_escape").replace("'", "''")
@@ -423,6 +402,24 @@
sql = u"update %s set %s where %s" % (table, updateValues, whereClause)
return sql
+ def addOrphanObject(self, cls, idFirst, idSecond, obj):
+ # store object in orphan map, will be picked up later when parent info is received
+ log.info("Referenced object %s '%d-%d' not found, deferring creation of orphan object" % (cls, idFirst, idSecond))
+ if (cls, idFirst, idSecond) not in self.orphanObjectMap:
+ self.orphanObjectMap[(cls, idFirst, idSecond)] = set()
+ self.orphanObjectMap[(cls, idFirst, idSecond)].add(obj)
+
+ def requeueIfOrphanParent(self, cls, idFirst, idSecond):
+ orphans = 0
+ if (cls, idFirst, idSecond) in self.orphanObjectMap:
+ # this object is the parent of orphan objects in the map, re-enqueue for insertion
+ orphanObjects = self.orphanObjectMap.pop((cls, idFirst, idSecond))
+ for orphanObj in orphanObjects:
+ self.updateThread.enqueue(orphanObj)
+ orphans += 1
+ log.info("Inserted %d orphan objects whose creation had been deferred" % (orphans))
+ return orphans
+
def getSession(self):
return self.mgmtSession
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-19 23:01:38 UTC (rev 2851)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-19 23:30:45 UTC (rev 2852)
@@ -93,14 +93,12 @@
otherClass = getattr(mint, className, None)
if otherClass:
foreignKey = name + "_id"
- if (value.first, value.second) in model.qmfIdToDbIdMap:
- results[foreignKey] = model.qmfIdToDbIdMap[(value.first, value.second)]
- elif not orphan:
- log.info("Referenced object %s '%s' not found, deferring creation of orphan object" % (className, value))
- # store object in orphan map, will be picked up later when parent info is received
- if (className, value.first, value.second) not in model.orphanObjectMap:
- model.orphanObjectMap[(className, value.first, value.second)] = set()
- model.orphanObjectMap[(className, value.first, value.second)].add(self)
+ valueFirst = value.first
+ valueSecond = value.second
+ if (valueFirst, valueSecond) in model.qmfIdToDbIdMap:
+ results[foreignKey] = model.qmfIdToDbIdMap[(valueFirst, valueSecond)]
+ else:
+ model.addOrphanObject(className, valueFirst, valueSecond, self)
orphan = True
else:
log.error("Class '%s' not found" % className)
@@ -143,6 +141,8 @@
properties = self.qmfObj.getProperties()
timestamps = self.qmfObj.getTimestamps()
id = self.qmfObj.getObjectId()
+ idFirst = id.first
+ idSecond = id.second
attrs = self.processAttributes(properties, cls, model, conn)
if attrs == None:
@@ -156,8 +156,8 @@
attrs["deletionTime"] = time_unwarp(datetime.fromtimestamp(timestamps[2]/1000000000))
log.debug("%s(%s) marked deleted", cls, id)
- attrs["sourceScopeId"] = id.first
- attrs["sourceObjectId"] = id.second
+ attrs["sourceScopeId"] = idFirst
+ attrs["sourceObjectId"] = idSecond
attrs["qmfClassKey"] = "%s, %s, %s" % (pkg, origCls, hash)
attrs["managedBroker"] = str(self.broker.getBrokerId())
@@ -165,39 +165,38 @@
sql = model.generateSQLUpdate(sqlCls, attrs, id)
#log.debug("SQL: %s", sql)
cursor.execute(sql)
- if cursor.rowcount == 0:
+ isUpdate = cursor.rowcount > 0
+ if not isUpdate:
# update failed, need to insert
sql = model.generateSQLInsert(sqlCls, attrs)
#log.debug("SQL: %s", sql)
cursor.execute(sql)
log.debug("%s(%s) created", cls, id)
+
+ if (idFirst, idSecond) not in model.qmfIdToDbIdMap:
+ if isUpdate:
+ sql = model.generateSQLSelect(sqlCls, id)
+ else:
+ sql = "select currval('%s_id_seq')" % (sqlCls)
+ #log.debug("SQL: %s", sql)
+ cursor.execute(sql)
+ rec = cursor.fetchone()
+ dbId = rec[0]
+ model.qmfIdToDbIdMap[(idFirst, idSecond)] = dbId
+ else:
+ dbId = model.qmfIdToDbIdMap[(idFirst, idSecond)]
- if (id.first, id.second) not in model.qmfIdToDbIdMap:
- sql = " ; select currval('%s_id_seq')" % (sqlCls)
+ if cls == "Broker" and str(self.broker.getBrokerId()) in model.managedBrokers:
+ broker, dbObjId = model.managedBrokers[str(self.broker.getBrokerId())]
+ if dbObjId == 0:
+ sql = model.generateSQLUpdateWhere("broker_registration", \
+ {"broker_id": dbId}, {"url": self.broker.getFullUrl()})
#log.debug("SQL: %s", sql)
cursor.execute(sql)
- rec = cursor.fetchone()
- dbId = rec[0]
- model.qmfIdToDbIdMap[(id.first, id.second)] = dbId
+ model.managedBrokers[str(self.broker.getBrokerId())] = (broker, dbId)
- if cls == "Broker" and str(self.broker.getBrokerId()) in model.managedBrokers:
- broker, dbObjId = model.managedBrokers[str(self.broker.getBrokerId())]
- if dbObjId == 0:
- sql = model.generateSQLUpdateWhere("broker_registration", \
- {"broker_id": model.qmfIdToDbIdMap[(id.first, id.second)]}, \
- {"url": self.broker.getFullUrl()})
- #log.debug("SQL: %s", sql)
- cursor.execute(sql)
- model.managedBrokers[str(self.broker.getBrokerId())] = (broker, dbId)
+ model.requeueIfOrphanParent(cls, idFirst, idSecond)
- if (cls, id.first, id.second) in model.orphanObjectMap:
- # this object is the parent of orphan objects in the map, re-enqueue for insertion
- orphanObjects = model.orphanObjectMap.pop((cls, id.first, id.second))
- for orphanObj in orphanObjects:
- model.updateThread.enqueue(orphanObj)
- log.info("Inserted %d orphan objects whose creation had been deferred" % (len(orphanObjects)))
-
-
class StatisticUpdate(ModelUpdate):
def __init__(self, broker, obj):
ModelUpdate.__init__(self, broker, obj)
@@ -219,6 +218,8 @@
statistics = self.qmfObj.getStatistics()
timestamps = self.qmfObj.getTimestamps()
id = self.qmfObj.getObjectId()
+ idFirst = id.first
+ idSecond = id.second
statsCls = self.getStatsClass(cls)
sqlStatsCls = model.dbStyle.pythonClassToDBTable(statsCls)
@@ -230,10 +231,13 @@
return
attrs["recTime"] = time_unwarp(datetime.fromtimestamp(timestamps[0]/1000000000))
-
+ if (idFirst, idSecond) in model.qmfIdToDbIdMap:
+ attrs[sqlCls + "_id"] = model.qmfIdToDbIdMap[(idFirst, idSecond)]
+ else:
+ model.addOrphanObject(cls, idFirst, idSecond, self)
+
cursor = conn.cursor()
- subSql = model.generateSQLSelect(sqlCls, id)
- sql = model.generateSQLInsert(sqlStatsCls, attrs, {sqlCls + "_id": subSql})
+ sql = model.generateSQLInsert(sqlStatsCls, attrs)
#log.debug("SQL: %s", sql)
cursor.execute(sql)
15 years, 7 months
rhmessaging commits: r2851 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-19 18:01:38 -0500 (Wed, 19 Nov 2008)
New Revision: 2851
Modified:
mgmt/trunk/cumin/python/cumin/page.py
Log:
Remove submitter column from Grid Jobs tab under Home
Modified: mgmt/trunk/cumin/python/cumin/page.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/page.py 2008-11-19 22:58:34 UTC (rev 2850)
+++ mgmt/trunk/cumin/python/cumin/page.py 2008-11-19 23:01:38 UTC (rev 2851)
@@ -253,7 +253,7 @@
pass
def get_visible_columns(self, session):
- return self.get_request_visible_columns(session, ["custom_group", "scheduler", "submitter"])
+ return self.get_request_visible_columns(session, ["custom_group", "scheduler"])
class MessagingView(TabbedModeSet):
def __init__(self, app, name):
15 years, 7 months
rhmessaging commits: r2850 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-19 17:58:34 -0500 (Wed, 19 Nov 2008)
New Revision: 2850
Modified:
mgmt/trunk/cumin/python/cumin/brokerlink.py
mgmt/trunk/cumin/python/cumin/model.py
Log:
Fixing showing the 'Add Route' dialog from the BrokerLink details tab.
Modified: mgmt/trunk/cumin/python/cumin/brokerlink.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-19 22:22:45 UTC (rev 2849)
+++ mgmt/trunk/cumin/python/cumin/brokerlink.py 2008-11-19 22:58:34 UTC (rev 2850)
@@ -346,8 +346,8 @@
def do_get_items(self, session, *args):
exchanges = list()
- reg = self.frame.get_ancestor("broker").get_object(session)
- vhost = reg.getDefaultVhost()
+ link = self.frame.frame.get_object(session)
+ vhost = link.vhost
sortedExchanges = sorted_by(vhost.exchanges)
for exchange in sortedExchanges:
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-11-19 22:22:45 UTC (rev 2849)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-11-19 22:58:34 UTC (rev 2850)
@@ -1528,6 +1528,7 @@
class Bridge(CuminAction):
def show(self, session, link):
frame = self.cumin_class.show_object(session, link)
+ frame.set_object(session, link)
return frame.show_bridge_add(session)
def get_title(self, session):
15 years, 7 months
rhmessaging commits: r2849 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-19 17:22:45 -0500 (Wed, 19 Nov 2008)
New Revision: 2849
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
MethodUpdate.process needs to take 3 arguments.
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-19 22:21:34 UTC (rev 2848)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-19 22:22:45 UTC (rev 2849)
@@ -253,7 +253,7 @@
ModelUpdate.__init__(self, broker, response)
self.seq = seq
- def process(self, model):
+ def process(self, model, conn):
model.lock()
try:
methodCallback = model.outstandingMethodCalls.pop(self.seq)
15 years, 7 months
rhmessaging commits: r2848 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2008-11-19 17:21:34 -0500 (Wed, 19 Nov 2008)
New Revision: 2848
Modified:
mgmt/trunk/wooly/python/wooly/tables.py
Log:
Separated sql_values and find_values for finding an item in an SQLTable
Modified: mgmt/trunk/wooly/python/wooly/tables.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/tables.py 2008-11-19 22:20:36 UTC (rev 2847)
+++ mgmt/trunk/wooly/python/wooly/tables.py 2008-11-19 22:21:34 UTC (rev 2848)
@@ -283,13 +283,19 @@
cursor = conn.cursor()
select = self.render_find_sql(session, *args)
where = self.render_sql_where(session, *args)
+ sql_values = self.get_sql_values(session, *args)
+
find_where = self.render_find_sql_where(session, *args)
find_values = self.get_find_sql_values(session, *args)
sql = " and ".join(["%s %s" % (select, where), find_where])
+ if sql_values:
+ for sql_val in sql_values:
+ find_values[sql_val] = sql_values[sql_val]
+
try:
cursor.execute(sql, find_values)
return self.cursor_to_rows(cursor)
- except:
+ except Exception, e:
pass
def cursor_to_rows(self, cursor):
15 years, 7 months