You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/06/28 18:46:36 UTC

svn commit: r1355072 [9/16] - in /qpid/trunk/qpid/java: ./ bdbstore/ bdbstore/jmx/ bdbstore/jmx/src/ bdbstore/jmx/src/main/ bdbstore/jmx/src/main/java/ bdbstore/jmx/src/main/java/org/ bdbstore/jmx/src/main/java/org/apache/ bdbstore/jmx/src/main/java/or...

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/moveCopyMessages.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/moveCopyMessages.js?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/moveCopyMessages.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/moveCopyMessages.js Thu Jun 28 16:46:12 2012
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+define(["dojo/_base/xhr",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dojo/_base/window",
+        "dijit/registry",
+        "dojo/parser",
+        "dojo/_base/array",
+        "dojo/_base/event",
+        'dojo/_base/json',
+        "dojo/store/Memory",
+        "dijit/form/FilteringSelect",
+        "dojo/query",
+        "dojo/_base/connect",
+        "dojo/domReady!"],
+    function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, FilteringSelect, query, connect) {
+
+        var moveMessages = {};
+
+        var node = construct.create("div", null, win.body(), "last");
+
+        xhr.get({url: "moveCopyMessages.html",
+                 sync: true,
+                 load:  function(data) {
+                            var theForm;
+                            node.innerHTML = data;
+                            moveMessages.dialogNode = dom.byId("moveMessages");
+                            parser.instantiate([moveMessages.dialogNode]);
+
+                            theForm = registry.byId("formMoveMessages");
+
+
+                            var cancelButton = query(".moveMessageCancel")[0];
+                            connect.connect(registry.byNode(cancelButton), "onClick",
+                                            function(evt){
+                                                event.stop(evt);
+                                                registry.byId("moveMessages").hide();
+                                            });
+
+
+                            theForm.on("submit", function(e) {
+
+                                event.stop(e);
+                                if(theForm.validate()){
+
+                                    moveMessages.data.destinationQueue = theForm.getValues()["queue"];
+                                    var that = this;
+
+                                    xhr.post({url: "rest/message/"+encodeURIComponent(moveMessages.vhost)
+                                                      +"/"+encodeURIComponent(moveMessages.queue),
+                                             sync: true, handleAs: "json",
+                                             headers: { "Content-Type": "application/json"},
+                                             postData: json.toJson(moveMessages.data),
+                                             load: function(x) {that.success = true; },
+                                             error: function(error) {that.success = false; that.failureReason = error;}});
+
+                                    if(this.success === true) {
+                                        registry.byId("moveMessages").hide();
+                                        if(moveMessages.next) {
+                                            moveMessages.next();
+                                        }
+                                    } else {
+                                        alert("Error:" + this.failureReason);
+                                    }
+
+                                    return false;
+
+
+                                }else{
+                                    alert('Form contains invalid data.  Please correct first');
+                                    return false;
+                                }
+
+                            });
+
+                        }});
+
+        moveMessages.show = function(obj, next) {
+            var that = this;
+
+            moveMessages.vhost = obj.virtualhost;
+            moveMessages.queue = obj.queue;
+            moveMessages.data = obj.data;
+            moveMessages.next = next;
+            registry.byId("formMoveMessages").reset();
+
+
+
+            xhr.get({url: "rest/queue/" + encodeURIComponent(obj.virtualhost) + "?depth=0",
+                     handleAs: "json"}).then(
+                function(data) {
+                    var queues =  [];
+                    for(var i=0; i < data.length; i++) {
+                      queues[i] = {id: data[i].name, name: data[i].name};
+                    }
+                    var queueStore = new Memory({ data: queues });
+
+
+                    if(that.queueChooser) {
+                        that.queueChooser.destroy( false );
+                    }
+                    var queueDiv = dom.byId("moveMessages.selectQueueDiv");
+                    var input = construct.create("input", {id: "moveMessagesSelectQueue"}, queueDiv);
+
+                    that.queueChooser = new FilteringSelect({ id: "moveMessagesSelectQueue",
+                                                              name: "queue",
+                                                              store: queueStore,
+                                                              searchAttr: "name"}, input);
+
+
+
+                    registry.byId("moveMessages").show();
+
+
+                });
+
+
+        };
+
+        return moveMessages;
+    });

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/showMessage.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/showMessage.js?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/showMessage.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/showMessage.js Thu Jun 28 16:46:12 2012
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+define(["dojo/_base/xhr",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dojo/dom-class",
+        "dojo/_base/window",
+        "dijit/registry",
+        "dojo/parser",
+        "dojo/_base/array",
+        "dojo/_base/event",
+        'dojo/_base/json',
+        "dojo/query",
+        "dojo/_base/connect",
+        "qpid/common/properties",
+        "dojox/html/entities",
+        "dojo/domReady!"],
+    function (xhr, dom, construct, domClass, win, registry, parser, array, event, json, query, connect, properties, entities) {
+
+
+        function encode(val){
+            return typeof val === 'string' ? entities.encode(val) : val;
+        }
+
+        var showMessage = {};
+
+        showMessage.hide = function () {
+            if(this.populatedFields) {
+                for(var i = 0 ; i < this.populatedFields.length; i++) {
+                    this.populatedFields[i].innerHTML = "";
+                }
+                this.populatedFields = [];
+            }
+            registry.byId("showMessage").hide();
+        };
+
+        showMessage.loadViewMessage = function(data) {
+            var that = this;
+            node.innerHTML = data;
+            showMessage.dialogNode = dom.byId("showMessage");
+            parser.instantiate([showMessage.dialogNode]);
+
+            var closeButton = query(".closeViewMessage")[0];
+            connect.connect(closeButton, "onclick",
+                            function (evt) {
+                                event.stop(evt);
+                                showMessage.hide();
+                            });
+        };
+
+        showMessage.populateShowMessage = function(data) {
+
+            this.populatedFields = [];
+
+            for(var attrName in data) {
+                if(data.hasOwnProperty(attrName)) {
+                    var fields = query(".message-"+attrName, this.dialogNode);
+                    if(fields && fields.length != 0) {
+                        var field = fields[0];
+                        this.populatedFields.push(field);
+                        var val = data[attrName];
+                        if(val) {
+                            if(domClass.contains(field,"map")) {
+                                var tableStr = "<table style='border: 1pt'><tr><th style='width: 6em; font-weight: bold'>Header</th><th style='font-weight: bold'>Value</th></tr>";
+                                for(var name in val) {
+                                    if(val.hasOwnProperty(name)) {
+
+                                        tableStr += "<tr><td>"+encode(name)+"</td>";
+                                        tableStr += "<td>"+encode(val[ name ])+"</td></tr>";
+                                    }
+                                    field.innerHTML = tableStr;
+                                }
+                                tableStr += "</table>";
+                            } else if(domClass.contains(field,"datetime")) {
+                                var d = new Date(0);
+                                d.setUTCSeconds(val/1000);
+                                field.innerHTML = d.toLocaleString();
+                            } else {
+                                field.innerHTML = encode(val);
+                            }
+                        }
+                    }
+                }
+            }
+            var contentField = query(".message-content", this.dialogNode)[0];
+
+            if(data.mimeType && data.mimeType.match(/text\/.*/)) {
+                xhr.get({url: "rest/message-content/" + encodeURIComponent(showMessage.virtualhost)
+                                            + "/" + encodeURIComponent(showMessage.queue)
+                                            + "/" + encodeURIComponent(showMessage.messageNumber),
+                                     sync: true
+
+                                    }).then(function(obj) { contentField.innerHTML = encode(obj) });
+            } else {
+                contentField.innerHTML = "<a href=\"" + "rest/message-content/" + encodeURIComponent(showMessage.virtualhost)
+                                                            + "/" + encodeURIComponent(showMessage.queue)
+                                                            + "/" + encodeURIComponent(showMessage.messageNumber)
+                                        + "\" target=\"_blank\">Download</a>";
+            }
+            this.populatedFields.push(contentField);
+
+            registry.byId("showMessage").show();
+        };
+
+        showMessage.show = function(obj) {
+            showMessage.virtualhost = obj.virtualhost;
+            showMessage.queue = obj.queue;
+            showMessage.messageNumber = obj.messageNumber;
+
+            xhr.get({url: "rest/message/" + encodeURIComponent(obj.virtualhost)
+                            + "/" + encodeURIComponent(obj.queue)
+                            + "/" + encodeURIComponent(obj.messageNumber),
+                     sync: properties.useSyncGet,
+                     handleAs: "json",
+                     load: this.populateShowMessage
+                    });
+        };
+
+        var node = construct.create("div", null, win.body(), "last");
+
+        xhr.get({url: "showMessage.html",
+                 sync: true,
+                 load: showMessage.loadViewMessage
+                });
+
+        return showMessage;
+    });

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/treeView.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/treeView.js?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/treeView.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/js/qpid/management/treeView.js Thu Jun 28 16:46:12 2012
@@ -0,0 +1,313 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/xhr",
+        "dojo/query",
+        "dojo/io-query",
+        "dijit/Tree",
+        "qpid/common/util",
+        "qpid/common/updater",
+        "qpid/management/controller",
+        "dojo/domReady!"],
+       function (xhr, query, ioQuery, Tree, util, updater, controller) {
+
+           function TreeViewModel(queryString) {
+               this.query = queryString;
+
+               this.onChildrenChange = function (parent, children) {
+                   // fired when the set of children for an object change
+               };
+
+               this.onChange = function (object) {
+                   // fired when the properties of an object change
+               };
+
+               this.onDelete = function (object) {
+                   // fired when an object is deleted
+               };
+
+           }
+
+
+           TreeViewModel.prototype.buildModel = function (data) {
+               this.model = data;
+
+           };
+
+           TreeViewModel.prototype.updateModel = function (data) {
+               var that = this;
+
+               function checkForChanges(oldData, data) {
+                   var propName;
+                   if (oldData.name != data.name) {
+                       that.onChange(data);
+                   }
+
+                   var childChanges = false;
+                   // Iterate over old childTypes, check all are in new
+                   for (propName in oldData) {
+                       if (oldData.hasOwnProperty(propName)) {
+                           var oldChildren = oldData[ propName ];
+                           if (util.isArray(oldChildren)) {
+
+                               var newChildren = data[ propName ];
+
+                               if (!(newChildren && util.isArray(newChildren))) {
+                                   childChanges = true;
+                               } else {
+                                   var subChanges = false;
+                                   // iterate over elements in array, make sure in both, in which case recurse
+                                   for (var i = 0; i < oldChildren.length; i++) {
+                                       var matched = false;
+                                       for (var j = 0; j < newChildren.length; j++) {
+                                           if (oldChildren[i].id == newChildren[j].id) {
+                                               checkForChanges(oldChildren[i], newChildren[j]);
+                                               matched = true;
+                                               break;
+                                           }
+                                       }
+                                       if (!matched) {
+                                           subChanges = true;
+                                       }
+                                   }
+                                   if (subChanges == true || oldChildren.length != newChildren.length) {
+                                       that.onChildrenChange({ id:data.id + propName, _dummyChild:propName, data:data },
+                                                             newChildren);
+                                   }
+                               }
+                           }
+                       }
+                   }
+
+                   for (propName in data) {
+                       if (data.hasOwnProperty(propName)) {
+                           var prop = data[ propName ];
+                           if (util.isArray(prop)) {
+                               if (!(oldData[ propName ] && util.isArray(oldData[propName]))) {
+                                   childChanges = true;
+                               }
+                           }
+                       }
+                   }
+
+                   if (childChanges) {
+                       var children = [];
+                       that.getChildren(data, function (theChildren) {
+                           children = theChildren
+                       });
+                       that.onChildrenChange(data, children);
+                   }
+               }
+
+               var oldData = this.model;
+               this.model = data;
+
+               checkForChanges(oldData, data);
+           };
+
+
+           TreeViewModel.prototype.fetchItemByIdentity = function (id) {
+
+               function fetchItem(id, data) {
+                   var propName;
+
+                   if (data.id == id) {
+                       return data;
+                   } else if (id.indexOf(data.id) == 0) {
+                       return { id:id, _dummyChild:id.substring(id.length), data:data };
+                   } else {
+                       for (propName in data) {
+                           if (data.hasOwnProperty(propName)) {
+                               var prop = data[ propName ];
+                               if (util.isArray(prop)) {
+                                   for (var i = 0; i < prop.length; i++) {
+                                       var theItem = fetchItem(id, prop[i]);
+                                       if (theItem) {
+                                           return theItem;
+                                       }
+                                   }
+                               }
+                           }
+                       }
+                       return null;
+                   }
+               }
+
+               return fetchItem(id, this.model);
+           };
+
+           TreeViewModel.prototype.getChildren = function (parentItem, onComplete) {
+
+               if (parentItem) {
+                   if (parentItem._dummyChild) {
+                       onComplete(parentItem.data[ parentItem._dummyChild ]);
+                   } else {
+                       var children = [];
+                       for (var propName in parentItem) {
+                           if (parentItem.hasOwnProperty(propName)) {
+                               var prop = parentItem[ propName ];
+
+                               if (util.isArray(prop)) {
+                                   children.push({ id:parentItem.id
+                                       + propName, _dummyChild:propName, data:parentItem });
+                               }
+                           }
+                       }
+                       onComplete(children);
+                   }
+               } else {
+                   onComplete([]);
+               }
+           };
+
+           TreeViewModel.prototype.getIdentity = function (theItem) {
+               if (theItem) {
+                   return theItem.id;
+               }
+
+           };
+
+           TreeViewModel.prototype.getLabel = function (theItem) {
+               if (theItem) {
+                   if (theItem._dummyChild) {
+                       return theItem._dummyChild;
+                   } else {
+                       return theItem.name;
+                   }
+               } else {
+                   return "";
+               }
+           };
+
+           TreeViewModel.prototype.getRoot = function (onItem) {
+               onItem(this.model);
+           };
+
+           TreeViewModel.prototype.mayHaveChildren = function (theItem) {
+               if (theItem) {
+                   if (theItem._dummyChild) {
+                       return true;
+                   } else {
+                       for (var propName in theItem) {
+                           if (theItem.hasOwnProperty(propName)) {
+                               var prop = theItem[ propName ];
+                               if (util.isArray(prop)) {
+                                   return true;
+                               }
+                           }
+                       }
+                       return false;
+                   }
+               } else {
+                   return false;
+               }
+           };
+
+           TreeViewModel.prototype.relocate = function (theItem) {
+
+               function findItemDetails(theItem, details, type, object) {
+                   if (theItem.id == object.id) {
+                       details.type = type;
+                       details[ type ] = object.name;
+                   } else {
+                       details[ type ] = object.name;
+
+                       // iterate over children
+                       for (var propName in object) {
+                           if (object.hasOwnProperty(propName)) {
+                               var prop = object[ propName ];
+                               if (util.isArray(prop)) {
+                                   for (var i = 0; i < prop.length; i++) {
+                                       findItemDetails(theItem, details, propName.substring(0, propName.length - 1),
+                                                       prop[i]);
+
+                                       if (details.type) {
+                                           break;
+                                       }
+                                   }
+                               }
+                               if (details.type) {
+                                   break;
+                               }
+                           }
+                       }
+
+                       if (!details.type) {
+                           details[ type ] = null;
+                       }
+                   }
+               }
+
+               var details = new Object();
+
+               findItemDetails(theItem, details, "broker", this.model);
+
+               if (details.type == "broker") {
+                   controller.show("broker", "");
+               } else if (details.type == "virtualhost") {
+                   controller.show("virtualhost", details.virtualhost, {type:"broker", name:""});
+               } else if (details.type == "exchange") {
+                   controller.show("exchange", details.exchange, { type: "virtualhost", name: details.virtualhost, parent: {broker: {type:"broker", name:""}}});
+               } else if (details.type == "queue") {
+                   controller.show("queue", details.queue, { type: "virtualhost", name: details.virtualhost, parent: {broker: {type:"broker", name:""}}});
+               } else if (details.type == "connection") {
+                   controller.show("connection", details.connection, { type: "virtualhost", name: details.virtualhost, parent: {broker: {type:"broker", name:""}}});
+               } else if (details.type == 'port') {
+                   controller.show("port", details.port, { type: "virtualhost", name: details.virtualhost, parent: {broker: {type:"broker", name:""}}});
+               } else if (details.type == 'authenticationprovider') {
+                   controller.show("authenticationprovider", details.authenticationprovider, {broker: {type:"broker", name:""}});
+               }
+
+
+
+           };
+
+           TreeViewModel.prototype.update = function () {
+               var thisObj = this;
+
+               xhr.get({url:this.query, sync: true, handleAs:"json"})
+                   .then(function (data) {
+                             if (thisObj.model) {
+                                 thisObj.updateModel(data);
+                             }
+                             else {
+                                 thisObj.buildModel(data);
+                             }
+                         });
+
+           };
+
+           query('div[qpid-type="treeView"]').forEach(function(node, index, arr) {
+               var treeModel = new TreeViewModel("rest/structure");
+               treeModel.update();
+               var tree = new Tree({ model: treeModel }, node);
+               tree.on("dblclick",
+                       function (object) {
+                           if (object && !object._dummyChild) {
+                               treeModel.relocate(object);
+                           }
+
+                       }, true);
+               tree.startup();
+               updater.add( treeModel );
+           });
+
+           return TreeViewModel;
+       });
\ No newline at end of file

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/management.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/management.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/management.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/management.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>Qpid Management</title>
+    <link rel="stylesheet" href="dojo/dojo/resources/dojo.css">
+    <link rel="stylesheet" href="dojo/dijit/themes/claro/claro.css">
+    <link rel="stylesheet" href="dojo/dojox/grid/resources/claroGrid.css">
+    <link rel="stylesheet" href="dojo/dojox/grid/enhanced/resources/claro/EnhancedGrid.css">
+    <link rel="stylesheet" href="dojo/dojox/grid/enhanced/resources/EnhancedGrid_rtl.css">
+    <link rel="stylesheet" href="css/common.css" media="screen">
+    <script>
+        function getContextPath()
+        {
+            var contextPath = "/";
+            var documentURL = document.URL;
+            var managementPageStart = documentURL.lastIndexOf("/");
+            var firstSlashPos = documentURL.indexOf("/", documentURL.indexOf("//") + 2);
+            if (managementPageStart > firstSlashPos)
+            {
+                contextPath = documentURL.substring(firstSlashPos, managementPageStart);
+            }
+            return contextPath;
+        }
+
+        var dojoConfig = {
+            tlmSiblingOfDojo:false,
+            parseOnLoad:true,
+            async:true,
+            baseUrl: getContextPath(),
+            packages:[
+                { name:"dojo", location:"dojo/dojo" },
+                { name:"dijit", location:"dojo/dijit" },
+                { name:"dojox", location:"dojo/dojox" },
+                { name:"qpid", location:"js/qpid" }
+            ]
+        };
+
+    </script>
+    <script src="dojo/dojo/dojo.js">
+    </script>
+
+    <script>
+        require(["dijit/layout/BorderContainer",
+                    "dijit/layout/TabContainer",
+                    "dijit/layout/ContentPane",
+                    "dijit/TitlePane",
+                    "dojo/parser",
+                    "qpid/management/treeView",
+                    "qpid/management/controller",
+                    "qpid/common/footer",
+                    "qpid/authorization/sasl"]);
+    </script>
+
+</head>
+<body class="claro">
+
+<div id="pageLayout" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design: 'headline', gutters: false">
+    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
+        <div id="header" class="header"></div>
+    </div>
+    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
+        <div id="login"></div>
+    </div>
+    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'leading', splitter: true">
+        <div qpid-type="treeView" qpid-props="query: 'rest/structure'" ></div>
+    </div>
+    <div id="managedViews" data-dojo-type="dijit.layout.TabContainer" data-dojo-props="region:'center', tabPosition: 'top'">
+    </div>
+    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
+        <div qpid-type="footer"></div>
+    </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/moveCopyMessages.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/moveCopyMessages.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/moveCopyMessages.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/moveCopyMessages.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,36 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<div class="dijitHidden">
+    <div data-dojo-type="dijit.Dialog" style="width:600px;" data-dojo-props="title:'Move/Copy Messages'" id="moveMessages">
+        <form id="formMoveMessages" method="post" dojoType="dijit.form.Form">
+            <table cellpadding="0" cellspacing="2">
+                <tr>
+                    <td valign="top"><strong>Queue: </strong></td>
+                    <td><div id="moveMessages.selectQueueDiv"></div></td>
+                </tr>
+            </table>
+            <br/>
+
+            <!-- submit buttons -->
+
+            <input type="button" value="Cancel" label="Cancel" dojoType="dijit.form.Button" class="moveMessageCancel"/>
+            <input type="submit" value="Move Messages" label="Move Messages" dojoType="dijit.form.Button" />
+
+        </form>
+    </div>
+</div>

