mc4j-cvs Mailing List for MC4J JMX Console (Page 6)
Brought to you by:
ghinkl
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(7) |
Apr
(135) |
May
(32) |
Jun
(34) |
Jul
|
Aug
|
Sep
(7) |
Oct
(139) |
Nov
(11) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(34) |
Feb
(1) |
Mar
(12) |
Apr
|
May
(87) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(27) |
Nov
(49) |
Dec
(13) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(252) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(3) |
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
(15) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/dashboard/components Modified Files: NumericAttributeGaugeMeter.java AttributeTreeTableExplorer.java AttributeTablePopupComponent.java BeanComponent.java BeanListComponent.java AttributeTableComponent.java MBeanTreeComponent.java AttributeListComponent.java RefreshControlComponent.java TimeLabelComponent.java ForEachPanelComponent.java NumericAttributeMeter.java NumericAttributeGraph.java OperationListComponent.java AttributeComponent.java Added Files: TabularDataComponent.java OperationResultTableComponent.java ErrorComponent.java Log Message: Merging EMS into head for the 2.0 release work Index: AttributeTableComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTableComponent.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AttributeTableComponent.java 14 Mar 2005 16:17:22 -0000 1.12 --- AttributeTableComponent.java 12 Apr 2006 19:13:59 -0000 1.13 *************** *** 17,50 **** package org.mc4j.console.dashboard.components; ! import org.jdesktop.jdnc.JNTable; ! import org.jdesktop.swing.JXTable; ! import org.jdesktop.swing.decorator.AlternateRowHighlighter; ! import org.jdesktop.swing.decorator.ComponentAdapter; ! import org.jdesktop.swing.decorator.ConditionalHighlighter; ! import org.jdesktop.swing.decorator.Highlighter; ! import org.jdesktop.swing.decorator.HighlighterPipeline; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.operation.OperationNode; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.dashboard.Dashboard; ! import org.mc4j.console.swing.table.TableMap; ! import org.mc4j.console.swing.table.TableSorter; import javax.swing.*; - import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; ! import javax.swing.table.JTableHeader; ! import javax.swing.table.TableCellRenderer; ! import javax.swing.table.TableModel; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Font; ! import java.util.ArrayList; ! import java.util.Arrays; ! import java.util.Iterator; import java.util.List; - import java.util.Map; /** --- 17,35 ---- package org.mc4j.console.dashboard.components; ! ! ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.jdesktop.swingx.JXTable; ! import org.jdesktop.swingx.decorator.HighlighterPipeline; ! import org.jdesktop.swingx.decorator.AlternateRowHighlighter; ! import org.jdesktop.swingx.decorator.Highlighter; import javax.swing.*; import javax.swing.table.DefaultTableModel; ! import java.awt.*; ! import java.util.*; import java.util.List; /** *************** *** 56,68 **** protected List attributeNames = new ArrayList(); ! protected List mbeanNodes; ! ! protected MBeanNode mbeanNode; protected String label = ""; - protected JScrollPane scrollPane; protected JXTable table; - protected TableSorter tableSorter; protected AttributeTableModel tableModel; --- 41,49 ---- protected List attributeNames = new ArrayList(); ! protected List<EmsBean> beanList; protected String label = ""; protected JXTable table; protected AttributeTableModel tableModel; *************** *** 81,88 **** - private Dashboard dashboard; - - private ConnectionNode connectionNode; - public void init() { --- 62,65 ---- *************** *** 100,138 **** ! this.tableModel = new AttributeTableModel(columnNames, this.mbeanNodes.size()); ! // this.tableSorter = new TableSorter(this.tableModel); ! JNTable nTable = new JNTable(tableModel); ! nTable.setHasColumnControl(true); ! this.table = nTable.getTable();//new JXTable(tableModel); //this.tableSorter); ! // this.scrollPane = new JScrollPane(this.table); ! // this.tableSorter.addMouseListenerToHeaderInTable(this.table); this.table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); ! // this.table.setFont(VALUE_FONT); ! this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter(), new ChangeHighlighter()})); - /*for (int i = 0; i < attributeNames.size(); i++) { - this.table.getColumnModel().getColumn(i).setHeaderRenderer(new SortHeaderRenderer()); - this.table.getColumnModel().getColumn(i).setCellRenderer(new ChangeRenderer()); - }*/ ! add(nTable, BorderLayout.CENTER); // The first refresh sets column classes properly refresh(); - // iterate over the column classes and proxy them to a highlighting renderer this.doLayout(); this.repaint(); - //Thread refresher = new Thread(this, "AttributeTableRefresher"); - //refresher.start(); } ! public class ChangeHighlighter extends ConditionalHighlighter { public ChangeHighlighter() { setForeground(Color.red); --- 77,104 ---- ! this.tableModel = new AttributeTableModel(columnNames, this.attributeNames.size()); ! this.table = new JXTable(tableModel); ! ! this.table.setColumnControlVisible(true); this.table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); ! this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter()/*, new ChangeHighlighter()*/})); ! add(new JScrollPane(this.table), BorderLayout.CENTER); // The first refresh sets column classes properly refresh(); this.doLayout(); this.repaint(); } ! /* public class ChangeHighlighter extends ConditionalHighlighter { public ChangeHighlighter() { setForeground(Color.red); *************** *** 148,152 **** table.convertColumnIndexToModel(componentAdapter.column)); } ! } public void refresh() { --- 114,118 ---- table.convertColumnIndexToModel(componentAdapter.column)); } ! }*/ public void refresh() { *************** *** 165,169 **** if (null != matchedDashboards) { // very much magic here: ! // - BeanMatchList(0) contains the id of the match list // - the contextStarter contains the list of mbeanNodes under that id --- 131,135 ---- if (null != matchedDashboards) { // very much magic here: ! // - BeanMatchList (0) contains the id of the match list // - the contextStarter contains the list of mbeanNodes under that id *************** *** 184,193 **** int row = 0; ! for (Iterator iterator = mbeanNodes.iterator(); iterator.hasNext();) { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! if (beanNode.isRegistered()) { ! beanNode.retrieveData(); ! Map attributeNodeMap = beanNode.getAttributeNodeMap(); int col = 0; --- 150,156 ---- int row = 0; ! for (EmsBean bean : beanList) { ! if (true) { // TODO if bean.isRegistered()) { int col = 0; *************** *** 195,215 **** String attributeName = (String) iterator1.next(); ! AttributeNode node = (AttributeNode) attributeNodeMap.get(attributeName); Object value = null; ! if (node != null) { ! value = node.getValue(); } else { ! value = beanNode.getObjectName().getKeyProperty(attributeName); if (value == null) { // Treat it like an operation. ! OperationNode operationNode = ! (OperationNode) beanNode.getOperationNodeMap().get(attributeName); ! value = operationNode; - /*if (!(table.getColumnModel().getColumn(col).getCellRenderer() instanceof ButtonRenderer)) { - table.getColumnExt(col).setCellRenderer(new ButtonRenderer()); - table.getColumnExt(col).setCellEditor(new ButtonEditor(new JCheckBox())); - }*/ } else if (value == null) --- 158,177 ---- String attributeName = (String) iterator1.next(); ! EmsAttribute attribute = bean.getAttribute(attributeName); Object value = null; ! if (attribute != null) { ! value = attribute.refresh(); } else { ! value = bean.getBeanName().getKeyProperty(attributeName); if (value == null) { // Treat it like an operation. ! EmsOperation operation = bean.getOperation(attributeName); + try { + value = operation.invoke(); + } catch (Exception e) { + e.printStackTrace(); + } } else if (value == null) *************** *** 232,236 **** // the MBean of the current node is not any longer registered inside the MBeanServer -> remove it from the list this.tableModel.removeRow(row); ! iterator.remove(); } } --- 194,198 ---- // the MBean of the current node is not any longer registered inside the MBeanServer -> remove it from the list this.tableModel.removeRow(row); ! beanList.remove(bean); } } *************** *** 349,369 **** } ! public void setBeanList(List list) { ! this.mbeanNodes = list; ! ! if (!list.isEmpty()) { ! // this assumes that all mbean are from the same connection ! connectionNode = ((MBeanNode) list.get(0)).getConnectionNode(); ! } } public void setContext(Map context) { ! if (this.mbeanNodes == null) { throw new IllegalStateException("AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } - dashboard = (Dashboard) context.get(Dashboard.CONTEXT_DASHBOARD); - init(); } --- 311,324 ---- } ! public void setBeanList(List<EmsBean> beans) { ! this.beanList = beans; } public void setContext(Map context) { ! if (this.beanList == null) { throw new IllegalStateException("AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } init(); } *************** *** 386,478 **** this.label = label; } - - - public static class SortHeaderRenderer - extends DefaultTableCellRenderer { - - private static Icon ascendingIcon = createImageIcon("images/Up.gif"); - private static Icon descendingIcon = createImageIcon("images/Down.gif"); - - - /** - * Returns an ImageIcon, or null if the path was invalid. - */ - protected static ImageIcon createImageIcon(String path) { - java.net.URL imgURL = RefreshControlComponent.class.getClassLoader().getResource(path); - if (imgURL != null) { - return new ImageIcon(imgURL); - } else { - System.err.println("Couldn't find file: " + path); - return null; - } - } - - public SortHeaderRenderer() { - setHorizontalTextPosition(LEFT); - setHorizontalAlignment(CENTER); - } - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, - int row, int col) { - int index = -1; - boolean ascending = true; - - TableModel model = table.getModel(); - - if (model instanceof TableSorter) { - index = ((TableSorter) model).getCurrentSortColumn(); - ascending = ((TableSorter) model).isAscending(); - } - - if (table != null) { - JTableHeader header = table.getTableHeader(); - if (header != null) { - setForeground(header.getForeground()); - setBackground(header.getBackground()); - setFont(header.getFont()); - } - } - - setFont(getFont().deriveFont((index == col) ? Font.BOLD : Font.PLAIN)); - if (index == col) { - setIcon(ascending ? ascendingIcon : descendingIcon); - } else { - setIcon(null); - } - setText((value == null) ? "" : value.toString()); - setBorder(UIManager.getBorder("TableHeader.cellBorder")); - return this; - } - } - - - public static class ChangeRenderer extends DefaultTableCellRenderer - implements TableCellRenderer { - - public Component getTableCellRendererComponent(JTable table, Object value, - boolean isSelected, boolean hasFocus, - int row, int column) { - - Component comp = - super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - - TableModel model = table.getModel(); - if (model instanceof TableSorter) { - int realRow = ((TableSorter) model).translateRow(row); - model = ((TableMap) model).getModel(); - if (model instanceof AttributeTableModel) { - if (((AttributeTableModel) model).isValueAtChanged(realRow, column)) { - comp.setForeground(Color.red); - setFont(getFont().deriveFont(Font.BOLD)); - } else { - comp.setForeground(Color.black); - setFont(getFont().deriveFont(Font.PLAIN)); - } - } - } - return comp; - } - } - } --- 341,343 ---- Index: NumericAttributeMeter.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/NumericAttributeMeter.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NumericAttributeMeter.java 5 Oct 2004 05:16:00 -0000 1.11 --- NumericAttributeMeter.java 12 Apr 2006 19:13:59 -0000 1.12 *************** *** 17,31 **** package org.mc4j.console.dashboard.components; - import java.awt.BorderLayout; - import java.util.Map; - - import javax.management.MBeanServer; - import javax.management.ObjectName; - - import org.openide.windows.TopComponent; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.dashboard.DashboardComponent; import org.mc4j.console.swing.graph.MeterCanvas; /** --- 17,28 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.swing.graph.MeterCanvas; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; + import org.openide.windows.TopComponent; + + import java.awt.BorderLayout; + import java.util.Map; /** *************** *** 36,43 **** public class NumericAttributeMeter extends TopComponent implements Runnable, BeanComponent { ! private MBeanServer server; ! private ObjectName objectName; ! ! private MBeanNode beanNode; private String currentAttributeName; --- 33,38 ---- public class NumericAttributeMeter extends TopComponent implements Runnable, BeanComponent { ! private EmsBean emsBean; ! private EmsAttribute maxAttribute, currentAttribute; private String currentAttributeName; *************** *** 76,80 **** int max; if (this.maxAttributeName != null) { ! Number maxNumber = (Number) this.server.getAttribute(this.objectName,this.maxAttributeName); max = maxNumber.intValue(); } else { --- 71,75 ---- int max; if (this.maxAttributeName != null) { ! Number maxNumber = (Number) this.maxAttribute.getValue(); max = maxNumber.intValue(); } else { *************** *** 82,86 **** } ! Number current = (Number) this.server.getAttribute(this.objectName,this.currentAttributeName); this.meter.setMax(max); --- 77,81 ---- } ! Number current = (Number) this.currentAttribute.getValue(); this.meter.setMax(max); *************** *** 98,113 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; } public void setContext(Map context) { ! if (this.beanNode == null) { throw new IllegalStateException( ! "NumericAttributeMeter: context atribute [beanNode] not set."); } ! this.server = this.beanNode.getMBeanServer(); ! this.objectName = this.beanNode.getObjectName(); Thread updater = new Thread(this, "mc4j NumericAttributeMeter Updater"); --- 93,111 ---- } ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; } public void setContext(Map context) { ! if (this.emsBean == null) { throw new IllegalStateException( ! "NumericAttributeMeter: context atribute [bean] not set."); } ! if (this.maxAttributeName != null) ! this.maxAttribute = this.emsBean.getAttribute(this.maxAttributeName); ! ! this.currentAttribute = this.emsBean.getAttribute(currentAttributeName); ! Thread updater = new Thread(this, "mc4j NumericAttributeMeter Updater"); Index: OperationListComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/OperationListComponent.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OperationListComponent.java 5 Oct 2004 05:16:00 -0000 1.8 --- OperationListComponent.java 12 Apr 2006 19:13:59 -0000 1.9 *************** *** 17,20 **** --- 17,26 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.console.bean.operation.OperationExecuteNodeAction; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.operation.EmsOperation; + import org.openide.util.actions.SystemAction; + + import javax.swing.*; import java.awt.Font; import java.awt.GridBagConstraints; *************** *** 23,51 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.HashSet; ! import java.util.Iterator; import java.util.Map; import java.util.Set; - import javax.management.MBeanOperationInfo; - import javax.management.MalformedObjectNameException; - import javax.management.ObjectName; - import javax.swing.JButton; - import javax.swing.JLabel; - import javax.swing.JPanel; - - import org.openide.ErrorManager; - import org.openide.nodes.Node; - import org.openide.util.actions.SystemAction; - - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.operation.OperationExecuteNodeAction; - import org.mc4j.console.bean.operation.OperationNode; - import org.mc4j.console.connection.ConnectionNode; - import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardComponent; - /** - * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) --- 29,37 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; /** * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) *************** *** 55,96 **** public static final int BUTTON_ONLY_FORMAT = 1; public static final int FULL_FORMAT = 2; ! private static final Font NAME_FONT = Font.decode("Arial-BOLD-12"); private static final Font DETAILS_FONT = Font.decode("Arial-PLAIN-10"); /** * The set of operations to be displayed */ ! private Set operationNames = new HashSet(); ! ! private MBeanNode beanNode; ! private int format = FULL_FORMAT; ! private ObjectName objectName; ! public void setOperationName(String name) { ! this.operationNames.add(name); ! } ! ! public String getAttributeName() { ! return "multi-value set"; } ! public void setObjectName(String objectName) { ! try { ! this.objectName = new ObjectName(objectName); ! } catch (MalformedObjectNameException mone) { ! ErrorManager.getDefault().notify(mone); ! } } ! public void refresh() { ! this.removeAll(); ! this.setMinimumSize(null); this.setPreferredSize(null); --- 41,75 ---- public static final int BUTTON_ONLY_FORMAT = 1; public static final int FULL_FORMAT = 2; ! private static final Font NAME_FONT = Font.decode("Arial-BOLD-12"); private static final Font DETAILS_FONT = Font.decode("Arial-PLAIN-10"); + private EmsBean emsBean; /** * The set of operations to be displayed */ ! private Set<EmsOperation> operations = new LinkedHashSet<EmsOperation>(); ! private int format = FULL_FORMAT; ! public void setBean(EmsBean bean) { ! this.emsBean = bean; ! } ! public void setOperation(EmsOperation name) { ! this.operations.add(name); } ! public void refresh() { } ! ! public void setContext(Map context) { ! this.removeAll(); ! this.setMinimumSize(null); this.setPreferredSize(null); *************** *** 98,201 **** this.setLayout(new GridBagLayout()); this.setOpaque(false); ! ! Set operSet = this.beanNode.getOperationNodeMap().entrySet(); ! Iterator operIter = operSet.iterator(); int row = 1; ! while (operIter.hasNext()) { ! Map.Entry entry = (Map.Entry) operIter.next(); ! ! String operName = (String) entry.getKey(); ! if ((this.operationNames.size() == 0) || (this.operationNames.contains(operName))) { ! final OperationNode operationNode = (OperationNode) entry.getValue(); ! ! final MBeanOperationInfo operationInfo = operationNode.getOperationInfo(); ! ! JButton executeButton = new JButton( ! (this.format == BUTTON_ONLY_FORMAT)?operationInfo.getName():"Execute..."); ! ! executeButton.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! executeOperation(operationNode); ! } ! }); ! ! switch (this.format) { ! case BUTTON_ONLY_FORMAT: ! ! ! GridBagConstraints bc = new GridBagConstraints(); ! bc.gridx = 1; ! bc.gridy = row; ! bc.weightx = 0.5; ! bc.anchor = bc.WEST; ! bc.insets = new Insets(5,5,5,5); ! add(executeButton, bc); ! ! break; ! case FULL_FORMAT: ! ! // Add the Name label ! JLabel nameLabel = new JLabel(operationInfo.getName()); ! nameLabel.setFont(NAME_FONT); ! nameLabel.setToolTipText(operationInfo.getDescription()); - GridBagConstraints nc = new GridBagConstraints(); - nc.gridx = 1; - nc.gridy = row * 2; - nc.weightx = 0.5; - nc.anchor = nc.WEST; - nc.fill = nc.BOTH; - nc.insets = new Insets(2,2,2,2); - add(nameLabel, nc); ! // Add the execute button ! GridBagConstraints executeButtonConstraints = new GridBagConstraints( ! 2, (row * 2), ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2,2,2,2), ! 0, 0); ! ! add(executeButton, executeButtonConstraints); ! ! // Add the description Label ! JLabel descLabel = new JLabel("Description: " + operationInfo.getDescription()); ! descLabel.setFont(DETAILS_FONT); ! ! GridBagConstraints descConstraints = new GridBagConstraints( ! 1, (row * 2) + 1, ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2,2,2,2), ! 0, 0); ! add(descLabel, descConstraints); ! ! break; ! } ! ! ! ! row++; } } ! this.doLayout(); this.repaint(); } ! public void executeOperation(final OperationNode node) { ! final OperationExecuteNodeAction action = (OperationExecuteNodeAction) SystemAction.get(OperationExecuteNodeAction.class); ! Thread executor = new Thread(new Runnable() { public void run() { ! action.performAction(new Node[] { node }); } }, "mc4j Operation Execution"); --- 77,175 ---- this.setLayout(new GridBagLayout()); this.setOpaque(false); ! ! if (emsBean != null) { ! // Show all the operations for a bean ! for (final EmsOperation operation : this.emsBean.getOperations()) { ! this.operations.add(operation); ! } ! } ! int row = 1; ! for (final EmsOperation operation : this.operations) { ! JButton executeButton = new JButton( ! (this.format == BUTTON_ONLY_FORMAT) ? operation.getName() : "Execute..."); ! executeButton.setToolTipText(operation.getDescription()); ! executeButton.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! executeOperation(operation); ! } ! }); ! switch (this.format) { ! case BUTTON_ONLY_FORMAT: ! GridBagConstraints bc = new GridBagConstraints(); ! bc.gridx = 1; ! bc.gridy = row; ! bc.weightx = 0.5; ! bc.anchor = bc.WEST; ! bc.insets = new Insets(5, 5, 5, 5); ! ! add(executeButton, bc); ! ! break; ! case FULL_FORMAT: ! ! // Add the Name label ! JLabel nameLabel = new JLabel(operation.getName()); ! nameLabel.setFont(NAME_FONT); ! nameLabel.setToolTipText(operation.getDescription()); ! ! GridBagConstraints nc = new GridBagConstraints(); ! nc.gridx = 1; ! nc.gridy = row * 2; ! nc.weightx = 0.5; ! nc.anchor = nc.WEST; ! nc.fill = nc.BOTH; ! nc.insets = new Insets(2, 2, 2, 2); ! add(nameLabel, nc); ! ! // Add the execute button ! GridBagConstraints executeButtonConstraints = new GridBagConstraints( ! 2, (row * 2), ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2, 2, 2, 2), ! 0, 0); ! ! add(executeButton, executeButtonConstraints); ! ! // Add the description Label ! JLabel descLabel = new JLabel("Description: " + operation.getDescription()); ! descLabel.setFont(DETAILS_FONT); ! ! GridBagConstraints descConstraints = new GridBagConstraints( ! 1, (row * 2) + 1, ! 1, 1, ! 0.5d, 0d, ! GridBagConstraints.EAST, ! GridBagConstraints.BOTH, ! new Insets(2, 2, 2, 2), ! 0, 0); ! add(descLabel, descConstraints); ! ! break; } + + row++; } ! this.doLayout(); this.repaint(); } ! public void executeOperation(final EmsOperation operation) { ! final OperationExecuteNodeAction action = ! (OperationExecuteNodeAction) SystemAction.get(OperationExecuteNodeAction.class); ! Thread executor = new Thread(new Runnable() { public void run() { ! action.performAction(operation); } }, "mc4j Operation Execution"); *************** *** 203,234 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; ! } ! ! public void setContext(Map context) { ! if (this.beanNode == null) { ! throw new IllegalStateException( ! "OperationListComponent: context atribute [beanNode] not set."); ! } ! refresh(); ! } ! ! ! /** Getter for property format. ! * @return Value of property format. * */ public int getFormat() { return format; } ! ! /** Setter for property format. ! * @param format New value of property format. * */ public void setFormat(int format) { this.format = format; } ! } --- 177,197 ---- } ! /** ! * Getter for property format. * + * @return Value of property format. */ public int getFormat() { return format; } ! ! /** ! * Setter for property format. * + * @param format New value of property format. */ public void setFormat(int format) { this.format = format; } ! } Index: TimeLabelComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/TimeLabelComponent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TimeLabelComponent.java 13 Oct 2004 04:59:36 -0000 1.1 --- TimeLabelComponent.java 12 Apr 2006 19:13:59 -0000 1.2 *************** *** 17,22 **** package org.mc4j.console.dashboard.components; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; import java.util.Map; --- 17,22 ---- package org.mc4j.console.dashboard.components; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import java.util.Map; *************** *** 33,42 **** public class TimeLabelComponent extends JLabel implements BeanComponent { ! private MBeanNode beanNode; private String attributeName; ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; } --- 33,42 ---- public class TimeLabelComponent extends JLabel implements BeanComponent { ! private EmsBean emsBean; private String attributeName; ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; } *************** *** 54,60 **** public void refresh() { ! AttributeNode attributeNode = (AttributeNode) beanNode.getAttributeNodeMap().get(attributeName); ! attributeNode.refresh(); ! Object valueObject = attributeNode.getValue(); Number number = (Number) valueObject; --- 54,60 ---- public void refresh() { ! EmsAttribute emsAttribute = emsBean.getAttribute(attributeName); ! emsAttribute.refresh(); ! Object valueObject = emsAttribute.getValue(); Number number = (Number) valueObject; *************** *** 65,72 **** cal.get(Calendar.YEAR); - - - } - } --- 65,68 ---- Index: RefreshControlComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/RefreshControlComponent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RefreshControlComponent.java 5 Oct 2004 05:16:00 -0000 1.5 --- RefreshControlComponent.java 12 Apr 2006 19:13:59 -0000 1.6 *************** *** 17,20 **** --- 17,28 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.console.Refreshable; + import org.mc4j.console.dashboard.Dashboard; + import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.console.dashboard.match.BeanMatch; + import org.mc4j.ems.connection.bean.EmsBean; + + import javax.swing.*; + import java.awt.Color; import java.awt.Component; import java.awt.Container; *************** *** 25,39 **** import java.util.TimerTask; - import javax.swing.ImageIcon; - import javax.swing.JFrame; - import javax.swing.JLabel; - import javax.swing.JPanel; - import javax.swing.JOptionPane; - import javax.swing.JDialog; - - import org.mc4j.console.Refreshable; - import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardComponent; - /** * --- 33,36 ---- *************** *** 51,57 **** private Timer timer; private Container rootContainer; ! private long refreshDelay = 1000; private boolean removed = false; --- 48,55 ---- private Timer timer; + private Dashboard dashboard; private Container rootContainer; ! private long refreshDelay = 5000; private boolean removed = false; *************** *** 66,71 **** private void init() { ! this.spinningIcon = createImageIcon("images/AnimatedLogo.gif","Click to stop"); ! this.stoppedIcon = createImageIcon("images/Logo1.gif", "Click to start"); this.spinningLogo = new JLabel(this.spinningIcon); this.spinningLogo.setToolTipText("Click to stop refreshes. " + --- 64,69 ---- private void init() { ! this.spinningIcon = createImageIcon("images/AnimatedLogoMC4J2_64.gif" /*"images/AnimatedLogo.gif"*/,"Click to stop"); ! this.stoppedIcon = createImageIcon("images/AnimatedLogoStoppedMC4J2_64.gif", "Click to start"); this.spinningLogo = new JLabel(this.spinningIcon); this.spinningLogo.setToolTipText("Click to stop refreshes. " + *************** *** 73,78 **** //icon.setImageObserver(label); add(this.spinningLogo); ! this.spinningLogo.setSize(72,72); ! setSize(72,72); doLayout(); --- 71,77 ---- //icon.setImageObserver(label); add(this.spinningLogo); ! this.spinningLogo.setSize(64,38); ! ! setSize(64,38); doLayout(); *************** *** 159,162 **** --- 158,163 ---- public void setContext(Map context) { + this.dashboard = (Dashboard) context.get(Dashboard.CONTEXT_DASHBOARD); + this.rootContainer = (Container) context.get(Dashboard.CONTEXT_DASHBOARD_ROOT_CONTAINER); *************** *** 168,171 **** --- 169,173 ---- private void refreshContainer(Container container) { + for (int i = 0; i < container.getComponents().length; i++) { Component component = container.getComponents()[i]; *************** *** 181,184 **** --- 183,201 ---- public void refresh() { + // Refresh the beans attached to this dashboard + if (dashboard.isAutoBeanRefresh()) { + + for (BeanMatch match : dashboard.getDashboardMatch().getBeanMatchList()) { + for (EmsBean bean : match.getMatchedBeans()) { + // Currently refreshing all attributes... may be slower for beans + // with large numbers of attributes that aren't all being displayed + long start = System.currentTimeMillis(); + bean.refreshAttributes(); + //System.out.println((System.currentTimeMillis() - start) + "ms to refresh " + bean.getBeanName().toString()); + } + } + } + + // Now refresh the components on the dashboard giving them a chance to use the data refreshContainer(this.rootContainer); } *************** *** 194,197 **** --- 211,215 ---- public static void main(String[] args) { JFrame frame = new JFrame(); + frame.setBackground(Color.gray); frame.getContentPane().add(new RefreshControlComponent()); Index: AttributeTablePopupComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTablePopupComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AttributeTablePopupComponent.java 14 Mar 2005 16:05:38 -0000 1.4 --- AttributeTablePopupComponent.java 12 Apr 2006 19:13:59 -0000 1.5 *************** *** 17,33 **** package org.mc4j.console.dashboard.components; - import org.openide.util.HelpCtx; - import org.openide.util.actions.SystemAction; - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.bean.OperationListAction; ! import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; - import javax.swing.JPopupMenu; - /** * This extension of the AttributeTableComponent offers a popup menu to execute operations --- 17,31 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.bean.OperationListAction; + import org.openide.util.HelpCtx; + import org.openide.util.actions.SystemAction; ! import javax.swing.*; ! import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * This extension of the AttributeTableComponent offers a popup menu to execute operations *************** *** 45,49 **** /* (non-Javadoc) * @see org.mc4j.console.dashboard.components.AttributeTableComponent#init() ! */ public void init() { super.init(); --- 43,47 ---- /* (non-Javadoc) * @see org.mc4j.console.dashboard.components.AttributeTableComponent#init() ! */ public void init() { super.init(); *************** *** 83,87 **** selectedRow = AttributeTablePopupComponent.this.table.convertRowIndexToModel(selectedRow); ! MBeanNode mbeanNode = (MBeanNode) AttributeTablePopupComponent.this.mbeanNodes.get(selectedRow); JPopupMenu popupMenu = new JPopupMenu(); --- 81,85 ---- selectedRow = AttributeTablePopupComponent.this.table.convertRowIndexToModel(selectedRow); ! MBeanNode mbeanNode = (MBeanNode) AttributeTablePopupComponent.this.beanList.get(selectedRow); JPopupMenu popupMenu = new JPopupMenu(); *************** *** 104,108 **** public void actionPerformed(ActionEvent ev) { ! bean.getConnectionNode().browseToMBean(bean.getObjectName()); } --- 102,106 ---- public void actionPerformed(ActionEvent ev) { ! bean.getConnectionNode().browseToMBean(bean.getEmsBean().getBeanName().getCanonicalName()); } --- NEW FILE: TabularDataComponent.java --- /* * Copyright 2002-2005 Greg Hinkle * * Licensed 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. */ package org.mc4j.console.dashboard.components; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.decorator.AlternateRowHighlighter; import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.decorator.HighlighterPipeline; import org.mc4j.ems.connection.bean.EmsBean; import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.management.openmbean.CompositeData; import javax.management.openmbean.CompositeType; import javax.management.openmbean.TabularData; import javax.swing.*; import javax.swing.table.DefaultTableModel; import java.awt.BorderLayout; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * @author Greg Hinkle (gh...@us...), Dec 20, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:13:59 $) */ public class TabularDataComponent extends JPanel implements BeanComponent { EmsBean bean; JXTable table; String attributeName; EmsAttribute attribute; TabularDataTableModel model; private boolean refreshable = true; private boolean scrollable = true; public void setBean(EmsBean emsBean) { this.bean = emsBean; } public void setAttributeName(String attributeName) { this.attributeName = attributeName; } public void setContext(Map context) { attribute = bean.getAttribute(attributeName); init(); } public boolean isRefreshable() { return refreshable; } public void setRefreshable(boolean refreshable) { this.refreshable = refreshable; } public boolean isScrollable() { return scrollable; } public void setScrollable(boolean scrollable) { this.scrollable = scrollable; } public void init() { table = new JXTable(); table.setColumnControlVisible(true); this.table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter()})); setLayout(new BorderLayout()); if (isScrollable()) add(new JScrollPane(table), BorderLayout.CENTER); else add(table,BorderLayout.CENTER); } public void refresh() { if (model != null && !isRefreshable()) return; TabularData d = (TabularData) attribute.refresh(); if (d != null) { if (model == null) { model = new TabularDataTableModel(d); model.setData((TabularData) attribute.refresh()); table.setModel(model); } else { model.setData((TabularData) attribute.refresh()); } } } public static class TabularDataTableModel extends DefaultTableModel { TabularData data; List<CompositeData> values; List<Object> columnKeys; public TabularDataTableModel(TabularData data) { this.data = data; CompositeType rowType = data.getTabularType().getRowType(); setColumnCount(rowType.keySet().size() + 1); //setColumnMetaData(0,new MetaData("index",String.class,"Index")); int n = 1; for (Object cn : rowType.keySet()) { String columnName = (String) cn; String className = rowType.getType(columnName).getClassName(); Class type = null; try { type = Class.forName(className); } catch (ClassNotFoundException e) { } //MetaData metaData = new MetaData(columnName, type == null ? String.class : type, rowType.getDescription(columnName)); //setColumnMetaData(n++, metaData); } setData(data); } public void setData(TabularData data) { this.data = data; //noinspection unchecked this.values = new ArrayList<CompositeData>(this.data.values()); this.columnKeys = new ArrayList<Object>(this.data.getTabularType().getRowType().keySet()); fireTableDataChanged(); } public int getRowCount() { return data == null ? 0 : data.size(); } public Object getValueAt(int row, int col) { return values.get(row).get(String.valueOf(columnKeys.get(col))); } public int getColumnCount() { return (columnKeys == null) ? 0 : columnKeys.size(); } public String getColumnName(int column) { return (columnKeys == null) ? "" : String.valueOf(columnKeys.get(column)); } public boolean isCellEditable(int i, int i1) { return false; } } } Index: BeanListComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/BeanListComponent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanListComponent.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanListComponent.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,23 **** package org.mc4j.console.dashboard.components; - import java.util.List; - import org.mc4j.console.dashboard.DashboardComponent; /** --- 17,24 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.ems.connection.bean.EmsBean; + + import java.util.List; /** *************** *** 36,39 **** * @param beanList */ ! void setBeanList(List beanList); } --- 37,40 ---- * @param beanList */ ! void setBeanList(List<EmsBean> beanList); } Index: BeanComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/BeanComponent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanComponent.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanComponent.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,22 **** package org.mc4j.console.dashboard.components; - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.DashboardComponent; /** --- 17,22 ---- package org.mc4j.console.dashboard.components; import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 30,33 **** public interface BeanComponent extends DashboardComponent { ! void setBeanNode(MBeanNode node); } --- 30,33 ---- public interface BeanComponent extends DashboardComponent { ! void setBean(EmsBean emsBean); } --- NEW FILE: ErrorComponent.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed 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. */ package org.mc4j.console.dashboard.components; import org.openide.ErrorManager; import javax.swing.*; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeEvent; /** * Created: Jun 24, 2005 2:04:35 PM * * @author Greg Hinkle (gh...@us...) * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:13:59 $) */ public class ErrorComponent extends JOptionPane { public ErrorComponent(final Exception e) { super("Error loading component: " + e.getMessage() , JOptionPane.ERROR_MESSAGE, JOptionPane.DEFAULT_OPTION, null, new String[] { "Display" }); addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { ErrorManager.getDefault().notify(ErrorManager.USER,e); } }); } } Index: ForEachPanelComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/ForEachPanelComponent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ForEachPanelComponent.java 5 Oct 2004 05:16:00 -0000 1.2 --- ForEachPanelComponent.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,25 **** package org.mc4j.console.dashboard.components; import java.util.List; import java.util.Map; - import javax.swing.JPanel; - /** * Supports a for-each iteration of a set of beans --- 17,26 ---- package org.mc4j.console.dashboard.components; + import org.mc4j.ems.connection.bean.EmsBean; + + import javax.swing.*; import java.util.List; import java.util.Map; /** * Supports a for-each iteration of a set of beans *************** *** 30,34 **** public class ForEachPanelComponent extends JPanel implements BeanListComponent { ! protected List mbeanNodes; protected String idKey; --- 31,35 ---- public class ForEachPanelComponent extends JPanel implements BeanListComponent { ! protected List<EmsBean> beanList; protected String idKey; *************** *** 36,39 **** --- 37,43 ---- protected boolean sorted = false; + public ForEachPanelComponent() { + + } public void init() { *************** *** 55,71 **** ! public void setBeanList(List list) { ! this.mbeanNodes = list; } ! public List getBeanList() { ! return mbeanNodes; } public void setContext(Map context) { ! if (this.mbeanNodes == null) { throw new IllegalStateException( ! "AttributeTableComponent: You must specify an appropriate [beanList] attribute."); } init(); --- 59,75 ---- ! public void setBeanList(List<EmsBean> list) { ! this.beanList = list; } ! public List<EmsBean> getBeanList() { ! return beanList; } public void setContext(Map context) { ! if (this.beanList == null) { throw new IllegalStateException( ! "ForEachPanelComponent: You must specify an appropriate [beanList] attribute."); } init(); Index: AttributeTreeTableExplorer.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/AttributeTreeTableExplorer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AttributeTreeTableExplorer.java 5 Oct 2004 05:16:00 -0000 1.4 --- AttributeTreeTableExplorer.java 12 Apr 2006 19:13:59 -0000 1.5 *************** *** 17,21 **** package org.mc4j.console.dashboard.components; ! import org.mc4j.console.bean.MBeanNode; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; --- 17,21 ---- package org.mc4j.console.dashboard.components; ! import org.mc4j.ems.connection.bean.EmsBean; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; *************** *** 44,48 **** private Lookup lookup; ! private MBeanNode beanNode; private TreeTableView treeView; --- 44,48 ---- private Lookup lookup; ! private EmsBean emsBean; private TreeTableView treeView; *************** *** 111,123 **** } ! public void setBeanNode(MBeanNode node) { ! this.beanNode = node; } public void setContext(Map context) { ! if (this.beanNode == null) { throw new IllegalStateException( ! "AttributeTreeTableExplorer: context atribute [beanNode] not set."); } --- 111,123 ---- } ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; } public void setContext(Map context) { ! if (this.emsBean == null) { throw new IllegalStateException( ! "AttributeTreeTableExplorer: context atribute [bean] not set."); } *************** *** 166,187 **** ! this.manager.setRootContext(this.beanNode.getAttributesNode()); SwingUtilities.invokeLater(new Runnable() { public void run() { ! setDisplayName(AttributeTreeTableExplorer.this.beanNode.getName()); } }); // TODO GH: This is just a rough guestimate... can we determine font-heights or maximum node-line heights? ! int heightNeeded = (18 * this.beanNode.getAttributesNode().getChildren().getNodes().length) + 50; ! setPreferredSize(new Dimension(getWidth(), heightNeeded)); ! setMaximumSize(new Dimension(Integer.MAX_VALUE, heightNeeded)); } public void refresh() { ! this.beanNode.retrieveData(); } --- 166,187 ---- ! // this.manager.setRootContext(this.emsBean.getAttributesNode()); SwingUtilities.invokeLater(new Runnable() { public void run() { ! // setDisplayName(AttributeTreeTableExplorer.this.emsBean.getName()); } }); // TODO GH: This is just a rough guestimate... can we determine font-heights or maximum node-line heights? ! // int heightNeeded = (18 * this.emsBean.getAttributesNode().getChildren().getNodes().length) + 50; ! // setPreferredSize(new Dimension(getWidth(), heightNeeded)); ! // setMaximumSize(new Dimension(Integer.MAX_VALUE, heightNeeded)); } public void refresh() { ! // this.emsBean.retrieveData(); } Index: NumericAttributeGraph.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/NumericAttributeGraph.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NumericAttributeGraph.java 5 Oct 2004 05:16:00 -0000 1.13 --- NumericAttributeGraph.java 12 Apr 2006 19:13:59 -0000 1.14 *************** *** 17,34 **** package org.mc4j.console.dashboard.components; ! import java.util.ArrayList; ! import java.util.HashSet; ! import java.util.List; import java.util.Map; import java.util.Set; - import javax.management.MBeanAttributeInfo; - import javax.management.MBeanServer; - import javax.management.ObjectName; - - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.dashboard.DashboardComponent; - /** * --- 17,27 ---- package org.mc4j.console.dashboard.components; ! import org.mc4j.console.dashboard.DashboardComponent; ! import org.mc4j.console.swing.graph.AttributeGraphPanel; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; ! import java.util.Map; import java.util.Set; /** * *************** *** 36,52 **** * @version $Revision$($Author$ / $Date$) */ ! public class NumericAttributeGraph extends AttributeGraphPanel implements BeanComponent { ! ! protected Set attributeSet = new HashSet(); ! ! protected MBeanNode node; ! ! /* ! public void componentClosed() { ! this.dataGenerator.stop(); ! super.componentClosed(); ! } ! */ ! /** --- 29,33 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NumericAttributeGraph extends AttributeGraphPanel implements DashboardComponent { /** *************** *** 57,61 **** return sleepSlider.getValue(); } - /** * Setter for property updateInterval. --- 38,41 ---- *************** *** 66,126 **** } ! ! ! ! /** ! * Getter for property currentAttributeName. ! * @return Value of property currentAttributeName. ! */ ! public java.lang.String getAttributeName() { ! return "Multivalue attribute"; ! } ! ! ! /** ! * Setter for property currentAttributeName. ! * @param attributeName New value of property currentAttributeName. ! */ ! public void setAttributeName(java.lang.String attributeName) { ! this.attributeSet.add(attributeName); ! } ! ! public void refresh() { } ! public void setBeanNode(MBeanNode mBeanNode) { ! this.node = mBeanNode; } - public void setContext(Map context) { - if (node == null) { - throw new IllegalStateException( - "NumericAttributeGraph: context atribute [beanNode] not set."); - } ! ObjectName objectName = node.getObjectName(); ! MBeanAttributeInfo[] completeAttributeInfo = node.getMBeanInfo().getAttributes(); ! MBeanServer server = node.getMBeanServer(); - - this.objectName = objectName; - this.server = server; - List attList = new ArrayList(); - for (int i = 0; i < completeAttributeInfo.length; i++) { - if (this.attributeSet.contains(completeAttributeInfo[i].getName())) { - attList.add(completeAttributeInfo[i]); - createTimeSeries(completeAttributeInfo[i].getName(), completeAttributeInfo[i]); - } - } ! this.attributeInfo = (MBeanAttributeInfo[]) attLi... [truncated message content] |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:34
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/chires In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/chires Modified Files: Chires_JDBCQueryStats.xml Chires_Profiler.xml Log Message: Merging EMS into head for the 2.0 release work Index: Chires_JDBCQueryStats.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/chires/Chires_JDBCQueryStats.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Chires_JDBCQueryStats.xml 19 Jan 2005 14:17:02 -0000 1.2 --- Chires_JDBCQueryStats.xml 12 Apr 2006 19:13:57 -0000 1.3 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="JDBC Queries"> <Description>This dashboard shows the statistics of JDBC calls through connection to Chires.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JDBC Queries" standardHeader="true" refreshControl="true"> <Description>This dashboard shows the statistics of JDBC calls through connection to Chires.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Chires/JDBC"> <BeanMatch id="JDBCModel" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Chires.*type=JDBCModel.*"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Chires/JDBC"> <BeanMatch id="JDBCModel" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Chires.*type=JDBCModel.*"/> </BeanMatch> </DashboardMatch> *************** *** 15,57 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> - <Constraint type="BorderConstraints" direction="EAST"/> - <Attribute name="refreshDelay" value="(Literal)5000"/> - </Component> - </Content> - </Component> <Component type="org.mc4j.chires.components.JDBCQueryTableComponent"> ! <Attribute name="beanNode" value="JDBCModel"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> --- 15,26 ---- <Content> <Component type="org.mc4j.chires.components.JDBCQueryTableComponent"> ! <Attribute name="bean" value="#JDBCModel"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> Index: Chires_Profiler.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/chires/Chires_Profiler.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Chires_Profiler.xml 19 Jan 2005 14:17:02 -0000 1.1 --- Chires_Profiler.xml 12 Apr 2006 19:13:57 -0000 1.2 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="Chires Profiler"> <Description>The Chires Profiler view.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Chires Profiler" standardHeader="true" refreshControl="true"> <Description>The Chires Profiler view.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Chires/Profile"> <BeanMatch id="FlowModel" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Chires.*type=FlowModel.*"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Chires/Profile"> <BeanMatch id="FlowModel" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Chires.*type=FlowModel.*"/> </BeanMatch> </DashboardMatch> *************** *** 15,57 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> - <Constraint type="BorderConstraints" direction="EAST"/> - <Attribute name="refreshDelay" value="(Literal)5000"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.chires.components.flow.ProfilerViewComponent"> ! <Attribute name="beanNode" value="FlowModel"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> </Component> --- 15,25 ---- <Content> <Component type="org.mc4j.chires.components.flow.ProfilerViewComponent"> ! <Attribute name="bean" value="#FlowModel"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> </Component> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:30
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/attribute Modified Files: AttributeSetNode.java AttributeNode.java GraphAttributesAction.java AttributePropertyFactory.java AttributeSetChildren.java BrowseToAction.java Added Files: AttributeChildNode.java AttributeChildren.java Removed Files: AttributeGraphPanel.java AttributeNameComparator.java Log Message: Merging EMS into head for the 2.0 release work Index: AttributeSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetChildren.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AttributeSetChildren.java 5 Oct 2004 05:15:56 -0000 1.7 --- AttributeSetChildren.java 12 Apr 2006 19:13:54 -0000 1.8 *************** *** 17,23 **** package org.mc4j.console.bean.attribute; import org.openide.nodes.Children; ! import org.mc4j.console.bean.MBeanNode; /** --- 17,26 ---- package org.mc4j.console.bean.attribute; + import org.mc4j.ems.connection.bean.EmsBean; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Children; + import org.openide.nodes.Node; ! import java.util.SortedSet; /** *************** *** 29,36 **** public class AttributeSetChildren extends Children.SortedArray { ! protected MBeanNode mbeanNode; ! public AttributeSetChildren(MBeanNode mbeanNode) { ! this.mbeanNode = mbeanNode; } --- 32,39 ---- public class AttributeSetChildren extends Children.SortedArray { ! protected EmsBean emsBean; ! public AttributeSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } *************** *** 38,51 **** super.addNotify(); - Thread thread = - new Thread( - new Runnable() { - public void run() { - mbeanNode.refresh(); - } - }, - "mc4j AttributeSetChildren Loader"); ! thread.start(); } } --- 41,54 ---- super.addNotify(); ! SortedSet<EmsAttribute> attributes = emsBean.getAttributes(); ! Node[] newNodes = new Node[attributes.size()]; ! int i = 0; ! for (EmsAttribute attribute : attributes) { ! ! AttributeNode node = new AttributeNode(attribute); ! newNodes[i++] = node; ! } ! add(newNodes); } } Index: AttributePropertyFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributePropertyFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AttributePropertyFactory.java 5 Oct 2004 05:15:56 -0000 1.8 --- AttributePropertyFactory.java 12 Apr 2006 19:13:54 -0000 1.9 *************** *** 20,29 **** import org.mc4j.console.swing.editor.ArrayEditor; import org.mc4j.console.swing.editor.jmx.CompositeDataEditor; - import org.mc4j.console.swing.editor.jmx.ObjectNameEditor; import org.mc4j.console.swing.editor.jmx.TabularDataEditor; import org.openide.nodes.Node; - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; import java.beans.PropertyEditorManager; import java.lang.reflect.InvocationTargetException; --- 20,27 ---- import org.mc4j.console.swing.editor.ArrayEditor; import org.mc4j.console.swing.editor.jmx.CompositeDataEditor; import org.mc4j.console.swing.editor.jmx.TabularDataEditor; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import java.beans.PropertyEditorManager; import java.lang.reflect.InvocationTargetException; *************** *** 38,42 **** private AttributePropertyFactory() { ! PropertyEditorManager.registerEditor(ObjectName.class, ObjectNameEditor.class); try { --- 36,40 ---- private AttributePropertyFactory() { ! // PropertyEditorManager.registerEditor(ObjectName.class, ObjectNameEditor.class); try { *************** *** 61,82 **** } ! public Node.Property buildProperty(AttributeNode node) { ! ! MBeanAttributeInfo attributeInfo = node.getAttributeInfo(); Node.Property property = null; ! if (node.isCanDisplay()) { ! ! try { ! Class type = MBeanNode.findType(attributeInfo.getType()); ! property = new AttributeProperty(type, node); ! } catch (ClassNotFoundException cnfe) { ! //ErrorManager.getDefault().notify(cnfe); ! property = new AttributeProperty(node); ! } ! } else { ! property = new AttributeProperty(node); } --- 59,73 ---- } ! public Node.Property buildProperty(EmsAttribute emsAttribute) { Node.Property property = null; ! try { ! Class type = MBeanNode.findType(emsAttribute.getType()); ! property = new AttributeProperty(type, emsAttribute); ! } catch (ClassNotFoundException cnfe) { ! //ErrorManager.getDefault().notify(cnfe); ! property = new AttributeProperty(emsAttribute); } *************** *** 87,106 **** public static class AttributeProperty extends Node.Property { ! protected AttributeNode attributeNode; protected boolean unknownType = false; ! public AttributeProperty(Class type, AttributeNode attributeNode) { super(type); ! this.attributeNode = attributeNode; ! setName(this.attributeNode.getDisplayName()); ! setShortDescription(attributeNode.getAttributeInfo().getDescription() + ! " (" + attributeNode.getAttributeInfo().getType() + ")"); } ! public AttributeProperty(AttributeNode attributeNode) { ! this(String.class, attributeNode); unknownType = true; } --- 78,97 ---- public static class AttributeProperty extends Node.Property { ! protected EmsAttribute emsAttribute; protected boolean unknownType = false; ! public AttributeProperty(Class type, EmsAttribute emsAttribute) { super(type); ! this.emsAttribute = emsAttribute; ! setName(this.emsAttribute.getName()); ! setShortDescription(this.emsAttribute.getDescription() + ! " (" + this.emsAttribute.getType() + ")"); } ! public AttributeProperty(EmsAttribute emsAttribute) { ! this(String.class, emsAttribute); unknownType = true; } *************** *** 112,116 **** */ public boolean canRead() { ! return this.attributeNode.getAttributeInfo().isReadable(); } --- 103,107 ---- */ public boolean canRead() { ! return this.emsAttribute.isReadable(); } *************** *** 124,136 **** return false; ! return this.attributeNode.getAttributeInfo().isWritable(); } public Object getValue() throws IllegalAccessException, InvocationTargetException { ! if (this.attributeNode.isCanDisplay()) { ! return this.attributeNode.getValue(); ! } else { ! return "<cannot display>"; ! } } --- 115,123 ---- return false; ! return this.emsAttribute.isWritable(); } public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return this.emsAttribute.getValue(); } *************** *** 139,143 **** try { ! this.attributeNode.setValue(val); } catch(Exception e) { throw new InvocationTargetException(e); --- 126,130 ---- try { ! this.emsAttribute.setValue(val); } catch(Exception e) { throw new InvocationTargetException(e); Index: GraphAttributesAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/GraphAttributesAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GraphAttributesAction.java 5 Oct 2004 05:15:56 -0000 1.6 --- GraphAttributesAction.java 12 Apr 2006 19:13:54 -0000 1.7 *************** *** 17,40 **** package org.mc4j.console.bean.attribute; ! import java.awt.Color; ! import java.math.BigDecimal; ! import java.math.BigInteger; ! import java.util.HashSet; ! import java.util.Set; ! ! import javax.management.MBeanAttributeInfo; ! import javax.management.ObjectName; ! import javax.swing.SwingUtilities; ! import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import org.mc4j.console.bean.MBeanNode; /** ! * Action sensitive to the node selection that does something useful. ! * Consider using a cookie action instead if you can define what the ! * action is applicable to in terms of cookies. * * @author Greg Hinkle (gh...@us...), January 2002 --- 17,38 ---- package org.mc4j.console.bean.attribute; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.swing.graph.AttributeGraphPanel; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; ! import java.math.BigDecimal; ! import java.math.BigInteger; ! import java.util.ArrayList; ! import java.util.HashSet; ! import java.util.List; ! import java.util.Set; /** ! * * * @author Greg Hinkle (gh...@us...), January 2002 *************** *** 44,67 **** protected void performAction(Node[] nodes) { ! // do work based on the current node selection, e.g.: ! AttributeNode node = (AttributeNode)nodes[0]; ! // ... ! // Note that casting to a type of node is often not the right ! // solution; try using a CookieAction, unless it is really the ! // node itself and not the underlying data that needs to be ! // considered. Also remember that some tests on nodes (casts ! // as well as reorderability of children etc.) will not work ! // when applied to filter nodes, whereas cookies will. ! ! MBeanAttributeInfo[] infos = new MBeanAttributeInfo[nodes.length]; ! ! for (int i = 0; i < nodes.length; i++) { ! infos[i] = ((AttributeNode)nodes[i]).getAttributeInfo(); } ! ObjectName objectName = ((MBeanNode)nodes[0].getParentNode().getParentNode()).getObjectName(); ! ! final AttributeGraphPanel graphPanel = new AttributeGraphPanel( ! objectName, infos,((AttributeNode)nodes[0]).getServer()); graphPanel.setBackground(Color.WHITE); --- 42,51 ---- protected void performAction(Node[] nodes) { ! List<EmsAttribute> attributes = new ArrayList<EmsAttribute>(); ! for (Node node : nodes) { ! attributes.add(((AttributeNode)node).getEmsAttribute()); } ! final AttributeGraphPanel graphPanel = new AttributeGraphPanel(attributes); graphPanel.setBackground(Color.WHITE); *************** *** 82,86 **** } AttributeNode node = (AttributeNode) nodes[i]; ! String typeName = node.getAttributeInfo().getType(); Class type = null; try { --- 66,70 ---- } AttributeNode node = (AttributeNode) nodes[i]; ! String typeName = node.getEmsAttribute().getType(); Class type = null; try { *************** *** 124,138 **** public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; - // If you will provide context help then use: - // return new HelpCtx(GraphAttributesAction.class); } - /** Perform extra initialization of this action's singleton. - * PLEASE do not use constructors for this purpose! - * protected void initialize() { - * super.initialize(); - * putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(GraphAttributesAction.class, "HINT_Action")); - * } - */ - } --- 108,112 ---- --- AttributeNameComparator.java DELETED --- --- AttributeGraphPanel.java DELETED --- --- NEW FILE: AttributeChildren.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed 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. */ package org.mc4j.console.bean.attribute; import org.openide.nodes.Children; import org.mc4j.console.bean.MBeanNode; /** * Children set for attributes on an MBeanNode. * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:13:54 $) */ public class AttributeChildren extends Children.SortedArray { protected MBeanNode mbeanNode; public AttributeChildren(MBeanNode mbeanNode) { this.mbeanNode = mbeanNode; } protected void addNotify() { super.addNotify(); // TODO GH: Implement child collection entry loading // Thread thread = // new Thread( // new Runnable() { // public void run() { // mbeanNode.refresh(); // } // }, // "mc4j AttributeSetChildren Loader"); // // thread.start(); } } Index: BrowseToAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/BrowseToAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BrowseToAction.java 5 Oct 2004 05:15:56 -0000 1.3 --- BrowseToAction.java 12 Apr 2006 19:13:54 -0000 1.4 *************** *** 17,22 **** package org.mc4j.console.bean.attribute; - import javax.management.MBeanAttributeInfo; - import javax.management.ObjectName; import org.openide.nodes.Node; --- 17,20 ---- *************** *** 27,30 **** --- 25,30 ---- import org.mc4j.console.connection.ConnectionNode; + import javax.management.ObjectName; + /** * This action will browse the explorer tree to a managed object for a attribute *************** *** 39,50 **** AttributeNode node = (AttributeNode)nodes[0]; - MBeanAttributeInfo[] infos = new MBeanAttributeInfo[nodes.length]; - - for (int i = 0; i < nodes.length; i++) { - infos[i] = ((AttributeNode)nodes[i]).getAttributeInfo(); - } - ObjectName objectName = (ObjectName) node.getValue(); ! if (objectName != null) { Node curNode = node; while (! (curNode instanceof ConnectionNode)) { --- 39,44 ---- AttributeNode node = (AttributeNode)nodes[0]; ObjectName objectName = (ObjectName) node.getValue(); ! if (objectName != null) { Node curNode = node; while (! (curNode instanceof ConnectionNode)) { *************** *** 53,57 **** ConnectionNode connectionNode = (ConnectionNode) curNode; ! connectionNode.browseToMBean(objectName); } } --- 47,52 ---- ConnectionNode connectionNode = (ConnectionNode) curNode; ! // TODO! ! // connectionNode.browseToMBean(objectName); } } *************** *** 65,69 **** AttributeNode node = (AttributeNode) nodes[0]; ! String typeName = node.getAttributeInfo().getType(); Class type = null; try { --- 60,64 ---- AttributeNode node = (AttributeNode) nodes[0]; ! String typeName = node.getEmsAttribute().getType(); Class type = null; try { --- NEW FILE: AttributeChildNode.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed 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. */ package org.mc4j.console.bean.attribute; /** * @author Greg Hinkle (gh...@us...), Jan 6, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:13:54 $) */ public class AttributeChildNode { public void refresh() { // do nothing } } Index: AttributeNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeNode.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AttributeNode.java 7 Jan 2005 05:10:53 -0000 1.16 --- AttributeNode.java 12 Apr 2006 19:13:54 -0000 1.17 *************** *** 19,37 **** import org.mc4j.console.Refreshable; import org.mc4j.console.bean.attribute.watch.CreateMonitorAction; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.AbstractNode; ! import org.openide.nodes.Children; ! import org.openide.nodes.Node; ! import org.openide.nodes.PropertySupport; ! import org.openide.nodes.Sheet; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; - import javax.management.Attribute; - import javax.management.MBeanAttributeInfo; - import javax.management.MBeanServer; - import javax.management.ObjectInstance; - import javax.management.ObjectName; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; --- 19,29 ---- import org.mc4j.console.Refreshable; import org.mc4j.console.bean.attribute.watch.CreateMonitorAction; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.*; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; *************** *** 45,52 **** public class AttributeNode extends AbstractNode implements Refreshable, Comparable { ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanAttributeInfo attributeInfo; protected Node.Property valuePropertyNode; --- 37,41 ---- public class AttributeNode extends AbstractNode implements Refreshable, Comparable { ! protected EmsAttribute emsAttribute; protected Node.Property valuePropertyNode; *************** *** 60,103 **** // TODO GH: Create sub-nodes for array and collection values ! /** ! * @deprecated ! * @param server ! * @param objectInstance ! * @param attributeInfo ! */ ! public AttributeNode( ! MBeanServer server, ! ObjectInstance objectInstance, ! MBeanAttributeInfo attributeInfo) { ! this(server, objectInstance.getObjectName(), attributeInfo); ! } ! ! public AttributeNode(Children children) { ! super(children); ! } ! ! public AttributeNode( ! MBeanServer server, ! ObjectName objectName, ! MBeanAttributeInfo attributeInfo) { ! super(Children.LEAF); ! this.server = server; ! this.attributeInfo = attributeInfo; ! this.objectName = objectName; ! setIconBase("org/mc4j/console/bean/attribute/AttributeNodeIcon"); ! setName(this.attributeInfo.getName()); // or, super.setName if needed refresh(); ! setDisplayName(this.attributeInfo.getName()); ! setShortDescription(this.attributeInfo.getDescription()); } public boolean isCanDisplay() { return canDisplay; --- 49,72 ---- // TODO GH: Create sub-nodes for array and collection values ! public AttributeNode(EmsAttribute emsAttribute) { super(Children.LEAF); ! this.emsAttribute = emsAttribute; setIconBase("org/mc4j/console/bean/attribute/AttributeNodeIcon"); ! setName(this.emsAttribute.getName()); // or, super.setName if needed refresh(); ! setDisplayName(this.emsAttribute.getName()); ! setShortDescription(this.emsAttribute.getDescription()); } + public EmsAttribute getEmsAttribute() { + return emsAttribute; + } + public boolean isCanDisplay() { return canDisplay; *************** *** 120,125 **** try { ! server.setAttribute(objectName, ! new Attribute(attributeInfo.getName(), newValue)); } catch (Exception e) { throw new InvocationTargetException(e); --- 89,93 ---- try { ! emsAttribute.setValue(newValue); } catch (Exception e) { throw new InvocationTargetException(e); *************** *** 138,142 **** Object newValue = null; try { ! newValue = server.getAttribute(this.objectName, this.attributeInfo.getName()); } catch (Exception e) { e.printStackTrace(); --- 106,111 ---- Object newValue = null; try { ! this.emsAttribute.refresh(); ! newValue = this.emsAttribute.getValue(); } catch (Exception e) { e.printStackTrace(); *************** *** 182,196 **** } - /** Getter for property attributeInfo. - * @return Value of property attributeInfo. - * - */ - public javax.management.MBeanAttributeInfo getAttributeInfo() { - return attributeInfo; - } - - public MBeanServer getServer() { - return this.server; - } public int compareTo(Object o) { --- 151,154 ---- *************** *** 225,229 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getName(); } }); --- 183,187 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getName(); } }); *************** *** 234,238 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getDescription(); } }); --- 192,196 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getDescription(); } }); *************** *** 243,247 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return attributeInfo.getType(); } }); --- 201,205 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return AttributeNode.this.emsAttribute.getType(); } }); *************** *** 252,256 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return new Boolean(attributeInfo.isWritable()); } }); --- 210,214 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! return new Boolean(AttributeNode.this.emsAttribute.isWritable()); } }); *************** *** 313,317 **** * * @since MC4J 1.2b5 - * @return */ public synchronized Node.Property getValueProperty() { --- 271,274 ---- *************** *** 323,327 **** private Node.Property buildAttributeValueProperty() { ! return AttributePropertyFactory.getInstance().buildProperty(this); } --- 280,284 ---- private Node.Property buildAttributeValueProperty() { ! return AttributePropertyFactory.getInstance().buildProperty(this.emsAttribute); } *************** *** 381,389 **** } - - public ObjectName getObjectName() { - return objectName; - } - - } --- 338,340 ---- Index: AttributeSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AttributeSetNode.java 5 Oct 2004 05:15:56 -0000 1.11 --- AttributeSetNode.java 12 Apr 2006 19:13:54 -0000 1.12 *************** *** 17,41 **** package org.mc4j.console.bean.attribute; import org.openide.nodes.AbstractNode; - import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; - import org.mc4j.console.Refreshable; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.RefreshAction; - import org.mc4j.console.install.ExplorerUtil; - - import java.util.ArrayList; - import java.util.HashMap; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - - import javax.management.Attribute; - import javax.management.AttributeList; - import javax.management.MBeanAttributeInfo; - /** * The MBeanNode child that holds the attributes. --- 17,29 ---- package org.mc4j.console.bean.attribute; + import org.mc4j.console.Refreshable; + import org.mc4j.console.bean.RefreshAction; + import org.mc4j.console.install.ExplorerUtil; + import org.mc4j.ems.connection.bean.EmsBean; import org.openide.nodes.AbstractNode; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; /** * The MBeanNode child that holds the attributes. *************** *** 48,60 **** public static final String NAME = "Attributes"; - private MBeanNode mbeanNode; private boolean hasUnsupportedType = false; ! private Map unsupportedAttributeMap = new HashMap(); ! public AttributeSetNode(MBeanNode mbeanNode) { ! super(new AttributeSetChildren(mbeanNode)); ! this.mbeanNode = mbeanNode; setIconBase("org/mc4j/console/bean/attribute/AttributeSetNodeIcon"); --- 36,47 ---- public static final String NAME = "Attributes"; private boolean hasUnsupportedType = false; ! private EmsBean emsBean; ! public AttributeSetNode(EmsBean emsBean) { ! super(new AttributeSetChildren(emsBean)); ! this.emsBean = emsBean; setIconBase("org/mc4j/console/bean/attribute/AttributeSetNodeIcon"); *************** *** 67,71 **** } ! public void refresh() { if (ExplorerUtil.isExpanded(this)) { --- 54,61 ---- } ! ! ! ! public void refresh() { if (ExplorerUtil.isExpanded(this)) { *************** *** 75,150 **** public void retrieveData() { ! Node[] children = getChildren().getNodes(); ! ! if (!hasUnsupportedType) { ! MBeanAttributeInfo[] infos = ! this.mbeanNode.getMBeanInfo().getAttributes(); ! ! // MUST be careful to only ask for types that we know we have ! // otherwise the RMI call will fail and we will get no data. ! List nameList = new ArrayList(); ! for (int i = 0; i < infos.length; i++) { ! try { ! MBeanNode.findType(infos[i].getType()); ! // If we know the type, add it to the list ! nameList.add(infos[i].getName()); ! } catch (ClassNotFoundException cnfe) { } ! } ! ! String[] names = ! (String[]) ! nameList.toArray(new String[nameList.size()]); ! ! try { ! AttributeList attributeList = ! this.mbeanNode.getMBeanServer().getAttributes( ! this.mbeanNode.getObjectName(), ! names); ! if (attributeList.size() == names.length) { ! Map values = new HashMap(); ! Iterator iter = attributeList.iterator(); ! while (iter.hasNext()) { ! Attribute attr = (Attribute)iter.next(); ! values.put(attr.getName(),attr.getValue()); ! } ! for (int i = 0; i < children.length; i++) { ! AttributeNode node = (AttributeNode)children[i]; ! Object value = values.get(node.getName()); ! if (value != null) { ! node.updateValue(value); ! } else { ! if (values.containsKey(node.getName())) { ! node.updateValue(null); ! } else { ! node.setCanDisplay(false); ! node.setShortDescription("Value could not be displayed"); ! } ! } ! } ! } else { ! // If we still we're unable to load all the attributes at once ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! } ! } catch (Exception e) { ! // Don't load them as a set anymore... ! this.hasUnsupportedType = true; ! //System.out.println(ExceptionUtility.printStackTracesToString(e)); ! ! // If we still we're unable to load all the attributes at once ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! ! } ! } else { ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); ! } ! } } --- 65,69 ---- public void retrieveData() { ! emsBean.refreshAttributes(); } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:30
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/dashboard Modified Files: BorderFactory.java DashboardManager.java DashboardTopComponent.java DashboardComponentFactory.java DashboardFactory.java AttributeFactory.java Dashboard.java DashboardLoader.java Added Files: DashboardContainer.java Removed Files: DashboardHolder.java Tester.java Log Message: Merging EMS into head for the 2.0 release work Index: DashboardManager.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DashboardManager.java 5 Oct 2004 05:16:01 -0000 1.4 --- DashboardManager.java 12 Apr 2006 19:13:51 -0000 1.5 *************** *** 20,26 **** --- 20,30 ---- import org.openide.modules.InstalledFileLocator; import org.openide.windows.IOProvider; + import org.openide.windows.TopComponent; + import org.openide.nodes.Node; + import org.openide.ErrorManager; import org.mc4j.console.bean.MBeanNode; + import javax.swing.*; import java.io.File; import java.io.FileFilter; *************** *** 42,48 **** public class DashboardManager { ! ! private Set dashboardDocuments = new TreeSet(); ! private static DashboardManager INSTANCE = new DashboardManager(); --- 46,52 ---- public class DashboardManager { ! ! private Set<Dashboard> dashboardDocuments = new TreeSet(); ! private static DashboardManager INSTANCE = new DashboardManager(); *************** *** 50,62 **** initialize(); } ! public static DashboardManager getInstance() { return DashboardManager.INSTANCE; } ! public Set getDashboards() { return dashboardDocuments; } ! /** * Retrieves the set of dashboards appropriate for a particular bean --- 54,66 ---- initialize(); } ! public static DashboardManager getInstance() { return DashboardManager.INSTANCE; } ! public Set getDashboards() { return dashboardDocuments; } ! /** * Retrieves the set of dashboards appropriate for a particular bean *************** *** 64,75 **** * @return */ ! public Set getDashboards(MBeanNode mBeanNode) { ! Set results = new TreeSet(); ! Iterator dashboardIterator = this.dashboardDocuments.iterator(); while (dashboardIterator.hasNext()) { Dashboard dashboard = (Dashboard) dashboardIterator.next(); ! ! if (dashboard.matches(mBeanNode)) { results.add(dashboard); } --- 68,79 ---- * @return */ ! public Set<Dashboard> getDashboards(MBeanNode mBeanNode) { ! Set<Dashboard> results = new TreeSet<Dashboard>(); ! Iterator dashboardIterator = this.dashboardDocuments.iterator(); while (dashboardIterator.hasNext()) { Dashboard dashboard = (Dashboard) dashboardIterator.next(); ! ! if (dashboard.matches(mBeanNode.getEmsBean())) { results.add(dashboard); } *************** *** 77,81 **** return results; } ! public final void initialize() { //File dashboardDir = new File("./dashboards"); --- 81,85 ---- return results; } ! public final void initialize() { //File dashboardDir = new File("./dashboards"); *************** *** 106,111 **** List fileList = new ArrayList(); ! File dashboardDir = ! InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); if (dashboardDir.exists() && dashboardDir.isDirectory()) { --- 110,116 ---- List fileList = new ArrayList(); ! File dashboardDir = new File("dashboards"); ! // InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); ! if (dashboardDir.exists() && dashboardDir.isDirectory()) { *************** *** 141,143 **** --- 146,172 ---- } + + public void launch(final Dashboard dashboard) { + + + try { + final TopComponent tc = new DashboardTopComponent(dashboard, dashboard.getName()); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + // tc.setActivatedNodes(new Node[] { node }); + tc.setDisplayName(dashboard.getName()); + tc.open(); + tc.requestActive(); + } + }); + + // TODO: Is this done in the launchers? + // node.getConnectionNode().registerDashboard(tc); + } catch (Exception e) { + ErrorManager.getDefault().notify(e); + } + + + } + } --- DashboardHolder.java DELETED --- Index: AttributeFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/AttributeFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AttributeFactory.java 5 Oct 2004 05:16:01 -0000 1.8 --- AttributeFactory.java 12 Apr 2006 19:13:52 -0000 1.9 *************** *** 17,37 **** package org.mc4j.console.dashboard; ! import java.beans.PropertyDescriptor; ! import java.beans.PropertyEditor; ! import java.beans.PropertyEditorManager; ! import java.util.Map; ! ! import javax.swing.JComponent; ! import org.openide.ErrorManager; import org.openide.windows.IOProvider; - - import org.mc4j.console.dashboard.context.ContextHelper; - import org.mc4j.console.util.BeanUtil; - import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * --- 17,34 ---- package org.mc4j.console.dashboard; ! import org.mc4j.console.dashboard.context.OgnlHelper; ! import org.mc4j.console.util.BeanUtil; import org.openide.ErrorManager; import org.openide.windows.IOProvider; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; + import javax.swing.*; + import java.beans.PropertyDescriptor; + import java.beans.PropertyEditor; + import java.beans.PropertyEditorManager; + import java.util.Map; + /** * *************** *** 41,85 **** public class AttributeFactory { ! public static void loadAttributes(Element parent, Object object, Map context) { NodeList children = parent.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node childNode = children.item(j); if ("Attribute".equals(childNode.getNodeName())) { ! setAttribute((Element)childNode, object, context); } } } ! private static void setAttribute(Element attribute, Object object, Map context) { String name = attribute.getAttribute("name"); String valueString = attribute.getAttribute("value"); try { ! Object value = null; ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Introspecting: " + object.getClass().getName() + ", name = " + name + ", value = " + valueString); ! PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, object.getClass()); if ((valueString == null) || (valueString.length() < 1) || (JComponent.class.isAssignableFrom(desc.getPropertyType()))) { ! // Use content Element childComponentElement = DashboardFactory.findChild(attribute, "Component"); ! ! DashboardFactory factory = new DashboardFactory(); ! ! JComponent childComponent = factory.buildV1Component(childComponentElement, context); ! ! value = childComponent; } else { ! try { ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Checking context for value: " + valueString); ! value = ContextHelper.getValue(valueString, context); ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Got back: " + value); ! } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); } ! ! if (value instanceof String) { valueString = (String) value; try { --- 38,96 ---- public class AttributeFactory { ! public static void loadAttributes(Element parent, Object component, Map context) { NodeList children = parent.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node childNode = children.item(j); if ("Attribute".equals(childNode.getNodeName())) { ! setAttribute((Element)childNode, component, context); } } } ! private static void setAttribute(Element attribute, Object component, Map context) { String name = attribute.getAttribute("name"); String valueString = attribute.getAttribute("value"); + try { ! ! Object value = null; ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Introspecting: " + component.getClass().getName() + ", name = " + name + ", value = " + valueString); ! PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, component.getClass()); if ((valueString == null) || (valueString.length() < 1) || (JComponent.class.isAssignableFrom(desc.getPropertyType()))) { ! // In these cases, we're looking at the contents of the attribute tag not the xml attributes Element childComponentElement = DashboardFactory.findChild(attribute, "Component"); ! if (childComponentElement != null) { ! // This is an object attribute that happens to take a component as its type ! DashboardFactory factory = new DashboardFactory(); ! ! value = factory.buildV1Component(childComponentElement, context); ! } else { ! // We're going to assume the actual tag content is what we want ! // Set it as a string ! value = attribute.getTextContent(); ! ! } } else { ! ! // If the user marks it a literal, don't use Ognl ! String literal = attribute.getAttribute("literal"); ! if (literal != null && Boolean.valueOf(literal)) { ! value = valueString; ! } else { ! // We're going to try and figure out the value ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Checking context for value: " + valueString); ! value = OgnlHelper.getValue(valueString, context, component, desc.getPropertyType()); ! //ContextHelper.getValue(valueString, context); Old way ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Got back: " + value); } ! ! // This is a second chance to convert values using the PropertyEditor system... ! // Shouldn't be necessary... but hey, its cheap to try if we're not ! if (value instanceof String && desc.getPropertyType() != String.class) { valueString = (String) value; try { *************** *** 89,93 **** } catch (IllegalArgumentException iae) { // Perhaps its a constant? ! Object constValue = BeanUtil.getStaticFieldValue(object.getClass(),valueString); if (constValue != null) value = constValue; --- 100,104 ---- } catch (IllegalArgumentException iae) { // Perhaps its a constant? ! Object constValue = BeanUtil.getStaticFieldValue(component.getClass(),valueString); if (constValue != null) value = constValue; *************** *** 96,104 **** } ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + object); ! BeanUtil.setObjectAttribute(object, name, value); } catch (Exception e) { ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + object); ErrorManager.getDefault().notify(e); --- 107,115 ---- } ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + component); ! BeanUtil.setObjectAttribute(component, name, value); } catch (Exception e) { ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + component); ErrorManager.getDefault().notify(e); --- Tester.java DELETED --- Index: DashboardComponentFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardComponentFactory.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DashboardComponentFactory.java 13 Oct 2004 04:59:37 -0000 1.11 --- DashboardComponentFactory.java 12 Apr 2006 19:13:52 -0000 1.12 *************** *** 17,37 **** package org.mc4j.console.dashboard; ! import java.awt.Color; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.RenderingHints; ! import java.util.Map; ! ! import javax.swing.JComponent; ! import javax.swing.JEditorPane; ! import javax.swing.JLabel; ! import javax.swing.JScrollPane; ! import org.openide.windows.IOProvider; - - import org.mc4j.console.util.ExceptionUtility; - import org.w3c.dom.Element; /** * --- 17,28 ---- package org.mc4j.console.dashboard; ! import org.mc4j.console.dashboard.components.ErrorComponent; import org.openide.windows.IOProvider; import org.w3c.dom.Element; + import javax.swing.*; + import java.awt.*; + import java.util.Map; + /** * *************** *** 70,77 **** AttributeFactory.loadAttributes(node, component, context); - if (component instanceof DashboardComponent) { - ((DashboardComponent)component).setContext(context); - } if (component instanceof JScrollPane) { ((JScrollPane)component).getVerticalScrollBar().setUnitIncrement(10); --- 61,66 ---- AttributeFactory.loadAttributes(node, component, context); + // This is a hack to improve the usability of the scrollwheel... could be intelligent if (component instanceof JScrollPane) { ((JScrollPane)component).getVerticalScrollBar().setUnitIncrement(10); *************** *** 86,92 **** } catch (Exception e) { System.out.println(e); ! JEditorPane errorPane = new JEditorPane("text/plain", ExceptionUtility.printStackTracesToString(e)); ! errorPane.setBackground(Color.yellow); ! return errorPane; } } --- 75,82 ---- } catch (Exception e) { System.out.println(e); ! // JEditorPane errorPane = new JEditorPane("text/plain", ExceptionUtility.printStackTracesToString(e)); ! // errorPane.setBackground(Color.yellow); ! // return errorPane; ! return new ErrorComponent(e); } } Index: BorderFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/BorderFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BorderFactory.java 5 Oct 2004 05:16:01 -0000 1.8 --- BorderFactory.java 12 Apr 2006 19:13:51 -0000 1.9 *************** *** 17,20 **** --- 17,29 ---- package org.mc4j.console.dashboard; + import ognl.OgnlException; + import org.mc4j.console.dashboard.context.OgnlHelper; + import org.mc4j.console.util.BeanUtil; + import org.openide.ErrorManager; + import org.openide.windows.IOProvider; + import org.w3c.dom.Element; + + import javax.swing.border.Border; + import javax.swing.border.TitledBorder; import java.awt.Color; import java.beans.PropertyEditor; *************** *** 22,36 **** import java.util.Map; - import javax.swing.border.Border; - import javax.swing.border.TitledBorder; - - import org.openide.ErrorManager; - import org.openide.windows.IOProvider; - - import org.mc4j.console.dashboard.context.ContextHelper; - import org.mc4j.console.util.BeanUtil; - - import org.w3c.dom.Element; - /** * --- 31,34 ---- *************** *** 39,54 **** */ public class BorderFactory { ! /** Creates a new instance of ConstraintFactory */ public BorderFactory() { } ! public static final String TYPE = "type"; ! public Border buildBorder(Element element, Map context) { ! String type = element.getAttribute(TYPE); if (type.equals("javax.swing.border.TitledBorder")) { ! TitledBorder border = new TitledBorder("Initial"); return border; --- 37,52 ---- */ public class BorderFactory { ! /** Creates a new instance of ConstraintFactory */ public BorderFactory() { } ! public static final String TYPE = "type"; ! public Border buildBorder(Element element, Map context) { ! String type = element.getAttribute(TYPE); if (type.equals("javax.swing.border.TitledBorder")) { ! TitledBorder border = new TitledBorder("Initial"); return border; *************** *** 100,106 **** try { ! value = ContextHelper.getValue(attributeString, context); ! } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); } --- 98,105 ---- try { ! value = OgnlHelper.getValue(attributeString, context, attributeType); ! //ContextHelper.getValue(attributeString, context); ! } catch (OgnlException oe) { ! ErrorManager.getDefault().notify(oe); } *************** *** 109,114 **** try { PropertyEditor editor = PropertyEditorManager.findEditor(attributeType); ! editor.setAsText(valueString); ! value = editor.getValue(); } catch (IllegalArgumentException iae) { // Perhaps its a constant? --- 108,118 ---- try { PropertyEditor editor = PropertyEditorManager.findEditor(attributeType); ! // TODO: Figure out why there are missing primitive property editors ! if (editor != null) { ! editor.setAsText(valueString); ! value = editor.getValue(); ! } else { ! value = null; ! } } catch (IllegalArgumentException iae) { // Perhaps its a constant? Index: DashboardLoader.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardLoader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DashboardLoader.java 15 Jan 2005 03:51:07 -0000 1.8 --- DashboardLoader.java 12 Apr 2006 19:13:52 -0000 1.9 *************** *** 84,89 **** --- 84,115 ---- document); + String val = rootElement.getAttribute("standardHeader"); + if (val != null && Boolean.valueOf(val)) { + dashboard.setStandardHeader(true); + } + + val = rootElement.getAttribute("refreshControl"); + if (val != null && val.length() > 0) { + if (Character.isDigit(val.charAt(0))) { + int time = Integer.parseInt(val); + dashboard.setRefreshControl(true); + dashboard.setRefreshTime(time); + } else { + dashboard.setRefreshControl(Boolean.valueOf(val)); + } + } else { + dashboard.setRefreshControl(true); + } + + val = rootElement.getAttribute("autoRefresh"); + if (val != null && Boolean.valueOf(val)) { + dashboard.setAutoBeanRefresh(true); + } + + dashboard.setDescription(rootElement.getElementsByTagName("Description").item(0).getNodeValue()); + dashboard.putContext(Dashboard.CONTEXT_DASHBOARD_FILE, dashboardFile); + assignDashboardMatch(dashboard, rootElement); *************** *** 254,257 **** --- 280,301 ---- inputSource = new InputSource(inputStream); } + } else if ("http://mc4j.org/Dashboard_2_0.dtd".equals(systemId)) { + + InputStream inputStream = + getClass().getClassLoader().getResourceAsStream("dashboards/Dashboard_2_0.dtd"); + + if (inputStream != null) { + inputSource = new InputSource(inputStream); + } + + + } else { + String filePath = "dashboards" + systemId.substring(systemId.lastIndexOf("/")); + InputStream inputStream = + getClass().getClassLoader().getResourceAsStream(filePath); + + if (inputStream != null) { + inputSource = new InputSource(inputStream); + } } if (inputSource != null) { Index: DashboardFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardFactory.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DashboardFactory.java 13 Oct 2004 04:59:37 -0000 1.15 --- DashboardFactory.java 12 Apr 2006 19:13:52 -0000 1.16 *************** *** 26,29 **** --- 26,30 ---- import org.mc4j.console.dashboard.components.ForEachPanelComponent; import org.mc4j.console.util.ExceptionUtility; + import org.mc4j.ems.connection.bean.EmsBean; import java.awt.Color; *************** *** 153,157 **** ! if (rootElement.getAttribute("version").equals("1.0")) { NodeList nodes = rootElement.getChildNodes(); --- 154,158 ---- ! if (true) { // maybe use this later rootElement.getAttribute("version").equals("1.0")) { NodeList nodes = rootElement.getChildNodes(); *************** *** 278,282 **** //loadAttributes(node, component, context); ! component.doLayout(); return component; --- 279,288 ---- //loadAttributes(node, component, context); ! ! // Delayed context setting (after children have been loaded ! if (component instanceof DashboardComponent) { ! ((DashboardComponent)component).setContext(context); ! } ! component.doLayout(); return component; *************** *** 288,297 **** Integer baseIndex = (Integer) context.get("index"); ! List beanList = forEachPanelComponent.getBeanList(); for (int i = 0; i < beanList.size(); i++) { ! MBeanNode mBeanNode = (MBeanNode) beanList.get(i); context.put("index", new Integer(i)); ! context.put(forEachPanelComponent.getIdKey(), mBeanNode); buildV1Content(element, context); --- 294,303 ---- Integer baseIndex = (Integer) context.get("index"); ! List<EmsBean> beanList = forEachPanelComponent.getBeanList(); for (int i = 0; i < beanList.size(); i++) { ! EmsBean emsBean = beanList.get(i); context.put("index", new Integer(i)); ! context.put(forEachPanelComponent.getIdKey(), emsBean); buildV1Content(element, context); --- NEW FILE: DashboardContainer.java --- /* * Copyright 2002-2005 Greg Hinkle * * Licensed 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. */ package org.mc4j.console.dashboard; /** * This is the root container panel for dashboards. It is laoded into * * @author Greg Hinkle (gh...@us...), Dec 30, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:13:51 $) */ public class DashboardContainer { } Index: Dashboard.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/Dashboard.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Dashboard.java 5 Oct 2004 05:16:01 -0000 1.17 --- Dashboard.java 12 Apr 2006 19:13:52 -0000 1.18 *************** *** 17,25 **** package org.mc4j.console.dashboard; - import org.w3c.dom.Document; - - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.match.DashboardMatch; import org.mc4j.console.dashboard.match.MatchExecutor; import java.util.HashMap; --- 17,24 ---- package org.mc4j.console.dashboard; import org.mc4j.console.dashboard.match.DashboardMatch; import org.mc4j.console.dashboard.match.MatchExecutor; + import org.mc4j.ems.connection.bean.EmsBean; + import org.w3c.dom.Document; import java.util.HashMap; *************** *** 28,35 **** /** * Represents a dashboard that can be invoked for an MBean or server. This is ! * not the dashboard itself, but the data representing a class of dashboard, ! * but not a specific instance. Instances of the dashboards themselves are * created by the DashboardFactory. * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) --- 27,36 ---- /** * Represents a dashboard that can be invoked for an MBean or server. This is ! * not the dashboard view itself, but the data representing the xml information ! * in a dashboard XML document. Instances of the dashboards themselves are * created by the DashboardFactory. * + * + * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) *************** *** 56,59 **** --- 57,65 ---- + private boolean standardHeader = false; + private boolean refreshControl = false; + private boolean autoBeanRefresh = false; + private int refreshTime = 5000; + public static final String CONTEXT_CONNECTION_NODE = "ConnectionNode"; public static final String CONTEXT_MBEAN_NODE = "MBeanNode"; *************** *** 65,68 **** --- 71,77 ---- public static final String CONTEXT_DASHBOARD_NAME = "DashboardName"; public static final String CONTEXT_DASHBOARD_DESCRIPTION = "DashboardDescription"; + public static final String CONTEXT_DASHBOARD_FILE = "DashboardFile"; + + public static final String CONTEXT_CONNECTION = "Connection"; public Dashboard( *************** *** 160,166 **** } ! public boolean matches(MBeanNode mBeanNode) { ! return MatchExecutor.getInstance().matchSingle(this, mBeanNode); } } --- 169,207 ---- } ! public boolean matches(EmsBean bean) { ! return MatchExecutor.getInstance().matchSingle(this, bean); ! } ! ! ! public boolean isStandardHeader() { ! return standardHeader; } + public void setStandardHeader(boolean standardHeader) { + this.standardHeader = standardHeader; + } + + public boolean isRefreshControl() { + return refreshControl; + } + + public void setRefreshControl(boolean refreshControl) { + this.refreshControl = refreshControl; + } + + public boolean isAutoBeanRefresh() { + return autoBeanRefresh; + } + + public void setAutoBeanRefresh(boolean autoBeanRefresh) { + this.autoBeanRefresh = autoBeanRefresh; + } + + public int getRefreshTime() { + return refreshTime; + } + + public void setRefreshTime(int refreshTime) { + this.refreshTime = refreshTime; + } } Index: DashboardTopComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardTopComponent.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DashboardTopComponent.java 5 Oct 2004 05:16:01 -0000 1.15 --- DashboardTopComponent.java 12 Apr 2006 19:13:52 -0000 1.16 *************** *** 17,20 **** --- 17,22 ---- package org.mc4j.console.dashboard; + import org.mc4j.console.dashboard.components.ErrorComponent; + import org.mc4j.console.dashboard.components.RefreshControlComponent; import org.openide.util.actions.SystemAction; import org.openide.windows.TopComponent; *************** *** 26,41 **** - /** - * * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) */ public class DashboardTopComponent extends TopComponent implements DashboardComponent { ! public DashboardTopComponent() { // For serialization ! putClientProperty("PersistenceType","Never"); ! } --- 28,45 ---- /** * @author Greg Hinkle (gh...@us...), September 2002 * @version $Revision$($Author$ / $Date$) */ public class DashboardTopComponent extends TopComponent implements DashboardComponent { ! ! private Dashboard dashboard; ! private String name; ! private JScrollPane scrollPane; ! public DashboardTopComponent() { // For serialization ! putClientProperty("PersistenceType", "Never"); ! } *************** *** 45,80 **** ! // REMEMBER: You should have a public default constructor! ! // This is for externalization. If you have a nondefault ! // constructor for normal creation of the component, leave ! // in a default constructor that will put the component into ! // a consistent but unconfigured state, and make sure readExternal ! // initializes it properly. Or, be creative with writeReplace(). ! public DashboardTopComponent(JComponent component, String name) { ! setLayout(new BorderLayout()); - - add(component,BorderLayout.CENTER); ! //setCloseOperation(CLOSE_EACH); // or CLOSE_EACH ! // Display name of this window (not needed if you use the DataObject constructor): ! // GH: Can't do this outside the event thread anymore ! //setDisplayName(name); ! ! // You may set the icon, but often it is better to set the icon for an associated mode instead: ! // setIcon(Utilities.loadImage("org/mc4j/console/dashboard/DashboardHolderIcon.gif")); ! // Use the Component Inspector to set tool-tip text. This will be saved ! // automatically. Other JComponent properties you may need to save yuorself. ! // At any time you can affect the node selection: ! // setActivatedNodes(new Node[] {...}); ! // Don't ever persist... ! //putClientProperty("PersistenceType","Never"); ! // TODO GH: Get the refresh action connected } public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; --- 49,143 ---- ! public DashboardTopComponent(Dashboard dashboard, String name) { ! this.dashboard = dashboard; ! this.name = name; ! ! // Don't ever persist... ! putClientProperty("PersistenceType", "Never"); ! ! // TODO GH: Get the refresh action connected ! init(); ! } ! ! JPanel header; ! ! private void init() { setLayout(new BorderLayout()); ! Map context = dashboard.getContextStarter(); ! DashboardFactory factory = new DashboardFactory(); ! JComponent component = null; ! try { ! component = factory.buildDashboard(dashboard, context); ! } catch (Exception e) { ! component = new ErrorComponent(e); ! } ! if (dashboard.isStandardHeader()) { ! header = new GradientPanel(); ! header.setLayout(new BorderLayout()); ! ! JLabel title = new JLabel(getTitle()) { ! public void paintComponent(Graphics g) { ! Graphics2D g2 = (Graphics2D)g; ! g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); ! super.paintComponent(g); ! } ! }; ! ! title.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,6,0,0)); ! header.add(title, BorderLayout.CENTER); ! if (dashboard.isRefreshControl()) { ! RefreshControlComponent refresher = new RefreshControlComponent(); ! refresher.setContext(context); ! refresher.setRefreshDelay(dashboard.getRefreshTime()); ! header.add(refresher, BorderLayout.EAST); ! } ! add(header, BorderLayout.NORTH); ! } ! ! scrollPane = new JScrollPane(component); ! ! add(scrollPane, BorderLayout.CENTER); ! } ! ! public static class GradientPanel extends JPanel { ! public static final Color START = new Color(128, 172, 209); //119,175,208); // 188, 218, 231); ! public static final Color END = new Color(214, 218, 219); ! ! public void paintComponent(Graphics g) { ! super.paintComponent(g); ! // Cast to Graphics2D so we can set composite information. ! Graphics2D g2d = (Graphics2D) g; ! ! g2d.setPaint(new GradientPaint(0, 0, START /* Color.WHITE*/, getWidth()-64, 0, getBackground())); // END)); ! g2d.fill(getVisibleRect()); ! } } + public String getTitle() { + return + "<html><font size=\"+1\">" + + dashboard.getDisplayName() + + "</font><br>" + + dashboard.getDescription() + + "</html>"; + } + + + public void launch() { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + setDisplayName(dashboard.getDisplayName()); + open(); + requestActive(); + } + }); + } + public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; *************** *** 88,92 **** - public void setContext(Map context) { //To change body of implemented methods use File | Settings | File Templates. --- 151,154 ---- *************** *** 106,110 **** if (container instanceof DashboardComponent) ! ((DashboardComponent)container).refresh(); } } --- 168,172 ---- if (container instanceof DashboardComponent) ! ((DashboardComponent) container).refresh(); } } *************** *** 113,117 **** private void closeChildren(Component comp) { if (comp instanceof Container) { ! Component[] children = ((Container)comp).getComponents(); for (int i = 0; i < children.length; i++) { Component child = children[i]; --- 175,179 ---- private void closeChildren(Component comp) { if (comp instanceof Container) { ! Component[] children = ((Container) comp).getComponents(); for (int i = 0; i < children.length; i++) { Component child = children[i]; *************** *** 120,125 **** } if (comp instanceof TopComponent) { ! ((TopComponent)comp).setCloseOperation(CLOSE_EACH); ! ((TopComponent)comp).close(); } } --- 182,187 ---- } if (comp instanceof TopComponent) { ! ((TopComponent) comp).setCloseOperation(CLOSE_EACH); ! ((TopComponent) comp).close(); } } *************** *** 130,136 **** } */ ! // MODES AND WORKSPACES - --- 192,197 ---- } */ ! // MODES AND WORKSPACES *************** *** 155,160 **** - - // Use this to discard the component after restarts (make it nonpersistent): private Object readResolve() throws ObjectStreamException { --- 216,219 ---- *************** *** 192,206 **** } */ ! /* ! // If you want UndoAction and RedoAction to be enabled on this component: ! public UndoRedo getUndoRedo() { ! return new MyUndoRedo(this); ! } ! */ ! // Printing, saving, compiling, etc.: use cookies on some appropriate node and // use this node as the node selection. ! } --- 251,285 ---- } */ ! /* ! // If you want UndoAction and RedoAction to be enabled on this component: ! public UndoRedo getUndoRedo() { ! return new MyUndoRedo(this); ! } ! */ ! // Printing, saving, compiling, etc.: use cookies on some appropriate node and // use this node as the node selection. ! ! ! public static class DashboardHeaderComponent extends JPanel { ! private Label label; ! private RefreshControlComponent refreshControl; ! ! public DashboardHeaderComponent() { ! setLayout(new BorderLayout()); ! } ! ! private void init() { ! setLayout(new BorderLayout()); ! ! setLayout(new java.awt.BorderLayout()); ! label = new Label("<html><font size=\"+1\">Garbage Collection</font><br>Information about the various garbage collectors for the VM, including space collected during the last execution.</html> "); ! add(label, java.awt.BorderLayout.CENTER); ! ! refreshControl = new RefreshControlComponent(); ! // add(jToggleButton1, java.awt.BorderLayout.EAST); ! } ! } } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:30
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console Modified Files: Welcome.html ConnectAction.java mc4j-mf-layer.xml IConnectionNode.java ManagementNode.java Log Message: Merging EMS into head for the 2.0 release work Index: ConnectAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/ConnectAction.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ConnectAction.java 5 Oct 2004 05:16:19 -0000 1.15 --- ConnectAction.java 12 Apr 2006 19:13:55 -0000 1.16 *************** *** 17,24 **** package org.mc4j.console; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; --- 17,24 ---- package org.mc4j.console; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDisplayer; import org.openide.ErrorManager; *************** *** 28,34 **** import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; /** --- 28,33 ---- import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; /** *************** *** 49,53 **** final ConnectionDescriptor desc = new ConnectionDescriptor(); ! desc.getSettings().setLibraryURI(((ManagementNode)node).getLibraryURI()); final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); --- 48,53 ---- final ConnectionDescriptor desc = new ConnectionDescriptor(); ! // desc.getSettings().setLibraryURI(((ManagementNode)node).getLibraryURI()); ! final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); *************** *** 71,75 **** ConnectionSetDatabase.addNode(settings); ! IConnectionNode connectionNode = ManagementNode.buildConnection(settings); try { --- 71,76 ---- ConnectionSetDatabase.addNode(settings); ! IConnectionNode connectionNode = new ConnectionNode(settings); ! //ManagementNode.buildConnection(settings); try { Index: IConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/IConnectionNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IConnectionNode.java 13 Oct 2004 05:05:33 -0000 1.9 --- IConnectionNode.java 12 Apr 2006 19:13:55 -0000 1.10 *************** *** 17,21 **** package org.mc4j.console; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,21 ---- package org.mc4j.console; ! import org.mc4j.ems.connection.settings.ConnectionSettings; /** Index: ManagementNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/ManagementNode.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ManagementNode.java 14 Mar 2005 15:16:18 -0000 1.28 --- ManagementNode.java 12 Apr 2006 19:13:55 -0000 1.29 *************** *** 17,40 **** package org.mc4j.console; ! import org.mc4j.console.connection.install.ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.GeronimoConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.J2SE5ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.JBossConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.JDMKConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.JSR160ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.Mx4jConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.Oc4jConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.PramatiConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.SJSASConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.Tomcat55ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.Weblogic9ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.Weblogic9Jsr77ConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.WeblogicConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.WebsphereConnectionTypeDescriptor; ! import org.mc4j.console.connection.install.WebsphereStudioConnectionTypeDescriptor; import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; import org.openide.ErrorManager; - import org.openide.modules.InstalledFileLocator; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; --- 17,26 ---- package org.mc4j.console; ! ! import org.mc4j.console.connection.ConnectionNode; import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.ems.connection.settings.ConnectionSettings; ! import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; import org.openide.ErrorManager; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; *************** *** 47,51 **** import java.io.File; import java.io.FileFilter; - import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; --- 33,36 ---- *************** *** 95,99 **** return null; } else { ! return new Action[] { NodeAction.get(ConnectAction.class) }; --- 80,84 ---- return null; } else { ! return new Action[]{ NodeAction.get(ConnectAction.class) }; *************** *** 116,139 **** ConnectionSettings desc = (ConnectionSettings) iter.next(); ! IConnectionNode connectionNode = null; ! ! ! //IOProvider.getDefault().getStdOut().println( ! // "[" + installType + "] Reconnecting to saved connection: " + ! // desc.getConnectionName() + "@" + desc.getServerUrl()); ! ! this.libraryURI = desc.getLibraryURI(); ! ! try { ! // Load each connection and try-catch so that one connection problem ! // won't screw up the rest ! connectionNode = buildConnection(desc); ! this.getChildren().add( new Node[] { (Node) connectionNode }); ! } catch(Exception e) { ! // Lets just kill it ! ConnectionSetDatabase.removeNode(desc); ! //ErrorManager.getDefault().notify(e); ! } --- 101,107 ---- ConnectionSettings desc = (ConnectionSettings) iter.next(); ! ConnectionNode connectionNode = new ConnectionNode(desc); ! this.getChildren().add(new Node[]{(Node) connectionNode}); *************** *** 153,175 **** - public static final ConnectionTypeDescriptor[] CONNECTION_DESCRIPTORS = - new ConnectionTypeDescriptor[] { - new JBossConnectionTypeDescriptor(), - new Tomcat55ConnectionTypeDescriptor(), - new JDMKConnectionTypeDescriptor(), - new J2SE5ConnectionTypeDescriptor(), - new JSR160ConnectionTypeDescriptor(), - new GeronimoConnectionTypeDescriptor(), - new Mx4jConnectionTypeDescriptor(), - new Oc4jConnectionTypeDescriptor(), - new PramatiConnectionTypeDescriptor(), - new SJSASConnectionTypeDescriptor(), - new WeblogicConnectionTypeDescriptor(), - new Weblogic9ConnectionTypeDescriptor(), - new Weblogic9Jsr77ConnectionTypeDescriptor(), - new WebsphereConnectionTypeDescriptor(), - new WebsphereStudioConnectionTypeDescriptor()}; public static ClassLoader buildClassLoader(ConnectionSettings settings) { // TODO GH: Build a factory --- 121,128 ---- + /* + public static ClassLoader buildClassLoader(ConnectionSettings settings) { // TODO GH: Build a factory *************** *** 177,181 **** File[] cpEntries = settings.getClassPathEntries(); ! int cpEntriesLength = (cpEntries==null?0:cpEntries.length); File[] extrasFiles = getExtras(settings.getConnectionType()); URL[] cpURLs = new URL[cpEntriesLength + extrasFiles.length]; --- 130,134 ---- File[] cpEntries = settings.getClassPathEntries(); ! int cpEntriesLength = (cpEntries == null ? 0 : cpEntries.length); File[] extrasFiles = getExtras(settings.getConnectionType()); URL[] cpURLs = new URL[cpEntriesLength + extrasFiles.length]; *************** *** 209,212 **** --- 162,166 ---- return null; } + */ /** *************** *** 223,227 **** protected synchronized Class loadClass(String name, boolean resolve) ! throws ClassNotFoundException { Class c = findLoadedClass(name); if (c == null) { --- 177,181 ---- protected synchronized Class loadClass(String name, boolean resolve) ! throws ClassNotFoundException { Class c = findLoadedClass(name); if (c == null) { *************** *** 232,236 **** } catch (SecurityException se) { int i = name.lastIndexOf('.'); ! String pkgname = name.substring(0, i); // Check if package already loaded. Package pkg = getPackage(pkgname); --- 186,190 ---- } catch (SecurityException se) { int i = name.lastIndexOf('.'); ! String pkgname = name.substring(0, i); // Check if package already loaded. Package pkg = getPackage(pkgname); *************** *** 242,247 **** resolveClass(c); } ! } catch(ClassNotFoundException cnfe) { ! c = super.loadClass(name,resolve); } } else { --- 196,201 ---- resolveClass(c); } ! } catch (ClassNotFoundException cnfe) { ! c = super.loadClass(name, resolve); } } else { *************** *** 298,302 **** try { ! ClassLoader loader = buildClassLoader(settings); Class clazz = Class.forName(className, true, loader); --- 252,256 ---- try { ! ClassLoader loader = null;//buildClassLoader(settings); Class clazz = Class.forName(className, true, loader); *************** *** 316,328 **** public static File[] getExtras(final ConnectionTypeDescriptor serverType) { - File extrasFile = - InstalledFileLocator.getDefault().locate("mc4jlib/mc4j_common.jar","org.mc4j.console",false); - if (!extrasFile.exists()) { - ErrorManager.getDefault().notify( - new RuntimeException("Unable to locate mc4j_common.jar in the mc4jlib folder") - ); - } ! File mc4jLibDir = extrasFile.getParentFile(); File[] commonLibs = mc4jLibDir.listFiles(new FileFilter() { --- 270,275 ---- public static File[] getExtras(final ConnectionTypeDescriptor serverType) { ! File mc4jLibDir = new File("mc4jlib");//extrasFile.getParentFile(); File[] commonLibs = mc4jLibDir.listFiles(new FileFilter() { *************** *** 335,343 **** - File[] tempDirs = mc4jLibDir.listFiles(new FileFilter() { public boolean accept(File file) { return (file.isDirectory() && ! file.getName().equals(serverType.getExtrasLibrary())); } }); --- 282,289 ---- File[] tempDirs = mc4jLibDir.listFiles(new FileFilter() { public boolean accept(File file) { return (file.isDirectory() && ! file.getName().equals(serverType.getExtrasLibrary())); } }); *************** *** 359,366 **** File[] results = new File[commonLibs.length + serverLibs.length + 1]; ! System.arraycopy(commonLibs,0,results,0,commonLibs.length); ! System.arraycopy(serverLibs,0,results,commonLibs.length,serverLibs.length); ! results[results.length-1] = new File("dashboards"); return results; --- 305,312 ---- File[] results = new File[commonLibs.length + serverLibs.length + 1]; ! System.arraycopy(commonLibs, 0, results, 0, commonLibs.length); ! System.arraycopy(serverLibs, 0, results, commonLibs.length, serverLibs.length); ! results[results.length - 1] = new File("dashboards"); return results; *************** *** 368,372 **** - public ClassLoader getDelegatedClassLoader() { return delegatedClassLoader; --- 314,317 ---- Index: Welcome.html =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/Welcome.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Welcome.html 19 Jan 2005 14:11:44 -0000 1.2 --- Welcome.html 12 Apr 2006 19:13:55 -0000 1.3 *************** *** 9,13 **** <tr> <td width="100%"> ! <span style="font-size: 24pt; font-family: Arial Black; color: #FFFFFF">MC4J 1.2 beta 8</span> </td> --- 9,13 ---- <tr> <td width="100%"> ! <span style="font-size: 24pt; font-family: Arial Black; color: #FFFFFF">MC4J 1.2 beta 9</span> </td> *************** *** 24,34 **** <h2>New features</h2> <ul> ! <li>WebSphere 5 support fixed</li> ! <li>WebSphere 6 support added</li> ! <li>WebLogic 9 support added</li> ! <li>JSR-77 support updates and bug fixes</li> ! <li>Better query nodes (Still not persistent)</li> ! <li>Sun Java App server support added</li> ! <li>Upgraded to NB Platform 4.0 Final</li> </ul> </td> --- 24,29 ---- <h2>New features</h2> <ul> ! <li>WebLogic 8, 7 and 6 support fixed</li> ! <li>WebSphere Studio test environment support fixed</li> </ul> </td> Index: mc4j-mf-layer.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mc4j-mf-layer.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mc4j-mf-layer.xml 13 Oct 2004 05:05:33 -0000 1.4 --- mc4j-mf-layer.xml 12 Apr 2006 19:13:55 -0000 1.5 *************** *** 4,8 **** --- 4,10 ---- <folder name="Menu"> + <!-- <file name="File_hidden"/> + --> <file name="BuildProject_hidden"/> <file name="Edit_hidden"/> *************** *** 10,14 **** - <folder name="Management"> <file name="org-mc4j-console-CreateConnectionAction.instance"> --- 12,15 ---- *************** *** 44,52 **** <file name="properties.wsmode" url="Windows2/Modes/properties.wsmode"/> <folder name="properties"> ! <file name="properties.wstcref" url="Windows2/Modes/properties/properties.wstcref" /> </folder> ! <file name="editor.wsmode" url="Windows2/Modes/editor.wsmode" /> <folder name="editor"> <file name="welcomepanel.wstcref" url="Windows2/Modes/editor/welcomepanel.wstcref"/> --- 45,53 ---- <file name="properties.wsmode" url="Windows2/Modes/properties.wsmode"/> <folder name="properties"> ! <file name="properties.wstcref" url="Windows2/Modes/properties/properties.wstcref"/> </folder> ! <file name="editor.wsmode" url="Windows2/Modes/editor.wsmode"/> <folder name="editor"> <file name="welcomepanel.wstcref" url="Windows2/Modes/editor/welcomepanel.wstcref"/> *************** *** 69,73 **** <folder name="Toolbars"> ! <!-- Specifying the file Standard.xml in this place in your layer will override the default toolbar configuration. --- 70,74 ---- <folder name="Toolbars"> ! <!-- Specifying the file Standard.xml in this place in your layer will override the default toolbar configuration. *************** *** 98,102 **** </file> ! <!-- <file name="org-mc4j-console-mejb-view-ShowMEJBViewAction.instance"> <attr name="name" stringvalue="org-mc4j-console-mejb-view-MEJBView"/> --- 99,103 ---- </file> ! <!-- <file name="org-mc4j-console-mejb-view-ShowMEJBViewAction.instance"> <attr name="name" stringvalue="org-mc4j-console-mejb-view-MEJBView"/> *************** *** 115,117 **** --- 116,125 ---- </folder> <!-- Toolbars --> + + <folder name="Shortcuts"> + <file name="D-W.instance"> + <attr name="instanceClass" + stringvalue="org.netbeans.core.actions.SystemExit"/> + </file> + </folder> </filesystem> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:29
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/notification Modified Files: NotificationNode.java NotificationSetNode.java NotificationSetChildren.java Removed Files: NotificationNameComparator.java Log Message: Merging EMS into head for the 2.0 release work Index: NotificationSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationSetChildren.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NotificationSetChildren.java 5 Oct 2004 05:15:56 -0000 1.5 --- NotificationSetChildren.java 12 Apr 2006 19:13:52 -0000 1.6 *************** *** 17,27 **** package org.mc4j.console.bean.notification; ! import java.util.Collections; ! import java.util.LinkedList; ! import java.util.List; ! import org.openide.nodes.Children; import org.openide.nodes.Node; /** * --- 17,27 ---- package org.mc4j.console.bean.notification; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.notification.EmsNotification; import org.openide.nodes.Children; import org.openide.nodes.Node; + import java.util.SortedSet; + /** * *************** *** 29,83 **** * @version $Revision$($Author$ / $Date$) */ ! public class NotificationSetChildren extends Children.Keys { /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected List myKeys; ! public NotificationSetChildren() { ! myKeys = null; } protected void addNotify() { super.addNotify(); - if (myKeys != null) return; - myKeys = new LinkedList(); - // add whatever keys you need - setKeys(myKeys); - } - - protected void removeNotify() { - myKeys = null; - setKeys(Collections.EMPTY_SET); - super.removeNotify(); - } ! protected Node[] createNodes(Object key) { ! // interpret your key here...usually one node generated, but could be zero or more ! return new Node[] { /*new MyNode((MyParameter)key) */}; ! } ! ! /** Optional accessor method for the keys, for use by the container node or maybe subclasses. */ ! /* ! protected addKey(Object newKey) { ! // Make sure some keys already exist: ! addNotify(); ! myKeys.add(newKey); ! // Ensure that the node(s) is displayed: ! refreshKey(newKey); ! } ! */ ! /** Optional accessor method for keys, for use by the container node or maybe subclasses. */ ! /* ! protected void setKeys(Collection keys) { ! myKeys = new LinkedList(); ! myKeys.addAll(keys); ! super.setKeys(keys); } - */ - - // Could also write e.g. removeKey to be used by the nodes in this children. - // Or, could listen to changes in their status (NodeAdapter.nodeDestroyed) - // and automatically remove them from the keys list here. Etc. - } --- 29,54 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NotificationSetChildren extends Children.SortedArray { /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected EmsBean emsBean; ! ! public NotificationSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } protected void addNotify() { super.addNotify(); ! SortedSet<EmsNotification> notifications = emsBean.getNotifications(); ! Node[] newNodes = new Node[notifications.size()]; ! int i = 0; ! for (EmsNotification notification : notifications) { ! NotificationNode node = new NotificationNode(notification); ! newNodes[i++] = node; ! } ! add(newNodes); } } --- NotificationNameComparator.java DELETED --- Index: NotificationSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationSetNode.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NotificationSetNode.java 5 Oct 2004 05:15:56 -0000 1.6 --- NotificationSetNode.java 12 Apr 2006 19:13:52 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 34,47 **** public static final String NAME = "Notifications"; ! public NotificationSetNode() { ! super(new NotificationSetChildren()); ! setIconBase("org/mc4j/console/bean/notification/NotificationSetNodeIcon"); ! // Set FeatureDescriptor stuff: setName(NAME); // or, super.setName if needed setDisplayName(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("LBL_NotificationSetNode")); setShortDescription(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("DESCRIPTION_NotificationSetNode")); ! } --- 35,48 ---- public static final String NAME = "Notifications"; ! public NotificationSetNode(EmsBean emsBean) { ! super(new NotificationSetChildren(emsBean)); ! setIconBase("org/mc4j/console/bean/notification/NotificationSetNodeIcon"); ! // Set FeatureDescriptor stuff: setName(NAME); // or, super.setName if needed setDisplayName(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("LBL_NotificationSetNode")); setShortDescription(java.util.ResourceBundle.getBundle("org/mc4j/console/bean/notification/Bundle").getString("DESCRIPTION_NotificationSetNode")); ! } Index: NotificationNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/NotificationNode.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NotificationNode.java 5 Oct 2004 05:15:56 -0000 1.12 --- NotificationNode.java 12 Apr 2006 19:13:52 -0000 1.13 *************** *** 17,44 **** package org.mc4j.console.bean.notification; ! import java.beans.IntrospectionException; ! import java.io.Serializable; ! import java.util.Arrays; ! import java.util.Date; ! import java.util.Vector; ! ! import javax.management.AttributeChangeNotification; ! import javax.management.AttributeChangeNotificationFilter; ! import javax.management.InstanceNotFoundException; ! import javax.management.MBeanNotificationInfo; ! import javax.management.MBeanServer; ! import javax.management.MBeanServerNotification; ! import javax.management.Notification; ! import javax.management.NotificationFilter; ! import javax.management.NotificationListener; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import javax.management.ReflectionException; ! import javax.management.relation.MBeanServerNotificationFilter; ! ! import org.openide.ErrorManager; ! import org.openide.actions.CustomizeAction; import org.openide.nodes.AbstractNode; - import org.openide.nodes.BeanNode; import org.openide.nodes.Children; import org.openide.nodes.Node; --- 17,22 ---- package org.mc4j.console.bean.notification; ! import org.mc4j.ems.connection.bean.notification.EmsNotification; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; *************** *** 47,52 **** import org.openide.util.actions.SystemAction; - import org.mc4j.console.bean.notification.tracker.NotificationTracker; - /** * --- 25,28 ---- *************** *** 54,93 **** * @version $Revision$($Author$ / $Date$) */ ! public class NotificationNode extends AbstractNode { ! ! ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanNotificationInfo notificationInfo; ! protected NotificationListener listener; - /** - * @deprecated Just pass object name - * @param server - * @param objectInstance - * @param notificationInfo - */ - public NotificationNode(MBeanServer server, ObjectInstance objectInstance, MBeanNotificationInfo notificationInfo) { - this(server, objectInstance.getObjectName(), notificationInfo); - } ! public NotificationNode(MBeanServer server, ObjectName objectName, MBeanNotificationInfo notificationInfo) { super(new Children.Array()); ! ! this.server = server; ! this.notificationInfo = notificationInfo; ! this.objectName = objectName; ! ! setIconBase("org/mc4j/console/bean/notification/NotificationNodeNLIcon"); ! // Whatever is most relevant to a user: ! setDefaultAction(SystemAction.get(CustomizeAction.class)); ! // Set FeatureDescriptor stuff: ! setName(this.notificationInfo.getName()); // or, super.setName if needed ! setDisplayName(this.notificationInfo.getName()); //NbBundle.getMessage(NotificationNode.class, "LBL_node")); ! setShortDescription(Arrays.asList(this.notificationInfo.getNotifTypes()).toString()); ! } --- 30,45 ---- * @version $Revision$($Author$ / $Date$) */ ! public class NotificationNode extends AbstractNode implements Comparable { ! protected EmsNotification notification; ! public NotificationNode(EmsNotification notification) { super(new Children.Array()); + this.notification = notification; ! setName(notification.getName()); ! setDisplayName(notification.getName()); ! setShortDescription(notification.getDescription()); } *************** *** 107,110 **** --- 59,69 ---- public void toggleNotification() { + if (!notification.isListening()) + notification.startListening(); + else + notification.stopListening(); + } + + /* if (this.listener == null) { this.listener = new CustomNotificationListener(this); *************** *** 114,122 **** for(int i = 0; i < filters.length; i++) //for every filter available { ! this.server.addNotificationListener( ! this.objectName, ! this.listener, ! filters[i], ! null); } } catch (Exception e) { --- 73,81 ---- for(int i = 0; i < filters.length; i++) //for every filter available { ! this.server.addNotificationListener( ! this.objectName, ! this.listener, ! filters[i], ! null); } } catch (Exception e) { *************** *** 138,141 **** --- 97,101 ---- } } + */ /** *************** *** 147,151 **** * @return array of notification filters */ ! private NotificationFilter[] getNotificationFilters() { NotificationFilter [] result = new NotificationFilter[]{null}; --- 107,111 ---- * @return array of notification filters */ ! /*private NotificationFilter[] getNotificationFilters() { NotificationFilter [] result = new NotificationFilter[]{null}; *************** *** 153,157 **** try { ! Vector raw = new Vector(10); MBeanNotificationInfo [] notifyInfo = (MBeanNotificationInfo[]) server.getMBeanInfo(objectName).getNotifications(); for(int i = 0; i < notifyInfo.length && !uncrecognisedNotifiationFound; i++) --- 113,117 ---- try { ! Vector raw = new Vector(10); MBeanNotificationInfo [] notifyInfo = (MBeanNotificationInfo[]) server.getMBeanInfo(objectName).getNotifications(); for(int i = 0; i < notifyInfo.length && !uncrecognisedNotifiationFound; i++) *************** *** 159,199 **** if(notifyInfo[i].getName().equals(getName())) //fetch notification specific to this node... { ! String [] notifyTypes = notifyInfo[i].getNotifTypes(); ! ! NotificationFilter filter = null; ! for(int j = 0; j < notifyTypes.length && !uncrecognisedNotifiationFound; j++) ! { ! //TODO in the future add more filter support here, if nessesary.... ! if(notifyTypes[j].equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)) ! { ! filter = new AttributeChangeNotificationFilter(); ! ((AttributeChangeNotificationFilter) filter).enableAttribute(getName()); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.REGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.REGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.UNREGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else //unrecognised notification type, set filter to null.... ! { ! filter = null; ! uncrecognisedNotifiationFound = true; //break the loop... ! //once we have a null filter there is no point of ! //having any other filters as all of the notifications will have to be ! //coming through (in other words we don't know how to filer, so dont' filter at all). ! raw.removeAllElements(); ! } ! raw.add(filter); ! } ! } } if(raw.size() > 0) //do we have anything other than a default result? --- 119,159 ---- if(notifyInfo[i].getName().equals(getName())) //fetch notification specific to this node... { ! String [] notifyTypes = notifyInfo[i].getNotifTypes(); ! ! NotificationFilter filter = null; ! for(int j = 0; j < notifyTypes.length && !uncrecognisedNotifiationFound; j++) ! { ! //TODO in the future add more filter support here, if nessesary.... ! if(notifyTypes[j].equals(AttributeChangeNotification.ATTRIBUTE_CHANGE)) ! { ! filter = new AttributeChangeNotificationFilter(); ! ((AttributeChangeNotificationFilter) filter).enableAttribute(getName()); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.REGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.REGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else if(notifyTypes[j].equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) ! { ! filter = new MBeanServerNotificationFilter(); ! ((MBeanServerNotificationFilter) filter).disableAllTypes(); ! ((MBeanServerNotificationFilter) filter).enableType(MBeanServerNotification.UNREGISTRATION_NOTIFICATION); ! ((MBeanServerNotificationFilter) filter).enableAllObjectNames(); ! } ! else //unrecognised notification type, set filter to null.... ! { ! filter = null; ! uncrecognisedNotifiationFound = true; //break the loop... ! //once we have a null filter there is no point of ! //having any other filters as all of the notifications will have to be ! //coming through (in other words we don't know how to filer, so dont' filter at all). ! raw.removeAllElements(); ! } ! raw.add(filter); ! } ! } } if(raw.size() > 0) //do we have anything other than a default result? *************** *** 210,223 **** { //DO NOTHING object is not a Notification Broadcaster... ! } catch(InstanceNotFoundException e) { ErrorManager.getDefault().notify(e); ! } ! return result; } ! ! public static class CustomNotificationListener implements NotificationListener, Serializable { private transient NotificationNode notificationNode; --- 170,183 ---- { //DO NOTHING object is not a Notification Broadcaster... ! } catch(InstanceNotFoundException e) { ErrorManager.getDefault().notify(e); ! } ! return result; } ! */ ! /*public static class CustomNotificationListener implements EmsNotificationListener { private transient NotificationNode notificationNode; *************** *** 227,233 **** } ! public void handleNotification(Notification notification, Object obj) { ! //org.openide.windows.IOProvider.getDefault().getStdOut().println( ! // "Handling notification: " + notification); try { Node notifNode = new BeanNode(notification); --- 187,193 ---- } ! public void handleNotification(EmsNotificationEvent notification) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Handling notification: " + notification); try { Node notifNode = new BeanNode(notification); *************** *** 244,251 **** } ! public boolean isListening() { ! return (this.listener != null); } --- 204,211 ---- } ! */ public boolean isListening() { ! return this.notification.isListening(); } *************** *** 254,264 **** protected boolean enable(org.openide.nodes.Node[] nodes) { ! if ((nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (!((NotificationNode)nodes[0]).isListening())) { ! return true; ! } else { ! return false; ! } } public org.openide.util.HelpCtx getHelpCtx() { --- 214,220 ---- protected boolean enable(org.openide.nodes.Node[] nodes) { ! return (nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (!((NotificationNode) nodes[0]).isListening()); } public org.openide.util.HelpCtx getHelpCtx() { *************** *** 276,286 **** protected boolean enable(org.openide.nodes.Node[] nodes) { ! if ((nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (((NotificationNode)nodes[0]).isListening())) { ! return true; ! } else { ! return false; ! } } public org.openide.util.HelpCtx getHelpCtx() { --- 232,238 ---- protected boolean enable(org.openide.nodes.Node[] nodes) { ! return (nodes.length == 1) ! && (nodes[0] instanceof NotificationNode) ! && (((NotificationNode) nodes[0]).isListening()); } public org.openide.util.HelpCtx getHelpCtx() { *************** *** 296,298 **** --- 248,257 ---- + public int compareTo(Object o) { + Node otherNode = (Node) o; + return this.getDisplayName().compareTo(otherNode.getDisplayName()); + } + + + } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:29
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/chires/components/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/chires/components/log Added Files: LogView.java Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: LogView.java --- /* * Copyright 2002-2004 Greg Hinkle * * Licensed 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. */ package org.mc4j.chires.components.log; import org.mc4j.console.dashboard.components.BeanComponent; import org.mc4j.ems.connection.bean.EmsBean; import org.jdesktop.swing.JXTable; import java.util.Map; /** * @author Greg Hinkle (gh...@us...), Jan 31, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:15 $) */ public class LogView extends JXTable implements BeanComponent { // private void MBeanServer server; public void setBean(EmsBean emsBean) { // Map notificationNodes = emsBean.getNotificationNodeMap(); // for (Iterator iterator = notificationNodes.entrySet().iterator(); iterator.hasNext();) { // Map.Entry entry = (Map.Entry) iterator.next(); // String notificationName = (String) entry.getKey(); // NotificationNode notificationNode = (NotificationNode) entry.getValue(); // notificationNode.Li //} // this.server.addNotificationListener( // this.objectName, // this.listener, // filters[i], // null); } public void setContext(Map context) { } public void refresh() { } } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:29
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/jboss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/jboss Modified Files: JBoss_ServerInfo_Memory.xml JBoss_ServerInfoMBean.xml JBoss_WebTable.xml JBoss_System_Server_Control.xml JBoss_Web_Jetty.xml JBoss_MQ_TopicTable.xml JBoss_Web_JettyNew.xml JBoss_MQ_QueueTable.xml Added Files: JBoss_Deployments.xml Removed Files: JBoss_ServerDashboard.html JBoss_ServerDashboard.xml Log Message: Merging EMS into head for the 2.0 release work Index: JBoss_Web_JettyNew.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_Web_JettyNew.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JBoss_Web_JettyNew.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_Web_JettyNew.xml 12 Apr 2006 19:13:52 -0000 1.5 *************** *** 1,7 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> --- 1,7 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> *************** *** 9,13 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="^jboss.jetty:Server=0$"/> </BeanMatch> </DashboardMatch> --- 9,13 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.jetty:Server=0$"/> </BeanMatch> </DashboardMatch> *************** *** 20,24 **** <Constraint type="BorderConstraints" direction="NORTH"/> <LayoutManager type="java.awt.BorderLayout"/> ! <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> <Content> <Component type="javax.swing.JPanel"> --- 20,24 ---- <Constraint type="BorderConstraints" direction="NORTH"/> <LayoutManager type="java.awt.BorderLayout"/> ! <Border type="javax.swing.border.EmptyBorder" top="'2'" left="'5'" bottom="'2'" right="'5'"/> <Content> <Component type="javax.swing.JPanel"> *************** *** 29,41 **** <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="text" value="DashboardName"/> ! <Attribute name="font" value="(Literal)SansSerif bold 20"/> ! <Attribute name="foreground" value="(Literal)0x666666"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> ! <Attribute name="font" value="(Literal)DialogInput bold 14"/> ! <Attribute name="opaque" value="(Literal)false"/> ! <Attribute name="editable" value="(Literal)false"/> </Component> </Content> --- 29,41 ---- <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="text" value="DashboardName"/> ! <Attribute name="font" value="'SansSerif bold 20'"/> ! <Attribute name="foreground" value="'0x666666'"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> ! <Attribute name="font" value="'DialogInput bold 14'"/> ! <Attribute name="opaque" value="'false'"/> ! <Attribute name="editable" value="'false'"/> </Component> </Content> *************** *** 43,47 **** <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> ! <Attribute name="refreshDelay" value="(Literal)1000"/> </Component> </Content> --- 43,47 ---- <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> ! <Attribute name="refreshDelay" value="'1000'"/> </Component> </Content> *************** *** 51,58 **** <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Constraint type="BorderConstraints" direction="CENTER"/> --- 51,58 ---- <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Constraint type="BorderConstraints" direction="CENTER"/> *************** *** 63,110 **** <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Connection Information"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)connections"/> ! <Attribute name="attributeName" value="(Literal)connectionsOpen"/> ! <Attribute name="attributeName" value="(Literal)connectionsOpenMax"/> ! <Attribute name="attributeName" value="(Literal)connectionsRequestsAve"/> ! <Attribute name="attributeName" value="(Literal)connectionsRequestsMax"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)connectionsDurationAve"/> ! <Attribute name="attributeName" value="(Literal)connectionsDurationMax"/> </Component> </Content> </Component> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Requests Information"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)requests"/> ! <Attribute name="attributeName" value="(Literal)requestsActive"/> ! <Attribute name="attributeName" value="(Literal)requestsActiveMax"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)requestsDurationAve"/> ! <Attribute name="attributeName" value="(Literal)requestsDurationMax"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> --- 63,110 ---- <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Connection Information'"/> ! <Attribute name="background" value="'F'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'connections'"/> ! <Attribute name="attributeName" value="'connectionsOpen'"/> ! <Attribute name="attributeName" value="'connectionsOpenMax'"/> ! <Attribute name="attributeName" value="'connectionsRequestsAve'"/> ! <Attribute name="attributeName" value="'connectionsRequestsMax'"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'connectionsDurationAve'"/> ! <Attribute name="attributeName" value="'connectionsDurationMax'"/> </Component> </Content> </Component> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Requests Information'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'requests'"/> ! <Attribute name="attributeName" value="'requestsActive'"/> ! <Attribute name="attributeName" value="'requestsActiveMax'"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'requestsDurationAve'"/> ! <Attribute name="attributeName" value="'requestsDurationMax'"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="'VERTICAL_GLUE_SHAPE'"/> </Component> </Content> Index: JBoss_ServerInfoMBean.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_ServerInfoMBean.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JBoss_ServerInfoMBean.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_ServerInfoMBean.xml 12 Apr 2006 19:13:52 -0000 1.6 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,149 **** --> ! <Dashboard version="1.0" name="JBoss Server Info"> ! <Description>This dashboard displays basic information relating to the ! overall execution of a JBoss server.</Description> ! <DashboardMatch type="Global" location="/JBoss"> ! <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="jboss.system:type=ServerInfo"/> ! </BeanMatch> ! </DashboardMatch> - - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> - <Constraint type="BorderConstraints" direction="EAST"/> - <Attribute name="refreshDelay" value="(Literal)1000"/> - </Component> - </Content> - </Component> - - <Component type="javax.swing.JSplitPane"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="orientation" value="(Literal)HORIZONTAL_SPLIT"/> - <Attribute name="preferredSize" value="(Literal)400,300"/> - <Attribute name="minimumSize" value="(Literal)400,300"/> - <Attribute name="leftComponent"> - - <Component type="javax.swing.JScrollPane"> - <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="1" weightx="1" weighty="1" fill="BOTH"/> - <Content> - <Component type="org.mc4j.console.dashboard.components.AttributeListComponent"> - <Attribute name="beanNode" value="JBossServerInfoBean"/> - <!--Attribute name="MBeanNode" value="MBeanNode"/--> - <!--Attribute name="AttributeName" value="(Literal)BuildDate"/--> - <Attribute name="Label" value="(Literal)Server Information"/> - <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Border type="javax.swing.border.TitledBorder"> ! <Attribute name="title" value="(Literal)MBean Attributes"/> ! </Border> ! </Component> ! </Content> ! </Component> ! </Attribute> ! <Attribute name="rightComponent"> ! <Component type="javax.swing.JPanel"> ! ! <LayoutManager type="java.awt.GridBagLayout"/> ! ! <Content> ! <Component type="javax.swing.JPanel"> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="1" weightx="0.5" weighty="0.5" fill="BOTH"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="(Literal)150,150"/> ! <Attribute name="maxAttributeName" value="(Literal)MaxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)FreeMemory"/> ! <Attribute name="minimumSize" value="(Literal)50,50"/> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! ! </Component> ! </Content> ! </Component> ! <Component type="javax.swing.JPanel"> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="2" gridy="1" weightx="0.5" weighty="0.5" fill="BOTH"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="(Literal)150,150"/> ! <Attribute name="maxAttributeValue" value="(Literal)500"/> ! <Attribute name="currentAttributeName" value="(Literal)ActiveThreadCount"/> ! <Attribute name="minimumSize" value="(Literal)50,50"/> ! <Attribute name="label" value="(Literal)Active Threads"/> ! </Component> ! </Content> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="(Literal)100,100"/> ! <Attribute name="attributeName" value="(Literal)FreeMemory"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="2" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="attributeName" value="(Literal)ActiveThreadCount"/> ! ! </Component> ! ! ! ! </Content> ! </Component> ! ! </Attribute> ! ! </Component> ! ! <!-- List of methods to execute --> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Constraint type="BorderConstraints" direction="SOUTH"/> ! <Attribute name="format" value="(Literal)BUTTON_ONLY_FORMAT"/> ! ! <Border type="javax.swing.border.TitledBorder"> ! <Attribute name="title" value="(Literal)Server Actions"/> ! </Border> ! </Component> ! ! </Content> </Dashboard> --- 7,177 ---- --> ! <Dashboard version="2.0" name="JBoss Server Info" autoRefresh="true" refreshControl="true" standardHeader="true"> ! <Description>JBoss Application Server product details and general statistics.></Description> ! <DashboardMatch type="Global" location="/JBoss"> ! <BeanMatch id="serverInfo" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="jboss.system:type=ServerInfo"/> ! </BeanMatch> ! <BeanMatch id="server" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.system:type=Server$"/> ! </BeanMatch> ! <BeanMatch id="config" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.system:type=ServerConfig$"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="java.awt.BorderLayout"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! ! <Attribute name="html"> ! <![CDATA[ ! <img src="classpath://images/logos/jboss_logo.png"> ! ! <table cellpadding="6"> ! <tr> ! <td colspan="4"><font size="+2"><u>JBoss Version</u></font></td> ! </tr> ! <tr> ! <td align="right"><b>Version Name: </b></td> <td>${#server.VersionName}</td> ! <td align="right"><b>Built on: </b></td> <td>${#server.BuildDate}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Version: </b></td> <td colspan="3"> ${#server.Version}</td> ! </tr> ! <tr> ! <td colspan="4"> ! <font size="+2"><u>Installation Environment</u></font> ! </td> ! </tr> ! ! <tr> ! <td align="right"><b>Base Location (local): </b></td> <td colspan="2">${#config.ServerBaseDir}</td> ! </tr> ! <tr> ! <td align="right"><b>Base Location: </b></td> <td colspan="2">${#config.ServerBaseUrl}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Host: </b></td> <td>${#serverInfo.HostName} (${#serverInfo.HostAddress})</td> ! <td align="right"><b>Start date: </b></td> <td>${#server.StartDate}</td> ! </tr> ! ! <tr> ! <td align="right"><b>Running config: </b></td> <td>'${#config.ServerName}'</td> ! </tr> ! ! <tr> ! <td colspan="4"> ! <font size="+2"><u>Hardware</u></font> ! </td> ! <tr> ! ! <tr> ! <td align="right"><b>CPUs: </b></td> <td>${#serverInfo.AvailableProcessors}</td> ! <td align="right"><b>OS: </b></td> <td>${#serverInfo.OSName} ${#serverInfo.OSVersion} (${#serverInfo.OSArch})</td> ! </tr> ! ! <tr> ! <td colspan="4"> ! <font size="+2"><u>JVM Environment</u></font> ! </td> ! </tr> ! ! <tr> ! <td align="right"><b>Free Memory: </b></td> <td>${#serverInfo.FreeMemory / 1024 / 1024} MB</td> ! <td align="right"><b>Max Memory: </b></td> <td>${#serverInfo.MaxMemory / 1024 / 1024} MB</td> ! </tr> ! <tr> ! <td align="right"><b>Total Memory: </b></td> <td>${#serverInfo.TotalMemory / 1024 / 1024} MB</td> ! <td align="right"><b>#Threads: </b></td> <td>${#serverInfo.ActiveThreadCount}</td> ! </tr> ! ! <tr> ! <td align="right"><b>JVM Version: </b></td> <td>${#serverInfo.JavaVMVersion} ("${#serverInfo.JavaVMVendor}")</td> ! <td align="right"><b>JVM Name: </b></td> <td>${#serverInfo.JavaVMName}</td> ! </tr> ! </table> ! <br> ! ! <font size="+2"><u>Performance</u></font> ! <br> ! <table> ! <tr> ! <td colspan="2"><object classid="MemoryGraph" width="300" height="250"></object></td> ! <td colspan="2"><object classid="ThreadGraph" width="300" height="250"></object></td> ! </tr> ! </table> ! <br> ! ! <object classid="Operations"></object> ! ! ! ]]> ! </Attribute> ! ! <Content> ! ! <!-- ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="bean" value="#serverInfo"/> ! <Attribute name="preferredSize" value="'150,150'"/> ! <Attribute name="maxAttributeName" value="'MaxMemory'"/> ! <Attribute name="currentAttributeName" value="'FreeMemory'"/> ! <Attribute name="minimumSize" value="'50,50'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="'1000'"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="bean" value="#serverInfo"/> ! <Attribute name="preferredSize" value="'150,150'"/> ! <Attribute name="maxAttributeValue" value="'500'"/> ! <Attribute name="currentAttributeName" value="'ActiveThreadCount'"/> ! <Attribute name="minimumSize" value="'50,50'"/> ! <Attribute name="label" value="'Active Threads'"/> ! </Component> ! --> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph" id="MemoryGraph"> ! <Attribute name="chartTitle" value="'Memory Usage'"/> ! <Attribute name="preferredSize" value="'400,300'"/> ! ! <Attribute name="attribute" value="#serverInfo.getAttribute('FreeMemory')"/> ! </Component> ! ! <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph" id="ThreadGraph"> ! <Attribute name="chartTitle" value="'Active Threads'"/> ! <Attribute name="preferredSize" value="'400,300'"/> ! <Attribute name="attribute" value="#serverInfo.getAttribute('ActiveThreadCount')"/> ! </Component> ! ! ! <!-- List of methods to execute --> ! <Component type="org.mc4j.console.swing.SectionHolder" id="Operations"> ! <Attribute name="title" value="'Server Control'"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#server"/> ! ! <Attribute name="format" ! value="@org.mc4j.console.dashboard.components.OperationListComponent@BUTTON_ONLY_FORMAT"/> ! ! </Component> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#serverInfo"/> ! ! <Attribute name="format" ! value="@org.mc4j.console.dashboard.components.OperationListComponent@BUTTON_ONLY_FORMAT"/> ! ! </Component> ! </Content> ! </Component> ! ! </Content> ! </Component> ! </Content> </Dashboard> --- JBoss_ServerDashboard.html DELETED --- Index: JBoss_ServerInfo_Memory.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_ServerInfo_Memory.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JBoss_ServerInfo_Memory.xml 13 Oct 2004 04:52:45 -0000 1.5 --- JBoss_ServerInfo_Memory.xml 12 Apr 2006 19:13:52 -0000 1.6 *************** *** 1,12 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="JBoss Memory Meter"> ! <Description>This dashboard displays basic information relating to the ! overall execution of a JBoss server.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="jboss.system:type=ServerInfo"/> </BeanMatch> </DashboardMatch> --- 1,11 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Memory Meter" autoRefresh="false" refreshControl="false" standardHeader="true"> ! <Description>JBoss server memory usage.</Description> <DashboardMatch type="Global" location="/JBoss"> <BeanMatch id="JBossServerInfoBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="jboss.system:type=ServerInfo"/> </BeanMatch> </DashboardMatch> *************** *** 19,67 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="maxAttributeName" value="(Literal)MaxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)FreeMemory"/> ! <!--<Attribute name="minimumSize" value="(Literal)50,50"/>--> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! <Attribute name="warningPoint" value="(Literal)0.2"/> ! <Attribute name="criticalPoint" value="(Literal)0.05"/> ! <Attribute name="title" value="(Literal)Available Memory"/> ! <Attribute name="units" value="(Literal)bytes"/> ! </Component> ! </Content> </Dashboard> --- 18,37 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> + <!-- TODO: This component is broken. For some reason it pegs the cpu <Component type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="bean" value="#JBossServerInfoBean"/> ! <Attribute name="maxAttributeName" value="'MaxMemory'"/> ! <Attribute name="currentAttributeName" value="'FreeMemory'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="1000"/> ! <Attribute name="warningPoint" value="0.2"/> ! <Attribute name="criticalPoint" value="0.05"/> ! <Attribute name="title" value="'Available Memory'"/> ! <Attribute name="units" value="'bytes'"/> </Component> ! --> ! </Content> </Dashboard> Index: JBoss_Web_Jetty.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_Web_Jetty.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JBoss_Web_Jetty.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_Web_Jetty.xml 12 Apr 2006 19:13:52 -0000 1.5 *************** *** 1,7 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> --- 1,7 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="JBoss Jetty Statistics"> <Description>This dashboard shows the statistics of a Jetty servlet context.</Description> *************** *** 9,13 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="^jboss.web:Jetty=0$"/> </BeanMatch> </DashboardMatch> --- 9,13 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="Jetty" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="^jboss.web:Jetty=0$"/> </BeanMatch> </DashboardMatch> *************** *** 20,24 **** <Constraint type="BorderConstraints" direction="NORTH"/> <LayoutManager type="java.awt.BorderLayout"/> ! <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> <Content> <Component type="javax.swing.JPanel"> --- 20,24 ---- <Constraint type="BorderConstraints" direction="NORTH"/> <LayoutManager type="java.awt.BorderLayout"/> ! <Border type="javax.swing.border.EmptyBorder" top="'2'" left="'5'" bottom="'2'" right="'5'"/> <Content> <Component type="javax.swing.JPanel"> *************** *** 29,41 **** <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="text" value="DashboardName"/> ! <Attribute name="font" value="(Literal)SansSerif bold 20"/> ! <Attribute name="foreground" value="(Literal)0x666666"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> ! <Attribute name="font" value="(Literal)DialogInput bold 14"/> ! <Attribute name="opaque" value="(Literal)false"/> ! <Attribute name="editable" value="(Literal)false"/> </Component> </Content> --- 29,41 ---- <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="text" value="DashboardName"/> ! <Attribute name="font" value="'SansSerif bold 20'"/> ! <Attribute name="foreground" value="'0x666666'"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> ! <Attribute name="font" value="'DialogInput bold 14'"/> ! <Attribute name="opaque" value="'false'"/> ! <Attribute name="editable" value="'false'"/> </Component> </Content> *************** *** 43,47 **** <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> ! <Attribute name="refreshDelay" value="(Literal)1000"/> </Component> </Content> --- 43,47 ---- <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> ! <Attribute name="refreshDelay" value="'1000'"/> </Component> </Content> *************** *** 51,58 **** <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Constraint type="BorderConstraints" direction="CENTER"/> --- 51,58 ---- <!-- *** Scroll pane of info *** --> <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Content> <Component type="javax.swing.JPanel"> ! <Attribute name="background" value="'0xFFFFFF'"/> <Constraint type="BorderConstraints" direction="CENTER"/> *************** *** 63,110 **** <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Connection Information"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)connections"/> ! <Attribute name="attributeName" value="(Literal)connectionsOpen"/> ! <Attribute name="attributeName" value="(Literal)connectionsOpenMax"/> ! <Attribute name="attributeName" value="(Literal)connectionsRequestsAve"/> ! <Attribute name="attributeName" value="(Literal)connectionsRequestsMax"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)connectionsDurationAve"/> ! <Attribute name="attributeName" value="(Literal)connectionsDurationMax"/> </Component> </Content> </Component> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Requests Information"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)requests"/> ! <Attribute name="attributeName" value="(Literal)requestsActive"/> ! <Attribute name="attributeName" value="(Literal)requestsActiveMax"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="Jetty"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)requestsDurationAve"/> ! <Attribute name="attributeName" value="(Literal)requestsDurationMax"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> --- 63,110 ---- <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Connection Information'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'connections'"/> ! <Attribute name="attributeName" value="'connectionsOpen'"/> ! <Attribute name="attributeName" value="'connectionsOpenMax'"/> ! <Attribute name="attributeName" value="'connectionsRequestsAve'"/> ! <Attribute name="attributeName" value="'connectionsRequestsMax'"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'connectionsDurationAve'"/> ! <Attribute name="attributeName" value="'connectionsDurationMax'"/> </Component> </Content> </Component> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Requests Information'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="2"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'requests'"/> ! <Attribute name="attributeName" value="'requestsActive'"/> ! <Attribute name="attributeName" value="'requestsActiveMax'"/> </Component> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#Jetty"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'requestsDurationAve'"/> ! <Attribute name="attributeName" value="'requestsDurationMax'"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="'VERTICAL_GLUE_SHAPE'"/> </Component> </Content> Index: JBoss_WebTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_WebTable.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JBoss_WebTable.xml 16 Apr 2004 15:49:47 -0000 1.4 --- JBoss_WebTable.xml 12 Apr 2006 19:13:52 -0000 1.5 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="Web Component Statistics"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="Web Component Statistics"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="VHostList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="vhost=localhost"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/JBoss/Web" > <BeanMatch id="VHostList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="vhost=localhost"/> </BeanMatch> </DashboardMatch> *************** *** 14,66 **** <LayoutManager type="java.awt.BorderLayout"/> <Content> - - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> - <Constraint type="BorderConstraints" direction="EAST"/> - <Attribute name="refreshDelay" value="(Literal)1000"/> - </Component> - </Content> - </Component> - - <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> <Attribute name="beanList" value="VHostList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)vhost"/> ! <Attribute name="AttributeName" value="(Literal)context"/> ! <Attribute name="AttributeName" value="(Literal)Name"/> ! <Attribute name="AttributeName" value="(Literal)RequestCount"/> ! <Attribute name="AttributeName" value="(Literal)MinTime"/> ! <Attribute name="AttributeName" value="(Literal)MaxTime"/> ! <Attribute name="AttributeName" value="(Literal)ProcessingTime"/> ! <Attribute name="AttributeName" value="(Literal)ErrorCount"/> --- 14,32 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> <Attribute name="beanList" value="VHostList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'vhost'"/> ! <Attribute name="AttributeName" value="'context'"/> ! <Attribute name="AttributeName" value="'Name'"/> ! <Attribute name="AttributeName" value="'RequestCount'"/> ! <Attribute name="AttributeName" value="'MinTime'"/> ! <Attribute name="AttributeName" value="'MaxTime'"/> ! <Attribute name="AttributeName" value="'ProcessingTime'"/> ! <Attribute name="AttributeName" value="'ErrorCount'"/> Index: JBoss_MQ_QueueTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_MQ_QueueTable.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JBoss_MQ_QueueTable.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_MQ_QueueTable.xml 12 Apr 2006 19:13:52 -0000 1.6 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="MQ Queue Statistics"> <Description>This dashboard shows the statistics of a MQ Queues.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> ! <Dashboard version="2.0" name="MQ Queue Statistics" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>This dashboard shows the statistics of a MQ Queues.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="service=Queue"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/JBoss/MQ"> <BeanMatch id="QueueBeanList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="service=Queue"/> </BeanMatch> </DashboardMatch> *************** *** 15,66 **** <Content> - <!-- *** The header section displays title and a refresh control *** --> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="NORTH"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Border type="javax.swing.border.EmptyBorder" top="(Literal)2" left="(Literal)5" bottom="(Literal)2" right="(Literal)5"/> - <Content> - <Component type="javax.swing.JPanel"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <LayoutManager type="java.awt.BorderLayout"/> - <Content> - <Component type="javax.swing.JLabel" id="titleLable"> - <Constraint type="BorderConstraints" direction="CENTER"/> - <Attribute name="text" value="DashboardName"/> - <Attribute name="font" value="(Literal)SansSerif bold 20"/> - <Attribute name="foreground" value="(Literal)0x666666"/> - </Component> - <Component type="javax.swing.JTextArea"> - <Constraint type="BorderConstraints" direction="SOUTH"/> - <Attribute name="text" value="DashboardDescription"/> - <Attribute name="font" value="(Literal)DialogInput bold 14"/> - <Attribute name="opaque" value="(Literal)false"/> - <Attribute name="editable" value="(Literal)false"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> - <Constraint type="BorderConstraints" direction="EAST"/> - <Attribute name="refreshDelay" value="(Literal)1000"/> - </Component> - </Content> - </Component> - <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> ! <Attribute name="beanList" value="QueueBeanList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)name"/> ! <Attribute name="AttributeName" value="(Literal)JNDIName"/> ! <Attribute name="AttributeName" value="(Literal)StateString"/> ! <Attribute name="AttributeName" value="(Literal)QueueName"/> ! <Attribute name="AttributeName" value="(Literal)ReceiversCount"/> </Component> --- 15,34 ---- <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> ! <Attribute name="beanList" value="#QueueBeanList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="preferredSize" value="'100,100'"/> ! <Attribute name="AttributeName" value="'name'"/> ! <Attribute name="AttributeName" value="'JNDIName'"/> ! <Attribute name="AttributeName" value="'StateString'"/> ! <Attribute name="AttributeName" value="'QueueName'"/> ! <Attribute name="AttributeName" value="'ReceiversCount'"/> </Component> Index: JBoss_MQ_TopicTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jboss/JBoss_MQ_TopicTable.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JBoss_MQ_TopicTable.xml 16 Apr 2004 15:49:47 -0000 1.5 --- JBoss_MQ_TopicTable.xml 12 Apr 2006 19:13:52 -0000 1.6 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> ! <Dashboard version="1.0" name="MQ Topic Statistics">... [truncated message content] |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:28
|
Update of /cvsroot/mc4j/mc4j/dist/org/mc4j/console/Windows2/Modes/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/dist/org/mc4j/console/Windows2/Modes/properties Removed Files: properties.wstcref Log Message: Merging EMS into head for the 2.0 release work --- properties.wstcref DELETED --- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:27
|
Update of /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/branding/bundle/org/netbeans/core/resources Modified Files: splash.gif Log Message: Merging EMS into head for the 2.0 release work Index: splash.gif =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/resources/splash.gif,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvsauYfEB and /tmp/cvswoxLwR differ |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:23
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/execution In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/operation/execution Modified Files: ExecutionNode.java Log Message: Merging EMS into head for the 2.0 release work Index: ExecutionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/execution/ExecutionNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ExecutionNode.java 5 Oct 2004 05:15:56 -0000 1.9 --- ExecutionNode.java 12 Apr 2006 19:14:15 -0000 1.10 *************** *** 17,39 **** package org.mc4j.console.bean.operation.execution; ! import java.util.HashMap; ! import java.util.Map; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanParameterInfo; ! import org.openide.ErrorManager; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.AbstractNode; ! import org.openide.nodes.Children; ! import org.openide.nodes.Node; ! import org.openide.nodes.PropertySupport; ! import org.openide.nodes.Sheet; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import org.mc4j.console.bean.MBeanNode; /** --- 17,34 ---- package org.mc4j.console.bean.operation.execution; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.mc4j.ems.connection.bean.parameter.EmsParameter; import org.openide.ErrorManager; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.*; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import java.util.HashMap; ! import java.util.List; ! import java.util.Map; /** *************** *** 45,70 **** public class ExecutionNode extends AbstractNode { ! private MBeanOperationInfo operationInfo; private Map parameterValues; ! public ExecutionNode(MBeanOperationInfo operationInfo) { super(Children.LEAF); ! this.operationInfo = operationInfo; this.parameterValues = new HashMap(); setIconBase("org/mc4j/console/bean/operation/execution/ExecutionNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operationInfo.getName()); // or, super.setName if needed setDisplayName(NbBundle.getMessage(ExecutionNode.class, "LBL_node")); setShortDescription(NbBundle.getMessage(ExecutionNode.class, "HINT_node")); - // Add cookies, e.g.: - /* - getCookieSet().add(new OpenCookie() { - public void open() { - // Open something useful... - } - }); - */ } --- 40,57 ---- public class ExecutionNode extends AbstractNode { ! private EmsOperation operation; private Map parameterValues; ! public ExecutionNode(EmsOperation operation) { super(Children.LEAF); ! this.operation = operation; this.parameterValues = new HashMap(); setIconBase("org/mc4j/console/bean/operation/execution/ExecutionNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operation.getName()); // or, super.setName if needed setDisplayName(NbBundle.getMessage(ExecutionNode.class, "LBL_node")); setShortDescription(NbBundle.getMessage(ExecutionNode.class, "HINT_node")); } *************** *** 72,85 **** protected SystemAction[] createActions() { return new SystemAction[] { - // SystemAction.get(MyFavoriteAction.class), - // null, // separator - /* according to what it can do: - SystemAction.get(CutAction.class), - SystemAction.get(CopyAction.class), - null, - SystemAction.get(DeleteAction.class), - SystemAction.get(RenameAction.class), - null, - */ SystemAction.get(ToolsAction.class), null, --- 59,62 ---- *************** *** 90,106 **** public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; - // When you have help, change to: - // return new HelpCtx(ExecutionNode.class); } - // RECOMMENDED - handle cloning specially (so as not to invoke the overhead of FilterNode): - /* - public Node cloneNode() { - // Try to pass in similar constructor params to what you originally got: - return new ExecutionNode(); - } - */ - - // Create a property sheet: //protected Sheet createSheet() { --- 67,72 ---- *************** *** 111,123 **** //sheet.put(props); return new Node.PropertySet[] { props }; - // - // - // sheet.get(Sheet.PROPERTIES); // get by name, not display name - // if (props == null) { - // props = Sheet.createPropertiesSet(); - // sheet.put(props); - // } - // props.put(new MyProp(someParams)); - // return sheet; } --- 77,80 ---- *************** *** 130,160 **** //org.openide.windows.IOProvider.getDefault().getStdOut().println("Building params for: " + this.operationInfo.getName()); ! MBeanParameterInfo[] params = this.operationInfo.getSignature(); ! for (int i = 0; i < params.length; i++) { ! final MBeanParameterInfo parameterInfo = params[i]; - Class type = null; ! try { ! type = MBeanNode.findType( ! parameterInfo.getType()); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); } final Class type2 = type; ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("\t type is: " + type); props.put( new PropertySupport.ReadWrite( ! parameterInfo.getName(), type, ! parameterInfo.getName(), ! parameterInfo.getDescription()) { public Object getValue() { ! ! Object value = parameterValues.get(parameterInfo.getName()); // Specially handle booleans by defualting them to null if ((type2.equals(Boolean.TYPE)) --- 87,115 ---- //org.openide.windows.IOProvider.getDefault().getStdOut().println("Building params for: " + this.operationInfo.getName()); ! List<EmsParameter> params = this.operation.getParameters(); ! for (final EmsParameter parameter : params) { Class type = null; ! try { ! type = MBeanNode.findType( ! parameter.getType()); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); } final Class type2 = type; ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("\t type is: " + type); props.put( new PropertySupport.ReadWrite( ! parameter.getName(), type, ! parameter.getName(), ! parameter.getDescription()) { public Object getValue() { ! ! Object value = parameterValues.get(parameter.getName()); // Specially handle booleans by defualting them to null if ((type2.equals(Boolean.TYPE)) *************** *** 166,170 **** public void setValue(Object value) { ! parameterValues.put(parameterInfo.getName(), value); } }); --- 121,125 ---- public void setValue(Object value) { ! parameterValues.put(parameter.getName(), value); } }); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:22
|
Update of /cvsroot/mc4j/mc4j/dist/org/mc4j/console/Windows2/Modes/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/dist/org/mc4j/console/Windows2/Modes/editor Removed Files: welcomepanel.wstcref Log Message: Merging EMS into head for the 2.0 release work --- welcomepanel.wstcref DELETED --- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:21
|
Update of /cvsroot/mc4j/mc4j/application/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/images Removed Files: splash.psd Log Message: Merging EMS into head for the 2.0 release work --- splash.psd DELETED --- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:21
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/query In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/query Modified Files: QueryNode.java Log Message: Merging EMS into head for the 2.0 release work Index: QueryNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/query/QueryNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** QueryNode.java 7 Jan 2005 05:08:49 -0000 1.11 --- QueryNode.java 12 Apr 2006 19:14:15 -0000 1.12 *************** *** 19,47 **** import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.ConnectionNode; - import org.mc4j.console.mejb.MBeanFilterNode; import org.openide.ErrorManager; - import org.openide.awt.StatusDisplayer; import org.openide.actions.OpenLocalExplorerAction; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.nodes.AbstractNode; ! import org.openide.nodes.Children; ! import org.openide.nodes.Node; ! import org.openide.nodes.PropertySupport; ! import org.openide.nodes.Sheet; ! import org.openide.nodes.FilterNode; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import javax.management.MBeanServer; ! import javax.management.MalformedObjectNameException; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import java.lang.reflect.InvocationTargetException; import java.util.Iterator; - import java.util.Set; import java.util.List; ! import java.util.ArrayList; import java.util.regex.Pattern; --- 19,36 ---- import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.ConnectionNode; import org.openide.ErrorManager; import org.openide.actions.OpenLocalExplorerAction; import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; ! import org.openide.awt.StatusDisplayer; ! import org.openide.nodes.*; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; ! import java.util.ArrayList; import java.util.Iterator; import java.util.List; ! import java.util.Set; import java.util.regex.Pattern; *************** *** 102,106 **** Object obj = iter.next(); MBeanNode mBeanNode = (MBeanNode) obj; ! String canonicalName = mBeanNode.getObjectName().getCanonicalName(); StatusDisplayer.getDefault().setStatusText("Searching MBean [" + i++ + " of " + list.size() + "]"); --- 91,95 ---- Object obj = iter.next(); MBeanNode mBeanNode = (MBeanNode) obj; ! String canonicalName = mBeanNode.getEmsBean().getBeanName().getCanonicalName(); StatusDisplayer.getDefault().setStatusText("Searching MBean [" + i++ + " of " + list.size() + "]"); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:21
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/domain In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/domain Modified Files: DomainNode.java Log Message: Merging EMS into head for the 2.0 release work Index: DomainNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/domain/DomainNode.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** DomainNode.java 5 Oct 2004 05:16:01 -0000 1.18 --- DomainNode.java 12 Apr 2006 19:14:16 -0000 1.19 *************** *** 19,22 **** --- 19,23 ---- import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.install.ExplorerUtil; + import org.mc4j.ems.connection.bean.EmsBeanName; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; *************** *** 26,44 **** import org.openide.util.actions.SystemAction; - import javax.management.ObjectName; import java.io.IOException; ! import java.util.ArrayList; ! import java.util.Collections; ! import java.util.Comparator; ! import java.util.Date; ! import java.util.Enumeration; ! import java.util.HashMap; ! import java.util.HashSet; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.TreeMap; /** --- 27,32 ---- import org.openide.util.actions.SystemAction; import java.io.IOException; ! import java.util.*; /** *************** *** 108,114 **** MBeanNode beanNode = (MBeanNode) obj; ! ObjectName objectName = beanNode.getObjectName(); ! Hashtable props = objectName.getKeyPropertyList(); for (Iterator propsIterator = props.entrySet().iterator(); propsIterator.hasNext();) { Map.Entry entry = (Map.Entry) propsIterator.next(); --- 96,102 ---- MBeanNode beanNode = (MBeanNode) obj; ! EmsBeanName objectName = beanNode.getEmsBean().getBeanName(); ! Map<String,String> props = objectName.getKeyProperties(); for (Iterator propsIterator = props.entrySet().iterator(); propsIterator.hasNext();) { Map.Entry entry = (Map.Entry) propsIterator.next(); *************** *** 163,167 **** MBeanNode beanNode = (MBeanNode) listIterator.next(); if (!categorized.contains(beanNode)) { ! String significantValueMapKey = key + "=" + beanNode.getObjectName().getKeyProperty(key); List list = (List) resultMap.get(significantValueMapKey); if (list == null) { --- 151,155 ---- MBeanNode beanNode = (MBeanNode) listIterator.next(); if (!categorized.contains(beanNode)) { ! String significantValueMapKey = key + "=" + beanNode.getEmsBean().getBeanName().getKeyProperty(key); List list = (List) resultMap.get(significantValueMapKey); if (list == null) { *************** *** 310,314 **** if (childNode instanceof MBeanNode) { MBeanNode beanNode = (MBeanNode) childNode; //node to insert ! Hashtable props = beanNode.getObjectName().getKeyPropertyList(); //get properties that will be used to extract keys Children children = node.getChildren(); //get the nodes that are already part of the domain --- 298,302 ---- if (childNode instanceof MBeanNode) { MBeanNode beanNode = (MBeanNode) childNode; //node to insert ! Map<String,String> props = beanNode.getEmsBean().getBeanName().getKeyProperties(); //get properties that will be used to extract keys Children children = node.getChildren(); //get the nodes that are already part of the domain |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:21
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/websphere In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/websphere Modified Files: WebSphere_ServerDashboard.xml Log Message: Merging EMS into head for the 2.0 release work Index: WebSphere_ServerDashboard.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/websphere/WebSphere_ServerDashboard.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WebSphere_ServerDashboard.xml 19 Jan 2005 14:17:02 -0000 1.1 --- WebSphere_ServerDashboard.xml 12 Apr 2006 19:14:16 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,11 **** --> ! <Dashboard version="1.0" name="JBoss Server Dashboard"> <Description>This dashboard displays basic information relating to the overall execution of a WebSphere server.</Description> --- 7,11 ---- --> ! <Dashboard version="2.0" name="JBoss Server Dashboard"> <Description>This dashboard displays basic information relating to the overall execution of a WebSphere server.</Description> *************** *** 27,32 **** <BeanMatch id="ServerBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameCondition" filter="type=Server"/> </BeanMatch> --- 27,32 ---- <BeanMatch id="ServerBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Server"/> </BeanMatch> *************** *** 46,51 **** --> <BeanMatch id="JVMBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameCondition" filter="type=JVM"/> </BeanMatch> --- 46,51 ---- --> <BeanMatch id="JVMBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="WebSphere:"/> ! <Condition type="BeanObjectNameRegexCondition" filter="type=JVM"/> </BeanMatch> *************** *** 56,60 **** <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="(Literal)WebSphere/WebSphere_ServerDashboard.html"/> <Content> --- 56,60 ---- <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="'WebSphere/WebSphere_ServerDashboard.html'"/> <Content> *************** *** 67,81 **** <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="beanNode" value="JVMBean"/> ! <Attribute name="maxAttributeName" value="(Literal)heapSize"/> ! <Attribute name="currentAttributeName" value="(Literal)freeMemory"/> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! <Attribute name="warningPoint" value="(Literal)0.15"/> ! <Attribute name="criticalPoint" value="(Literal)0.05"/> ! <Attribute name="title" value="(Literal)Available Memory"/> ! <Attribute name="units" value="(Literal)MB"/> ! <Attribute name="opaque" value="(Literal)false"/> ! <Attribute name="unitConverter" value="(Literal)org.mc4j.console.util.unit.ByteToMegaByteConverter"/> </Component> --> --- 67,81 ---- <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="bean" value="#JVMBean"/> ! <Attribute name="maxAttributeName" value="'heapSize'"/> ! <Attribute name="currentAttributeName" value="'freeMemory'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="'1000'"/> ! <Attribute name="warningPoint" value="'0.15'"/> ! <Attribute name="criticalPoint" value="'0.05'"/> ! <Attribute name="title" value="'Available Memory'"/> ! <Attribute name="units" value="'MB'"/> ! <Attribute name="opaque" value="'false'"/> ! <Attribute name="unitConverter" value="'org.mc4j.console.util.unit.ByteToMegaByteConverter'"/> </Component> --> *************** *** 83,93 **** <!-- <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="(Literal)150,150"/> ! <Attribute name="maxAttributeName" value="(Literal)MaxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)FreeMemory"/> ! <Attribute name="minimumSize" value="(Literal)50,50"/> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> </Component> --- 83,93 ---- <!-- <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeMeter"> ! <Attribute name="bean" value="#JBossServerInfoBean"/> ! <Attribute name="preferredSize" value="'150,150'"/> ! <Attribute name="maxAttributeName" value="'MaxMemory'"/> ! <Attribute name="currentAttributeName" value="'FreeMemory'"/> ! <Attribute name="minimumSize" value="'50,50'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="'0'"/> </Component> *************** *** 95,102 **** <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="(Literal)100,100"/> ! <Attribute name="attributeName" value="(Literal)FreeMemory"/> </Component> --> --- 95,102 ---- <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#JBossServerInfoBean"/> <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="'100,100'"/> ! <Attribute name="attributeName" value="'FreeMemory'"/> </Component> --> |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/proxy Modified Files: JSR77ManagementMBeanServerProxy.java JMXRemotingMBeanServerProxy.java Mx4jMBeanServerProxy.java Removed Files: GenericMBeanServerProxy.java Log Message: Merging EMS into head for the 2.0 release work --- GenericMBeanServerProxy.java DELETED --- Index: JSR77ManagementMBeanServerProxy.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/proxy/JSR77ManagementMBeanServerProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JSR77ManagementMBeanServerProxy.java 15 Jan 2005 03:48:06 -0000 1.1 --- JSR77ManagementMBeanServerProxy.java 12 Apr 2006 19:14:14 -0000 1.2 *************** *** 52,56 **** SwingUtility.eventThreadAlert(); ! ConnectionInfoAction.addHit(); Class serverClass = Management.class; // this.remoteServer.getClass(); --- 52,56 ---- SwingUtility.eventThreadAlert(); ! // ConnectionInfoAction.addHit(); Class serverClass = Management.class; // this.remoteServer.getClass(); Index: JMXRemotingMBeanServerProxy.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/proxy/JMXRemotingMBeanServerProxy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JMXRemotingMBeanServerProxy.java 5 Oct 2004 05:15:59 -0000 1.7 --- JMXRemotingMBeanServerProxy.java 12 Apr 2006 19:14:14 -0000 1.8 *************** *** 51,55 **** SwingUtility.eventThreadAlert(); ! ConnectionInfoAction.addHit(); Class serverClass = MBeanServerConnection.class; // this.remoteServer.getClass(); --- 51,55 ---- SwingUtility.eventThreadAlert(); ! // ConnectionInfoAction.addHit(); Class serverClass = MBeanServerConnection.class; // this.remoteServer.getClass(); Index: Mx4jMBeanServerProxy.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/proxy/Mx4jMBeanServerProxy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Mx4jMBeanServerProxy.java 5 Oct 2004 05:15:59 -0000 1.7 --- Mx4jMBeanServerProxy.java 12 Apr 2006 19:14:14 -0000 1.8 *************** *** 54,58 **** SwingUtility.eventThreadAlert(); ! ConnectionInfoAction.addHit(); Class serverClass = RemoteMBeanServer.class; // this.remoteServer.getClass(); --- 54,58 ---- SwingUtility.eventThreadAlert(); ! // ConnectionInfoAction.addHit(); Class serverClass = RemoteMBeanServer.class; // this.remoteServer.getClass(); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:20
|
Update of /cvsroot/mc4j/mc4j/application/dist/org/mc4j/console/Windows2/Modes/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dist/org/mc4j/console/Windows2/Modes/editor Added Files: welcomepanel.wstcref Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: welcomepanel.wstcref --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE tc-ref PUBLIC "-//NetBeans//DTD Top Component in Mode Properties 2.0//EN" "http://www.netbeans.org/dtds/tc-ref2_0.dtd"> <tc-ref version="2.0"> <module name="org.mc4j.console" spec="1.3" /> <tc-id id="welcomepanel" /> <state opened="true" /> </tc-ref> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:20
|
Update of /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/branding/bundle/org/netbeans/core/ui Added Files: Bundle_mc4j.properties Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: Bundle_mc4j.properties --- LBL_ProductInformation=MC4J Management Console |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:20
|
Update of /cvsroot/mc4j/mc4j/dist/org/mc4j/console/Windows2/Modes/output In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/dist/org/mc4j/console/Windows2/Modes/output Removed Files: output.wstcref Log Message: Merging EMS into head for the 2.0 release work --- output.wstcref DELETED --- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:20
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/geronimo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/geronimo Modified Files: Geronimo_ServerInfo.html Geronimo_ServerInfo.xml Log Message: Merging EMS into head for the 2.0 release work Index: Geronimo_ServerInfo.html =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/geronimo/Geronimo_ServerInfo.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Geronimo_ServerInfo.html 13 Oct 2004 04:52:45 -0000 1.1 --- Geronimo_ServerInfo.html 12 Apr 2006 19:14:14 -0000 1.2 *************** *** 1,4 **** --- 1,9 ---- <html> + <head> + <style type="text/css"> + + </style> + </head> <body style="margin: 0px"> Index: Geronimo_ServerInfo.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/geronimo/Geronimo_ServerInfo.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Geronimo_ServerInfo.xml 13 Oct 2004 04:52:45 -0000 1.1 --- Geronimo_ServerInfo.xml 12 Apr 2006 19:14:14 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.sourceforge.net/Dashboard_1_0.dtd"> <!-- --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 7,11 **** --> ! <Dashboard version="1.0" name="Geronimo Server Info"> <Description>This dashboard displays basic information relating to the overall execution of a Geronimo server.</Description> --- 7,11 ---- --> ! <Dashboard version="2.0" name="Geronimo Server Info" standardHeader="true" refreshControl="true"> <Description>This dashboard displays basic information relating to the overall execution of a Geronimo server.</Description> *************** *** 15,19 **** <BeanMatch id="GeronimoJ2EEServer" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=J2EEServer"/> </BeanMatch> --- 15,19 ---- <BeanMatch id="GeronimoJ2EEServer" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=J2EEServer"/> </BeanMatch> *************** *** 21,30 **** <BeanMatch id="JVM" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=JVM"/> </BeanMatch> <BeanMatch id="GeronimoSystemInfo" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="geronimo.system:role=ServerInfo"/> </BeanMatch> --- 21,30 ---- <BeanMatch id="JVM" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=JVM"/> </BeanMatch> <BeanMatch id="GeronimoSystemInfo" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="geronimo.system:role=ServerInfo"/> </BeanMatch> *************** *** 36,40 **** <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="(Literal)Geronimo/Geronimo_ServerInfo.html"/> <Content> --- 36,40 ---- <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="'Geronimo/Geronimo_ServerInfo.html'"/> <Content> *************** *** 44,58 **** <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="beanNode" value="JVM"/> ! <Attribute name="maxAttributeName" value="(Literal)maxMemory"/> ! <Attribute name="currentAttributeName" value="(Literal)freeMemory"/> ! <Attribute name="label" value="(Literal)Free Memory"/> ! <Attribute name="updateInterval" value="(Literal)1000"/> ! <Attribute name="warningPoint" value="(Literal)0.15"/> ! <Attribute name="criticalPoint" value="(Literal)0.05"/> ! <Attribute name="title" value="(Literal)Available Memory"/> ! <Attribute name="units" value="(Literal)MB"/> ! <Attribute name="opaque" value="(Literal)false"/> ! <Attribute name="unitConverter" value="(Literal)org.mc4j.console.util.unit.ByteToMegaByteConverter"/> </Component> --- 44,58 ---- <Component id="memoryMeter" type="org.mc4j.console.dashboard.components.NumericAttributeGaugeMeter"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="bean" value="#JVM"/> ! <Attribute name="maxAttributeName" value="'maxMemory'"/> ! <Attribute name="currentAttributeName" value="'freeMemory'"/> ! <Attribute name="label" value="'Free Memory'"/> ! <Attribute name="updateInterval" value="'1000'"/> ! <Attribute name="warningPoint" value="'0.15'"/> ! <Attribute name="criticalPoint" value="'0.05'"/> ! <Attribute name="title" value="'Available Memory'"/> ! <Attribute name="units" value="'MB'"/> ! <Attribute name="opaque" value="'false'"/> ! <Attribute name="unitConverter" value="'org.mc4j.console.util.unit.ByteToMegaByteConverter'"/> </Component> *************** *** 60,67 **** <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="JBossServerInfoBean"/> <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="(Literal)100,100"/> ! <Attribute name="attributeName" value="(Literal)FreeMemory"/> </Component> --> --- 60,67 ---- <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#JBossServerInfoBean"/> <Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2" widthx="2" weightx="0.5" weighty="0.5" fill="BOTH" insets="3,3,3,3"/> ! <Attribute name="preferredSize" value="'100,100'"/> ! <Attribute name="attributeName" value="'FreeMemory'"/> </Component> --> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:19
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/hibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/hibernate Added Files: Hibernate_Overview.xml Hibernate_EntitiesTable.xml Hibernate_QueriesTable.xml Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: Hibernate_EntitiesTable.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Hibernate Entity Statistics" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>This dashboard shows statistics on hibernate entities.</Description> <DashboardMatch type="Global" location="/Hibernate/"> <BeanMatch id="StatisticsBean" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="Hibernate"/> <Condition type="BeanObjectNameRegexCondition" filter="type=statistics"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.OperationResultTableComponent"> <Attribute name="bean" value="StatisticsBean"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> <Attribute name="operationName" value="'getEntityStatistics'"/> <Attribute name="attributeKeyListName" value="'EntityNames'"/> <Attribute name="keyLabel" value="'Entity'"/> <Attribute name="AttributeName" value="'KEY'"/> <Attribute name="AttributeName" value="'fetchCount'"/> <Attribute name="AttributeName" value="'t'"/> <Attribute name="AttributeName" value="'insertCount'"/> <Attribute name="AttributeName" value="'updateCount'"/> <Attribute name="AttributeName" value="'deleteCount'"/> </Component> </Content> </Dashboard> --- NEW FILE: Hibernate_QueriesTable.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Hibernate Query Statistics" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>This dashboard shows statistics on hibernate queries.</Description> <DashboardMatch type="Global" location="/Hibernate/"> <BeanMatch id="StatisticsBean" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="Hibernate"/> <Condition type="BeanObjectNameRegexCondition" filter="type=statistics"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.OperationResultTableComponent"> <Attribute name="bean" value="StatisticsBean"/> <Constraint type="BorderConstraints" direction="CENTER"/> <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> <Attribute name="operationName" value="'getQueryStatistics'"/> <Attribute name="attributeKeyListName" value="'Queries'"/> <Attribute name="keyLabel" value="'Query'"/> <Attribute name="AttributeName" value="'KEY'"/> <Attribute name="AttributeName" value="'executionCount'"/> <Attribute name="AttributeName" value="'cacheHitCount'"/> <Attribute name="AttributeName" value="'cachePutCount'"/> <Attribute name="AttributeName" value="'cacheMissCount'"/> <Attribute name="AttributeName" value="'executionRowCount'"/> <Attribute name="AttributeName" value="'executionAvgTime'"/> <Attribute name="AttributeName" value="'executionMaxTime'"/> <Attribute name="AttributeName" value="'executionMinTime'"/> </Component> </Content> </Dashboard> --- NEW FILE: Hibernate_Overview.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="Hibernate Overview Statistics" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>This dashboard shows statistics on hibernate.</Description> <DashboardMatch type="Global" location="/Hibernate/"> <BeanMatch id="stats" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="Hibernate"/> <Condition type="BeanObjectNameRegexCondition" filter="type=statistics"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> <Attribute name="html"> <![CDATA[ <html> <head> <style type="text/css"> th { background-color: #cccccc; } .odd {} .even {background-color: #e8e7e7;} .label { text-align: right; font-weight: bold; padding-right: 10px; } </style> </head> <body> <img src="http://hibernate.org/tpl/jboss/img/01_oben_logo.gif" align="right"> <h2>Overview</h2> <table> <tr><td class="label">Sessions Opened</td> <td>${stats.sessionOpenCount}</td><td></td></tr> <tr><td class="label">Sessions Closed</td> <td>${stats.sessionCloseCount}</td><td></td></tr> <tr><td class="label">Connect Count</td> <td>${stats.connectCount}</td><td></td></tr> <tr><td class="label">Transactions</td> <td>${stats.transactionCount}</td><td></td></tr> <tr><td class="label">Commited Transactions</td> <td>${stats.successfulTransactionCount}</td><td></td></tr> </table> <h2>Aggregate Stats</h2> <table width="100%"> <tr> <td class="sectionHeader" colspan="2" align="right">Entity Totals</td> <td class="sectionHeader" colspan="2" align="right">Collection Totals</td> <td class="sectionHeader" colspan="2" align="right">Query Totals</td> </tr> <tr> <td class="label">Load</td> <td>${stats.entityLoadCount}</td> <td class="label">Load</td> <td>${stats.collectionLoadCount}</td> <td class="label">Executed</td> <td>${stats.queryExecutionCount}</td> </tr> <tr> <td class="label">Insert</td> <td>${stats.entityInsertCount}</td> <td class="label">Insert</td> <td>${stats.collectionRecreateCount}</td> <td class="label">Max Time</td> <td>${stats.queryExecutionMaxTime}</td> </tr> <tr> <td class="label">Fetch</td> <td>${stats.entityFetchCount}</td> <td class="label">Fetch</td> <td>${stats.collectionFetchCount}</td> <td class="label">Cache Puts</td> <td>${stats.queryCachePutCount}</td> </tr> <tr> <td class="label">Update</td> <td>${stats.entityUpdateCount}</td> <td class="label">Update</td> <td>${stats.collectionUpdateCount}</td> <td class="label">Cache Hits</td> <td>${stats.queryCacheHitCount}</td> </tr> <tr> <td class="label">Delete</td> <td>${stats.entityDeleteCount}</td> <td class="label">Delete</td> <td>${stats.collectionRemoveCount}</td> <td class="label">Cache Misses</td> <td>${stats.queryCacheMissCount}</td> </tr> </table> </body> </html> ]]> </Attribute> <Content> </Content> </Component> </Content> </Dashboard> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:19
|
Update of /cvsroot/mc4j/mc4j/lib/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/lib/boot Added Files: looks-1.3.1.jar Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: looks-1.3.1.jar --- (This appears to be a binary file; contents omitted.) |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:19
|
Update of /cvsroot/mc4j/mc4j/application/dist/org/mc4j/console/Windows2/Modes/properties In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dist/org/mc4j/console/Windows2/Modes/properties Added Files: properties.wstcref Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: properties.wstcref --- <?xml version="1.0" encoding="UTF-8"?> <tc-ref version="2.0"> <module name="org.netbeans.core.ui/1" spec="1.2" /> <tc-id id="properties" /> <state opened="true" /> </tc-ref> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:18
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/swing/graph/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/swing/graph/data Removed Files: BoundedTimeTableXYDataset.java Log Message: Merging EMS into head for the 2.0 release work --- BoundedTimeTableXYDataset.java DELETED --- |