Copied: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showAuthProvider.html (from r1354912, qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/build.xml)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showAuthProvider.html?p2=qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showAuthProvider.html&p1=qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/build.xml&r1=1354912&r2=1355072&rev=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/experimental/shutdown/build.xml (original)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showAuthProvider.html Thu Jun 28 16:46:12 2012
@@ -7,9 +7,9 @@
  - to you under the Apache License, Version 2.0 (the
  - "License"); you may not use this file except in compliance
  - with the License.  You may obtain a copy of the License at
- - 
+ -
  -   http://www.apache.org/licenses/LICENSE-2.0
- - 
+ -
  - Unless required by applicable law or agreed to in writing,
  - software distributed under the License is distributed on an
  - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,14 +18,8 @@
  - under the License.
  -
  -->
-<project name="AMQ Broker Shutdown Plugin" default="build">
-    <property name="module.depends" value="common broker management/common broker-plugins"/>
-    <property name="module.test.depends" value="test broker/test management/common client systests"/>
-    <property name="module.manifest" value="MANIFEST.MF"/>
-    <property name="module.plugin" value="true"/>
-
-    <import file="../../../module.xml"/>
-
-    <target name="bundle" depends="bundle-tasks"/>
-
-</project>
+<div class="authorizationProvider">
+    <span style="">Name:</span><span class="name" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">Type:</span><span class="type" style="position:absolute; left:6em"></span>
+</div>
\ No newline at end of file

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showBroker.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showBroker.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showBroker.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showBroker.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,25 @@
+<div class="broker">
+    <span>Broker:</span><span class="broker-name" style="position:absolute; left:6em"></span>
+    <br/>
+<!--    <span>State:</span><span class="broker-state" style="position:absolute; left:6em"></span>
+    <br/>
+    <span>Durable:</span><span class="broker-durable" style="position:absolute; left:6em"></span>
+    <br/>
+    <span>Lifespan:</span><span class="broker-lifetimePolicy" style="position:absolute; left:6em" ></span>
+    <br/>                                                                                                 -->
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Virtual Hosts'">
+        <div class="broker-virtualhosts"></div>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Ports'">
+        <div class="broker-ports"></div>
+    </div>
+    <br/>
+
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Log File',  open: false">
+        <div class="broker-logfile"></div>
+    </div>
+    <br/>
+</div>
+

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showConnection.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showConnection.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showConnection.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showConnection.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,47 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+<div class="connection">
+    <span style="">Name:</span><span class="name" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">State:</span><span class="state" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Pre-fetched:</span>
+    <br/>
+    <span style="">Durable:</span><span class="durable" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Inbound:</span>
+    <span class="msgInRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesInRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesInRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <span style="">Lifespan:</span><span style="position:absolute; left:6em" class="lifetimePolicy"></span>
+    <span style="position:absolute; left:26em">Outbound:</span>
+    <span class="msgOutRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesOutRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesOutRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Sessions'">
+        <div class="sessions"></div>
+    </div>
+    <br/>
+
+</div>

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showExchange.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showExchange.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showExchange.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showExchange.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,46 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+<div class="exchange">
+    <span style="">Exchange:</span><span class="name" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">State:</span><span class="state" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">Durable:</span><span class="durable" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Inbound:</span>
+    <span class="msgInRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesInRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesInRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <span style="">Lifespan:</span><span style="position:absolute; left:6em" class="lifetimePolicy"></span>
+    <span style="position:absolute; left:26em">Dropped:</span>
+    <span class="msgDropRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesDropRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesDropRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Bindings'">
+        <div class="bindings"></div>
+        <button data-dojo-type="dijit.form.Button" class="addBindingButton">Add Binding</button>
+    </div>
+    <br/>
+</div>

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showMessage.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showMessage.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showMessage.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showMessage.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,73 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<div class="dijitHidden">
+    <div data-dojo-type="dijit.Dialog" style="width:600px;" data-dojo-props="title:'View Message'" id="showMessage">
+
+    <table style="border: 0;">
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Message Number:</span></td>
+            <td><span class="message-id"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Message Id:</span></td>
+            <td><span class="message-messageId"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">State:</span></td>
+            <td><span class="message-state"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Persistent:</span></td>
+            <td><span class="message-persistent boolean"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Priority:</span></td>
+            <td><span class="message-priority"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Arrival Time:</span>
+            </td><td><span class="message-arrivalTime datetime"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Expiration:</span></td>
+            <td><span class="message-expiration datetime"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">MIME Type:</span></td>
+            <td><span class="message-mimeType"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">User:</span></td>
+            <td><span class="message-userId"></span></td>
+        </tr>
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Headers:</span></td>
+            <td><div class="message-headers map"></div></td>
+        </tr>
+
+        <tr style="margin-bottom: 4pt">
+            <td style="width: 10em; vertical-align: top"><span style="font-weight: bold;">Content:</span></td>
+            <td><div class="message-content"></div></td>
+        </tr>
+    </table>
+        <br/>
+    <input type="button" value="Close" label="Close" dojoType="dijit.form.Button" class="closeViewMessage"/>
+
+    </div>
+</div>
+

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showQueue.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showQueue.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showQueue.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showQueue.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,97 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+<div class="queue">
+    <span style="">Queue:</span><span class="name" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Size:</span>
+    <span class="queueDepthMessages" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msgs</span>
+    <span class="queueDepthBytes" style="position:absolute; right: 3.3em">(</span>
+    <span class="queueDepthBytesUnits" style="position:absolute; right: 0em; width: 3em">)</span>
+    <br/>
+    <span style="">State:</span><span class="state" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Pre-fetched:</span>
+    <span class="unacknowledgedMessages" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msgs</span>
+    <span class="unacknowledgedBytes" style="position:absolute; right: 3.3em"></span>
+    <span class="unacknowledgedBytesUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <span style="">Durable:</span><span class="durable" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Inbound:</span>
+    <span class="msgInRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesInRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesInRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <span style="">Lifespan:</span><span style="position:absolute; left:6em" class="lifetimePolicy"></span>
+    <span style="position:absolute; left:26em">Outbound:</span>
+    <span class="msgOutRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesOutRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesOutRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Bindings'">
+        <div class="bindings"></div>
+        <button data-dojo-type="dijit.form.Button" class="addBindingButton" type="button">Add Binding</button>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Consumers'">
+        <div class="consumers"></div>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Messages'">
+        <div class="messages"></div>
+        <button data-dojo-type="dijit.form.Button" class="deleteMessagesButton" type="button">Delete Messages</button>
+        <button data-dojo-type="dijit.form.Button" class="moveMessagesButton" type="button">Move Messages</button>
+        <button data-dojo-type="dijit.form.Button" class="copyMessagesButton" type="button">Copy Messages</button>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Alerting Thresholds', open: false">
+        <span style="">Max. Queue Size:</span>
+        <span class="alertThresholdQueueDepthMessages"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span style="position:absolute; left:16.2em">msgs</span>
+
+        <span class="alertThresholdQueueDepthBytes"
+              style="position:absolute; left:20em; width:8em; text-align:right"></span>
+        <span class="alertThresholdQueueDepthBytesUnits" style="position:absolute; left:28.2em"></span>
+        <br>
+        <span style="">Max. Message Age:</span>
+        <span class="alertThresholdMessageAge"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span class="alertThresholdMessageAgeUnits" style="position:absolute; left:16.2em"></span>
+
+        <span style="position:absolute; left:21em">Size: </span>
+        <span class="alertThresholdMessageSize"
+              style="position:absolute; left:23em; width:5em; text-align:right"></span>
+        <span class="alertThresholdMessageSizeUnits" style="position:absolute; left:28.2em"></span>
+        <br/>
+        <br/>
+        <span style="">Alert frequency:</span>
+        <span class="alertRepeatGap"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span class="alertRepeatGapUnits" style="position:absolute; left:16.2em"></span>
+
+
+
+    </div>
+</div>
+

Added: qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showVirtualHost.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showVirtualHost.html?rev=1355072&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showVirtualHost.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management/src/main/java/resources/showVirtualHost.html Thu Jun 28 16:46:12 2012
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+
+<div class="virtualhost">
+    <span style="">Name:</span><span class="name" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">State:</span><span class="state" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">Durable:</span><span class="durable" style="position:absolute; left:6em"></span>
+    <span style="position:absolute; left:26em">Inbound:</span>
+    <span class="msgInRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesInRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesInRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <span style="">Lifespan:</span><span style="position:absolute; left:6em" class="lifetimePolicy"></span>
+    <span style="position:absolute; left:26em">Outbound:</span>
+    <span class="msgOutRate" style="position:absolute; right:9.5em"></span>
+    <span style="position:absolute; right: 5em; width: 4em"> msg/s</span>
+    <span class="bytesOutRate" style="position:absolute; right: 3.3em"></span>
+    <span class="bytesOutRateUnits" style="position:absolute; right: 0em; width: 3em"></span>
+    <br/>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Exchanges'">
+        <div class="exchanges"></div>
+        <button data-dojo-type="dijit.form.Button" class="addExchangeButton">Add Exchange</button>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Queues'">
+        <div class="queues"></div>
+        <button data-dojo-type="dijit.form.Button" class="addQueueButton">Add Queue</button>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Connections'">
+        <div class="connections"></div>
+    </div>
+    <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Alerting Thresholds', open: false">
+        <span style="">Max. Queue Size:</span>
+        <span class="alertThresholdQueueDepthMessages"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span style="position:absolute; left:16.2em">msgs</span>
+
+        <span class="alertThresholdQueueDepthBytes"
+              style="position:absolute; left:20em; width:8em; text-align:right"></span>
+        <span class="alertThresholdQueueDepthBytesUnits" style="position:absolute; left:28.2em"></span>
+        <br>
+        <span style="">Max. Message Age:</span>
+        <span class="alertThresholdMessageAge"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span class="alertThresholdMessageAgeUnits" style="position:absolute; left:16.2em"></span>
+
+        <span style="position:absolute; left:21em">Size: </span>
+        <span class="alertThresholdMessageSize"
+              style="position:absolute; left:23em; width:5em; text-align:right"></span>
+        <span class="alertThresholdMessageSizeUnits" style="position:absolute; left:28.2em"></span>
+        <br/>
+        <br/>
+        <span style="">Alert frequency:</span>
+        <span class="alertRepeatGap"
+              style="position:absolute; left:8em; width:8em; text-align:right"></span>
+        <span class="alertRepeatGapUnits" style="position:absolute; left:16.2em"></span>
+    </div>
+</div>
+

Modified: qpid/trunk/qpid/java/broker/etc/broker_example.acl
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/etc/broker_example.acl?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/etc/broker_example.acl (original)
+++ qpid/trunk/qpid/java/broker/etc/broker_example.acl Thu Jun 28 16:46:12 2012
@@ -24,6 +24,8 @@
 #Define a 'messaging-users' group with users  'client' and  'server' in it
 GROUP messaging-users client server
 
+#Define a group for management web console users
+GROUP webadmins webadmin
 
 ### MANAGEMENT ####
 
@@ -74,6 +76,23 @@ ACL ALLOW-LOG server CONSUME QUEUE name=
 ACL ALLOW-LOG server BIND EXCHANGE
 ACL ALLOW-LOG server PUBLISH EXCHANGE name="amq.direct" routingKey="TempQueue*"
 
+# ACL for web management console admins
+# All rules below are required for console admin users
+# to perform create/update/delete operations
+ACL ALLOW-LOG webadmins CREATE QUEUE
+ACL ALLOW-LOG webadmins DELETE QUEUE
+ACL ALLOW-LOG webadmins PURGE  QUEUE
+ACL ALLOW-LOG webadmins CREATE EXCHANGE
+ACL ALLOW-LOG webadmins DELETE EXCHANGE
+ACL ALLOW-LOG webadmins BIND   EXCHANGE
+ACL ALLOW-LOG webadmins UNBIND EXCHANGE
+ACL ALLOW-LOG webadmins UPDATE METHOD
+
+# at the moment only the following UPDATE METHOD rules are supported by web management console
+#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="moveMessages"
+#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="copyMessages"
+#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="deleteMessages"
+
 ### DEFAULT ###
 
 #Deny all users from performing all operations

Modified: qpid/trunk/qpid/java/broker/etc/log4j.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/etc/log4j.xml?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/etc/log4j.xml (original)
+++ qpid/trunk/qpid/java/broker/etc/log4j.xml Thu Jun 28 16:46:12 2012
@@ -87,10 +87,6 @@
         </layout>
     </appender>
 
-    <category additivity="true" name="org.apache.qpid.server.queue.AMQQueueMBean">
-        <priority value="info"/>
-    </category>
-
     <!-- Provide warnings to standard output -->
     <category additivity="true" name="org.apache.qpid">
         <priority value="warn"/>
@@ -101,8 +97,6 @@
       <level value="info"/>
     </logger>
 
-
-
     <!-- Examples of additional logging settings -->
     <!-- Used to generate extra debug. See debug.log4j.xml -->
     

Modified: qpid/trunk/qpid/java/broker/etc/passwd
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/etc/passwd?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/etc/passwd (original)
+++ qpid/trunk/qpid/java/broker/etc/passwd Thu Jun 28 16:46:12 2012
@@ -21,3 +21,5 @@ client:guest
 server:guest
 admin:admin
 
+webadmin:webadmin
+

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java Thu Jun 28 16:46:12 2012
@@ -26,8 +26,6 @@ import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
-import org.apache.qpid.server.logging.management.LoggingManagementMBean;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -65,7 +63,6 @@ public class QpidLog4JConfigurator
             LOCK.lock();
 
             parseXMLConfigFile(filename);
-            checkLoggerLevels(filename);
 
             DOMConfigurator.configure(filename);
             
@@ -84,7 +81,6 @@ public class QpidLog4JConfigurator
                                                                              SAXException, IllegalLoggerLevelException
     {
         parseXMLConfigFile(filename);
-        checkLoggerLevels(filename);
         
         QpidLog4JXMLWatchdog watchdog = new QpidLog4JXMLWatchdog(filename);
         watchdog.setDelay(delay);
@@ -200,23 +196,6 @@ public class QpidLog4JConfigurator
                     return;
                 }
 
-                try
-                {
-                    checkLoggerLevels(filename);
-                }
-                catch (Exception e)
-                {
-                    //logger will be instantiated following first configuration success, which has been pre-validated
-                    //and so the null check should never actually be required.
-                    if(_logger != null)
-                    {
-                        _logger.warn("Errors were found when validating the logger level values in the " +
-                                "log4j XML configuration file. The new configuration was not applied. " +
-                                "Correct the issues to prompt another update attempt: " + e.getMessage());
-                    }
-                    return;
-                }
-
                 //everything checked was ok, let the normal update process proceed
                 super.doOnChange();
 
@@ -235,60 +214,7 @@ public class QpidLog4JConfigurator
 
         }
     }
-    
-    protected static void checkLoggerLevels(String filename) throws IllegalLoggerLevelException, IOException
-    {
-        //check that the logger levels specified in the XML are actually valid
 
-        try
-        {
-            LOCK.lock();
-            
-            //get the Logger levels to check
-            Map<String, String> loggersLevels;
-            loggersLevels = LoggingManagementMBean.retrieveConfigFileLoggersLevels(filename);
-            //add the RootLogger to the list too
-            String rootLoggerlevelString = LoggingManagementMBean.retrieveConfigFileRootLoggerLevel(filename);
-            loggersLevels.put("Root", rootLoggerlevelString);
-            
-
-            for (Map.Entry<String, String> entry : loggersLevels.entrySet())
-            {
-                String loggerName = entry.getKey();
-                String levelString = entry.getValue();
-
-                //let log4j replace any properties in the string
-                String log4jConfiguredString = domConfig.subst(levelString);
-                
-                if(log4jConfiguredString.equals("") && ! log4jConfiguredString.equals(levelString))
-                {
-                    //log4j has returned an empty string but this isnt what we gave it.
-                    //There may have been an undefined property. Unlike an incorrect
-                    //literal value, we will allow this case to proceed, but warn users.
-                    
-                    if(_logger != null)
-                    {
-                        _logger.warn("Unable to detect Level value from '" + levelString 
-                                +"' for logger '" + loggerName + "', Log4J will default this to DEBUG");
-                    }
-                    else
-                    {
-                        System.err.println("Unable to detect Level value from '" + levelString 
-                                +"' for logger " + loggerName + ", Log4J will default this to DEBUG");
-                    }
-                    
-                    continue;
-                }
-                
-                checkLevel(loggerName,log4jConfiguredString);
-            }
-        }
-        finally
-        {
-            LOCK.unlock();
-        }
-    }
-    
     private static void checkLevel(String loggerName, String levelString) throws IllegalLoggerLevelException
     {
         if("null".equalsIgnoreCase(levelString) || "inherited".equalsIgnoreCase(levelString))

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java Thu Jun 28 16:46:12 2012
@@ -540,6 +540,11 @@ public class ManagementExchange implemen
         return getMsgReceives();
     }
 
+    public long getMsgDrops()
+    {
+        return 0l;
+    }
+
     public long getByteReceives()
     {
         return _bytesReceived.get();
@@ -550,6 +555,11 @@ public class ManagementExchange implemen
         return getByteReceives();
     }
 
+    public long getByteDrops()
+    {
+        return 0l;
+    }
+
     public long getCreateTime()
     {
         return _createTime;

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java Thu Jun 28 16:46:12 2012
@@ -21,6 +21,8 @@
 
 package org.apache.qpid.qmf;
 
+import java.util.Collection;
+import java.util.Collections;
 import org.apache.commons.lang.NotImplementedException;
 
 import org.apache.qpid.framing.AMQShortString;
@@ -111,6 +113,16 @@ public class QMFMessage implements Serve
         return 0;
     }
 
+    public String getUserId()
+    {
+        return null;
+    }
+
+    public String getAppId()
+    {
+        return null;
+    }
+
     public String getMessageId()
     {
         return null;
@@ -166,6 +178,12 @@ public class QMFMessage implements Serve
         return false;
     }
 
+    @Override
+    public Collection<String> getHeaderNames()
+    {
+        return Collections.EMPTY_SET;
+    }
+
     public boolean containsHeader(String name)
     {
         return false;

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java Thu Jun 28 16:46:12 2012
@@ -140,7 +140,7 @@ public class AMQChannel implements Sessi
 
     private UnacknowledgedMessageMap _unacknowledgedMessageMap = new UnacknowledgedMessageMapImpl(DEFAULT_PREFETCH);
 
-    // Set of messages being acknoweledged in the current transaction
+    // Set of messages being acknowledged in the current transaction
     private SortedSet<QueueEntry> _acknowledgedMessages = new TreeSet<QueueEntry>();
 
     private final AtomicBoolean _suspended = new AtomicBoolean(false);
@@ -263,6 +263,11 @@ public class AMQChannel implements Sessi
         return _txnCount.get();
     }
 
+    public Long getTxnStart()
+    {
+        return _txnStarts.get();
+    }
+
     public int getChannelId()
     {
         return _channelId;
@@ -440,7 +445,7 @@ public class AMQChannel implements Sessi
      * @param acks      Are acks enabled for this subscriber
      * @param filters   Filters to apply to this subscriber
      *
-     * @param noLocal   Flag stopping own messages being receivied.
+     * @param noLocal   Flag stopping own messages being received.
      * @param exclusive Flag requesting exclusive access to the queue
      * @return the consumer tag. This is returned to the subscriber and used in subsequent unsubscribe requests
      *
@@ -1417,6 +1422,11 @@ public class AMQChannel implements Sessi
         return false;
     }
 
+    public int getUnacknowledgedMessageCount()
+    {
+        return getUnacknowledgedMessageMap().size();
+    }
+
     private void flow(boolean flow)
     {
         MethodRegistry methodRegistry = _session.getMethodRegistry();
@@ -1424,6 +1434,7 @@ public class AMQChannel implements Sessi
         _session.writeFrame(responseBody.generateFrame(_channelId));
     }
 
+    @Override
     public boolean getBlocking()
     {
         return _blocking.get();

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java Thu Jun 28 16:46:12 2012
@@ -25,24 +25,17 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
-import java.util.EnumSet;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
 import javax.net.ssl.SSLContext;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 import org.apache.log4j.xml.QpidLog4JConfigurator;
 import org.apache.qpid.server.configuration.ServerConfiguration;
 import org.apache.qpid.server.configuration.ServerNetworkTransportConfiguration;
-import org.apache.qpid.server.configuration.management.ConfigurationManagementMBean;
-import org.apache.qpid.server.information.management.ServerInformationMBean;
 import org.apache.qpid.server.logging.SystemOutMessageLogger;
 import org.apache.qpid.server.logging.actors.BrokerActor;
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.logging.actors.GenericActor;
-import org.apache.qpid.server.logging.management.LoggingManagementMBean;
 import org.apache.qpid.server.logging.messages.BrokerMessages;
 import org.apache.qpid.server.protocol.AmqpProtocolVersion;
 import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
@@ -118,6 +111,14 @@ public class Broker
 
         ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(configFile, options.getBundleContext());
         ServerConfiguration serverConfig = config.getConfiguration();
+        if (options.getQpidWork() != null)
+        {
+            serverConfig.setQpidWork(options.getQpidWork());
+        }
+        if (options.getQpidHome() != null)
+        {
+            serverConfig.setQpidHome(options.getQpidHome());
+        }
         updateManagementPorts(serverConfig, options.getJmxPortRegistryServer(), options.getJmxPortConnectorServer());
 
         ApplicationRegistry.initialise(config);
@@ -135,14 +136,6 @@ public class Broker
 
         try
         {
-            configureLoggingManagementMBean(logConfigFile, options.getLogWatchFrequency());
-
-            ConfigurationManagementMBean configMBean = new ConfigurationManagementMBean();
-            configMBean.register();
-
-            ServerInformationMBean sysInfoMBean = new ServerInformationMBean(config);
-            sysInfoMBean.register();
-
             Set<Integer> ports = new HashSet<Integer>(options.getPorts());
             if(ports.isEmpty())
             {
@@ -258,7 +251,7 @@ public class Broker
                     transport.accept(settings, protocolEngineFactory, null);
 
                     ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
-                                    new QpidAcceptor(transport,"TCP"));
+                                    new QpidAcceptor(transport,QpidAcceptor.Transport.TCP, supported));
                     CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                 }
             }
@@ -302,7 +295,7 @@ public class Broker
                     transport.accept(settings, protocolEngineFactory, sslContext);
 
                     ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
-                            new QpidAcceptor(transport,"TCP"));
+                            new QpidAcceptor(transport,QpidAcceptor.Transport.SSL, supported));
                     CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
                 }
             }
@@ -495,12 +488,6 @@ public class Broker
         }
     }
 
-    private void configureLoggingManagementMBean(File logConfigFile, int logWatchTime) throws Exception
-    {
-        LoggingManagementMBean blm = new LoggingManagementMBean(logConfigFile.getPath(),logWatchTime);
-
-        blm.register();
-    }
 
     private void addShutdownHook()
     {

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java Thu Jun 28 16:46:12 2012
@@ -33,6 +33,7 @@ public class BrokerOptions
     public static final String DEFAULT_CONFIG_FILE = "etc/config.xml";
     public static final String DEFAULT_LOG_CONFIG_FILE = "etc/log4j.xml";
     public static final String QPID_HOME = "QPID_HOME";
+    public static final String QPID_WORK = "QPID_WORK";
 
     private final Set<Integer> _ports = new HashSet<Integer>();
     private final Set<Integer> _sslPorts = new HashSet<Integer>();
@@ -47,6 +48,8 @@ public class BrokerOptions
     private BundleContext _bundleContext;
 
     private Integer _logWatchFrequency = 0;
+    private String _qpidWorkFolder;
+    private String _qpidHomeFolder;
 
     public void addPort(final int port)
     {
@@ -109,7 +112,7 @@ public class BrokerOptions
     }
     public String getQpidHome()
     {
-        return System.getProperty(QPID_HOME);
+        return _qpidHomeFolder == null? System.getProperty(QPID_HOME): _qpidHomeFolder;
     }
 
     public Set<Integer> getExcludedPorts(final ProtocolExclusion excludeProtocol)
@@ -179,4 +182,19 @@ public class BrokerOptions
         Set<Integer> ports = _inclusionMap.get(includeProtocol);
         ports.add(port);
     }
+
+    public String getQpidWork()
+    {
+        return _qpidWorkFolder;
+    }
+
+    public void setQpidWork(String qpidWorkFolder)
+    {
+        _qpidWorkFolder = qpidWorkFolder;
+    }
+
+    public void setQpidHome(String qpidHomeFolder)
+    {
+        _qpidHomeFolder = qpidHomeFolder;
+    }
 }
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ExchangeConfig.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ExchangeConfig.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ExchangeConfig.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ExchangeConfig.java Thu Jun 28 16:46:12 2012
@@ -49,7 +49,12 @@ public interface ExchangeConfig extends 
 
     long getMsgRoutes();
 
+    long getMsgDrops();
+
     long getByteReceives();
 
     long getByteRoutes();
+
+    long getByteDrops();
+
 }
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java Thu Jun 28 16:46:12 2012
@@ -126,6 +126,11 @@ public class QueueConfiguration extends 
         return _name;
     }
 
+    public String getDescription()
+    {
+        return getStringValue("description");
+    }
+
     public int getMaximumMessageAge()
     {
         return getIntValue("maximumMessageAge", _vHostConfig.getMaximumMessageAge());
@@ -226,4 +231,5 @@ public class QueueConfiguration extends 
           
 
     }
+
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java Thu Jun 28 16:46:12 2012
@@ -64,6 +64,7 @@ public class ServerConfiguration extends
     public static final long DEFAULT_HOUSEKEEPING_PERIOD = 30000L;
     public static final int DEFAULT_JMXPORT_REGISTRYSERVER = 8999;
     public static final int JMXPORT_CONNECTORSERVER_OFFSET = 100;
+    public static final int DEFAULT_HTTP_MANAGEMENT_PORT = 8080;
 
     public static final String QPID_HOME = "QPID_HOME";
     public static final String QPID_WORK = "QPID_WORK";
@@ -75,6 +76,8 @@ public class ServerConfiguration extends
 
     private File _configFile;
     private File _vhostsFile;
+    private String _qpidWork;
+    private String _qpidHome;
 
     // Map of environment variables to config items
     private static final Map<String, String> envVarMap = new HashMap<String, String>();
@@ -110,6 +113,8 @@ public class ServerConfiguration extends
         envVarMap.put("QPID_MSGAUTH", "security.msg-auth");
         envVarMap.put("QPID_AUTOREGISTER", "auto_register");
         envVarMap.put("QPID_MANAGEMENTENABLED", "management.enabled");
+        envVarMap.put("QPID_HTTPMANAGEMENTENABLED", "management.http.enabled");
+        envVarMap.put("QPID_HTTPMANAGEMENTPORT", "management.http.port");
         envVarMap.put("QPID_HEARTBEATDELAY", "heartbeat.delay");
         envVarMap.put("QPID_HEARTBEATTIMEOUTFACTOR", "heartbeat.timeoutFactor");
         envVarMap.put("QPID_MAXIMUMMESSAGEAGE", "maximumMessageAge");
@@ -511,12 +516,26 @@ public class ServerConfiguration extends
 
     public String getQpidWork()
     {
-        return System.getProperty(QPID_WORK, System.getProperty("java.io.tmpdir"));
+        if ( _qpidWork == null )
+        {
+            return System.getProperty(QPID_WORK, System.getProperty("java.io.tmpdir"));
+        }
+        else
+        {
+            return _qpidWork;
+        }
     }
 
     public String getQpidHome()
     {
-        return System.getProperty(QPID_HOME);
+        if ( _qpidHome == null )
+        {
+            return System.getProperty(QPID_HOME);
+        }
+        else
+        {
+            return _qpidHome;
+        }
     }
 
     public void setJMXPortRegistryServer(int registryServerPort)
@@ -554,6 +573,16 @@ public class ServerConfiguration extends
         return getBooleanValue("management.platform-mbeanserver", true);
     }
 
+    public boolean getHTTPManagementEnabled()
+    {
+        return getBooleanValue("management.http.enabled", true);
+    }
+
+    public int getHTTPManagementPort()
+    {
+        return getIntValue("management.http.port", 8080);
+    }
+
     public String[] getVirtualHosts()
     {
         return _virtualHosts.keySet().toArray(new String[_virtualHosts.size()]);
@@ -622,7 +651,7 @@ public class ServerConfiguration extends
 
     public boolean getManagementSSLEnabled()
     {
-        return getBooleanValue("management.ssl.enabled", true);
+        return getBooleanValue("management.ssl.enabled", false);
     }
 
     public String getManagementKeyStorePassword()
@@ -636,16 +665,11 @@ public class ServerConfiguration extends
         return getBooleanValue("queue.auto_register", true);
     }
 
-    public boolean getManagementEnabled()
+    public boolean getJMXManagementEnabled()
     {
         return getBooleanValue("management.enabled", true);
     }
 
-    public void setManagementEnabled(boolean enabled)
-    {
-        getConfig().setProperty("management.enabled", enabled);
-    }
-
     public int getHeartBeatDelay()
     {
         return getIntValue("heartbeat.delay", 5);
@@ -981,4 +1005,14 @@ public class ServerConfiguration extends
 
         return reply == null ? null : AmqpProtocolVersion.valueOf(reply);
     }
+
+    public void setQpidWork(String path)
+    {
+        _qpidWork = path;
+    }
+
+    public void setQpidHome(String path)
+    {
+        _qpidHome = path;
+    }
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java?rev=1355072&r1=1355071&r2=1355072&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java Thu Jun 28 16:46:12 2012
@@ -88,6 +88,13 @@ public class ConnectionRegistry implemen
                 }
             }
         }
+        synchronized (_listeners)
+        {
+            for(RegistryChangeListener listener : _listeners)
+            {
+                listener.connectionRegistered(connnection);
+            }
+        }
     }
 
     public void deregisterConnection(AMQConnectionModel connnection)
@@ -104,6 +111,14 @@ public class ConnectionRegistry implemen
                 }
             }
         }
+
+        synchronized (_listeners)
+        {
+            for(RegistryChangeListener listener : _listeners)
+            {
+                listener.connectionUnregistered(connnection);
+            }
+        }
     }
 
     public void addRegistryChangeListener(RegistryChangeListener listener)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org