mc4j-cvs Mailing List for MC4J JMX Console (Page 5)
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
|
From: Greg H. <gh...@us...> - 2006-04-12 19:14:48
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean Modified Files: UnregisterMBeanAction.java DashboardsAction.java MBeanNode.java OperationListAction.java Log Message: Merging EMS into head for the 2.0 release work Index: MBeanNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/MBeanNode.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** MBeanNode.java 14 Mar 2005 16:06:55 -0000 1.31 --- MBeanNode.java 12 Apr 2006 19:14:11 -0000 1.32 *************** *** 18,66 **** import org.mc4j.console.Refreshable; ! import org.mc4j.console.bean.attribute.AttributeNameComparator; ! import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.bean.attribute.AttributeSetNode; - import org.mc4j.console.bean.notification.NotificationNameComparator; - import org.mc4j.console.bean.notification.NotificationNode; import org.mc4j.console.bean.notification.NotificationSetNode; - import org.mc4j.console.bean.operation.OperationNameComparator; - import org.mc4j.console.bean.operation.OperationNode; [...965 lines suppressed...] + * @param notificationNodeMap New value of property notificationNodeMap. */ public void setNotificationNodeMap(Map notificationNodeMap) { *************** *** 814,820 **** return attributesNode; } ! public boolean isRegistered() { ! return getMBeanServer().isRegistered(this.objectName); } --- 676,682 ---- return attributesNode; } ! public boolean isRegistered() { ! return true; // TODO Implement //getMBeanServer().isRegistered(emsBean.getObjectName()); } Index: DashboardsAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/DashboardsAction.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** DashboardsAction.java 5 Oct 2004 05:15:57 -0000 1.16 --- DashboardsAction.java 12 Apr 2006 19:14:11 -0000 1.17 *************** *** 18,25 **** import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardFactory; import org.mc4j.console.dashboard.DashboardManager; import org.mc4j.console.dashboard.DashboardTopComponent; ! import org.openide.ErrorManager; import org.openide.awt.Actions; import org.openide.awt.JInlineMenu; --- 18,24 ---- import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.DashboardManager; import org.mc4j.console.dashboard.DashboardTopComponent; ! import org.mc4j.ems.connection.support.ConnectionListener; import org.openide.awt.Actions; import org.openide.awt.JInlineMenu; *************** *** 28,32 **** import org.openide.util.actions.SystemAction; import org.openide.windows.IOProvider; - import org.openide.windows.TopComponent; import javax.swing.*; --- 27,30 ---- *************** *** 38,42 **** import java.util.Iterator; import java.util.List; - import java.util.Map; import java.util.Set; --- 36,39 ---- *************** *** 76,80 **** } ! /** Perform extra initialization of this action's singleton. * PLEASE do not use constructors for this purpose! * protected void initialize() { --- 73,78 ---- } ! /** ! * Perform extra initialization of this action's singleton. * PLEASE do not use constructors for this purpose! * protected void initialize() { *************** *** 105,109 **** return new SpecialSubMenu(this, new ActSubMenuModel(this.node), true); } ! } catch(InterruptedException ie) { IOProvider.getDefault().getStdOut().println("Couldn't refresh node."); } --- 103,107 ---- return new SpecialSubMenu(this, new ActSubMenuModel(this.node), true); } ! } catch (InterruptedException ie) { IOProvider.getDefault().getStdOut().println("Couldn't refresh node."); } *************** *** 121,125 **** } ! /** Special submenu which notifies model when it is added as a component. */ private static final class SpecialSubMenu extends Actions.SubMenu { --- 119,124 ---- } ! /** ! * Special submenu which notifies model when it is added as a component. */ private static final class SpecialSubMenu extends Actions.SubMenu { *************** *** 142,146 **** } ! /** Model to use for the submenu. */ private static final class ActSubMenuModel implements Actions.SubMenuModel { --- 141,146 ---- } ! /** ! * Model to use for the submenu. */ private static final class ActSubMenuModel implements Actions.SubMenuModel { *************** *** 162,166 **** public String getLabel(int index) { ! return (String)displayNames.get(index); } --- 162,166 ---- public String getLabel(int index) { ! return (String) displayNames.get(index); } *************** *** 172,200 **** final Dashboard dashboard = (Dashboard) associatedInfo.get(index); - // do something with it - //org.openide.windows.IOProvider.getDefault().getStdOut().println("Action Performed, Info is: " + infoDoc.getDocumentElement()); - if (dashboard == null) { org.mc4j.console.dashboard.DashboardManager.getInstance().initialize(); } else { ! Map context = dashboard.getContextStarter(); ! context.put(Dashboard.CONTEXT_MBEAN_SERVER, this.node.getMBeanServer()); ! context.put(Dashboard.CONTEXT_OBJECT_NAME, this.node.getObjectName()); ! context.put(Dashboard.CONTEXT_MBEAN_NODE, this.node); ! DashboardFactory factory = new DashboardFactory(); ! try { ! JComponent component = factory.buildDashboard(dashboard, context); ! final TopComponent tc = new DashboardTopComponent(component, this.node.getObjectName().getCanonicalName()); ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! tc.setDisplayName(dashboard.getDisplayName()); ! tc.open(); ! tc.requestActive(); ! } ! }); ! this.node.getConnectionNode().registerDashboard(tc); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); ! } } } --- 172,196 ---- final Dashboard dashboard = (Dashboard) associatedInfo.get(index); if (dashboard == null) { org.mc4j.console.dashboard.DashboardManager.getInstance().initialize(); } else { ! final DashboardTopComponent tc = new DashboardTopComponent(dashboard, this.node.getEmsBean().getBeanName().getCanonicalName()); ! tc.launch(); ! ! // TODO: Need to figure out where we want to track open dashboards now... ! // probably against the EmsConnection ! this.node.getEmsBean().getConnectionProvider().addConnectionListener(new ConnectionListener() { ! public void connect() { ! } ! ! public void disconnect() { ! tc.close(); ! } ! ! public void connectionFailure() { ! // TODO: Some sort of glasspane level info? ! } ! }); ! this.node.getConnectionNode().registerDashboard(tc); } } *************** *** 208,212 **** } ! /** You may use this is you have attached other listeners to things that will affect displayNames, for example. */ private synchronized void fireStateChanged() { if (listeners.size() == 0) return; --- 204,210 ---- } ! /** ! * You may use this is you have attached other listeners to things that will affect displayNames, for example. ! */ private synchronized void fireStateChanged() { if (listeners.size() == 0) return; *************** *** 214,218 **** Iterator it = listeners.iterator(); while (it.hasNext()) ! ((ChangeListener)it.next()).stateChanged(ev); } --- 212,216 ---- Iterator it = listeners.iterator(); while (it.hasNext()) ! ((ChangeListener) it.next()).stateChanged(ev); } Index: UnregisterMBeanAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/UnregisterMBeanAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UnregisterMBeanAction.java 5 Oct 2004 05:15:57 -0000 1.2 --- UnregisterMBeanAction.java 12 Apr 2006 19:14:11 -0000 1.3 *************** *** 46,53 **** JOptionPane.showConfirmDialog(null, "Are you sure you want to unregister " + ! node.getObjectName().getCanonicalName() + "?"); if (result == JOptionPane.YES_OPTION) { try { ! node.getMBeanServer().unregisterMBean(node.getObjectName()); } catch (Exception e) { ErrorManager.getDefault().notify(e); --- 46,53 ---- JOptionPane.showConfirmDialog(null, "Are you sure you want to unregister " + ! node.getEmsBean().getBeanName().getCanonicalName() + "?"); if (result == JOptionPane.YES_OPTION) { try { ! node.getEmsBean().unregister(); } catch (Exception e) { ErrorManager.getDefault().notify(e); Index: OperationListAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/OperationListAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OperationListAction.java 5 Oct 2004 05:15:57 -0000 1.3 --- OperationListAction.java 12 Apr 2006 19:14:11 -0000 1.4 *************** *** 18,28 **** import java.awt.event.ActionEvent; ! import java.util.ArrayList; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.TreeMap; import javax.swing.JMenuItem; --- 18,22 ---- import java.awt.event.ActionEvent; ! import java.util.*; import javax.swing.JMenuItem; *************** *** 40,43 **** --- 34,38 ---- import org.mc4j.console.bean.operation.OperationExecuteNodeAction; import org.mc4j.console.bean.operation.OperationNode; + import org.mc4j.ems.connection.bean.operation.EmsOperation; *************** *** 128,135 **** private static final class ActSubMenuModel implements Actions.SubMenuModel { ! private List displayNames = new ArrayList(); // List<String> ! private List associatedInfo = new ArrayList(); // List<Object> ! private Set listeners = new HashSet(); // Set<ChangeListener> private MBeanNode node; --- 123,129 ---- private static final class ActSubMenuModel implements Actions.SubMenuModel { ! private Set listeners = new HashSet(); ! private List<EmsOperation> operationList = new ArrayList<EmsOperation>(); private MBeanNode node; *************** *** 140,148 **** public int getCount() { ! return displayNames.size(); } public String getLabel(int index) { ! return (String)displayNames.get(index); } --- 134,142 ---- public int getCount() { ! return operationList.size(); } public String getLabel(int index) { ! return operationList.get(index).getName(); } *************** *** 152,161 **** public void performActionAt(int index) { ! OperationNode operationNode = (OperationNode) associatedInfo.get(index); OperationExecuteNodeAction action = (OperationExecuteNodeAction) NodeAction.get(OperationExecuteNodeAction.class); ! action.performAction(new Node[] { operationNode }); } --- 146,156 ---- public void performActionAt(int index) { ! EmsOperation operation = operationList.get(index); ! OperationExecuteNodeAction action = (OperationExecuteNodeAction) NodeAction.get(OperationExecuteNodeAction.class); ! action.performAction(operation); } *************** *** 178,199 **** void addNotify() { ! this.displayNames = new ArrayList(); ! this.associatedInfo = new ArrayList(); ! ! // Let's sort'em up in alphabetical order shall we. ! TreeMap sortedMap = new TreeMap(); ! for (Iterator iterator = this.node.getOperationNodeMap().entrySet().iterator(); iterator.hasNext();) { ! Map.Entry entry = (Map.Entry) iterator.next(); ! ! sortedMap.put(entry.getKey(),entry.getValue()); ! } ! ! for (Iterator iterator = sortedMap.entrySet().iterator(); iterator.hasNext();) { ! Map.Entry entry = (Map.Entry) iterator.next(); ! ! this.displayNames.add(entry.getKey()); ! this.associatedInfo.add(entry.getValue()); ! ! } } --- 173,177 ---- void addNotify() { ! this.operationList = new ArrayList<EmsOperation>(this.node.getEmsBean().getOperations()); } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:48
|
Update of /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/windows/view/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/branding/bundle/org/netbeans/core/windows/view/ui Modified Files: Bundle_mc4j.properties Log Message: Merging EMS into head for the 2.0 release work Index: Bundle_mc4j.properties =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/branding/bundle/org/netbeans/core/windows/view/ui/Bundle_mc4j.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bundle_mc4j.properties 19 Jan 2005 14:16:08 -0000 1.3 --- Bundle_mc4j.properties 12 Apr 2006 19:14:13 -0000 1.4 *************** *** 1,4 **** # {0} project name ! CTL_MainWindow_Title=MC4J 1.2 beta 8 ! CTL_MainWindow_Title_No_Project=MC4J 1.2 beta 8 --- 1,4 ---- # {0} project name ! CTL_MainWindow_Title=MC4J 1.3 ! CTL_MainWindow_Title_No_Project=MC4J 1.3 |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:43
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/swing/graph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/swing/graph Modified Files: AbstractGraphPanel.java Added Files: GraphSeriesPanel.java GlassWindow.java AttributeGraphPanel.java Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: GraphSeriesPanel.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.swing.graph; import org.jdesktop.swingx.JXTable; import org.jdesktop.swingx.decorator.HighlighterPipeline; import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.decorator.AlternateRowHighlighter; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.swing.*; import javax.swing.table.AbstractTableModel; import java.awt.BorderLayout; import java.awt.Dimension; /** * @author Greg Hinkle (gh...@us...), Mar 30, 2006 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:06 $) */ public class GraphSeriesPanel extends JPanel { TimeSeriesCollection timeSeriesCollection; public GraphSeriesPanel(TimeSeriesCollection timeSeriesCollection) { this.timeSeriesCollection = timeSeriesCollection; init(); } private void init() { setLayout(new BorderLayout()); add(new JLabel("Currently graphed attributes"), BorderLayout.NORTH); JXTable table = new JXTable(new SeriesTableModel()); table.setHighlighters(new HighlighterPipeline(new Highlighter[] { new AlternateRowHighlighter() })); table.setColumnControlVisible(true); add(new JScrollPane(table), BorderLayout.CENTER); setSize(450,250); setPreferredSize(new Dimension(450,250)); } private class SeriesTableModel extends AbstractTableModel { public int getRowCount() { return timeSeriesCollection.getSeriesCount(); } public int getColumnCount() { return 3; } public String getColumnName(int column) { switch (column) { case 0: return "Name"; case 1: return "Description"; case 2: return "Value"; default: return ""; } } public Class<?> getColumnClass(int column) { switch (column) { case 0: return String.class; case 1: return String.class; case 2: return Number.class; default: return Object.class; } } public Object getValueAt(int row, int column) { TimeSeries s = timeSeriesCollection.getSeries(row); EmsAttribute attribute = (EmsAttribute) s.getKey(); switch (column) { case 0: return attribute.getName(); case 1: return attribute.getDescription(); case 2: return attribute.getValue(); case 3: return new JButton("Hi"); default: return s; } } } } --- NEW FILE: AttributeGraphPanel.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.swing.graph; import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import org.openide.nodes.NodeTransfer; import java.awt.dnd.DnDConstants; import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.dnd.DropTargetEvent; import java.awt.dnd.DropTargetListener; import java.util.List; /** * This TopComponent is a graph of JMX MBean Attributes. It only works * with numeric attributes. * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:06 $) */ public class AttributeGraphPanel extends AbstractGraphPanel implements DropTargetListener { private static int graphNumber = 1; public AttributeGraphPanel() { } protected void initGraphPanel() { super.initGraphPanel(); chartPanel.setDropTarget(new DropTarget(this,this)); } public AttributeGraphPanel(List<EmsAttribute> attributes) { for (EmsAttribute attribute : attributes) { addAttribute(attribute); } if (attributes.size() == 1) { setChartTitle(attributes.get(0).getName() + " Graph"); } else { setChartTitle("Graph " + graphNumber++); } reschedule(); } public void addAttribute(EmsAttribute attribute) { createTimeSeries(attribute.getName(),attribute); } public void addObservation() throws Exception { for (Object at : getTimeSeriesKeys()) { EmsAttribute attribute = (EmsAttribute) at; Object value = attribute.refresh(); Number val = (Number) value; TimeSeries ts = getTimeSeries(attribute); ts.add(new Millisecond(), val.doubleValue()); } } /** * We handle drops of AttributeNodes only at this time * @param dtde */ public void drop(DropTargetDropEvent dtde) { dtde.acceptDrop( DnDConstants.ACTION_REFERENCE); // For some stupid reason, this utility requires action mapping, so i can't ignore action types like i want to Node[] nodes = NodeTransfer.nodes(dtde.getTransferable(), 1); for (Node node : nodes) { if (node instanceof AttributeNode) { EmsAttribute attribute = ((AttributeNode) node).getEmsAttribute(); if (attribute.isNumericType()) { addAttribute(attribute); } } } } public void dragEnter(DropTargetDragEvent dtde) { } public void dragOver(DropTargetDragEvent dtde) { } public void dropActionChanged(DropTargetDragEvent dtde) { } public void dragExit(DropTargetEvent dte) { } } Index: AbstractGraphPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/swing/graph/AbstractGraphPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AbstractGraphPanel.java 5 Oct 2004 05:16:03 -0000 1.9 --- AbstractGraphPanel.java 12 Apr 2006 19:14:06 -0000 1.10 *************** *** 23,37 **** import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.XYPlot; ! import org.jfree.chart.renderer.DefaultXYItemRenderer; import org.jfree.chart.title.TextTitle; import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; - - import org.openide.windows.TopComponent; - import org.mc4j.console.dashboard.components.RefreshControlComponent; import org.mc4j.console.swing.LogarithmicTimeJSlider; import java.awt.BorderLayout; import java.awt.Color; --- 23,37 ---- import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.XYPlot; ! import org.jfree.chart.renderer.xy.DefaultXYItemRenderer; import org.jfree.chart.title.TextTitle; import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; import org.mc4j.console.dashboard.components.RefreshControlComponent; import org.mc4j.console.swing.LogarithmicTimeJSlider; + import org.openide.windows.TopComponent; + import javax.swing.*; + import javax.swing.border.LineBorder; import java.awt.BorderLayout; import java.awt.Color; *************** *** 50,67 **** import java.util.Timer; import java.util.TimerTask; ! ! import javax.swing.BorderFactory; ! import javax.swing.BoxLayout; ! import javax.swing.ButtonGroup; ! import javax.swing.Icon; ! import javax.swing.ImageIcon; ! import javax.swing.JCheckBox; ! import javax.swing.JFrame; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JPopupMenu; ! import javax.swing.JRadioButton; ! import javax.swing.SwingUtilities; ! import javax.swing.border.LineBorder; /** --- 50,54 ---- import java.util.Timer; import java.util.TimerTask; ! import java.util.Set; /** *************** *** 74,88 **** * @version $Revision$($Author$ / $Date$) */ ! public abstract class AbstractGraphPanel extends TopComponent { protected TimeSeriesCollection dataset = new TimeSeriesCollection(); - protected JFreeChart chart; protected Timer dataGeneratorTimer; protected TimerTask dataGeneratorTimerTask; ! protected Map timeSeriesMap = new HashMap(); protected XYPlot xyplot; --- 61,74 ---- * @version $Revision$($Author$ / $Date$) */ ! public abstract class AbstractGraphPanel<T> extends TopComponent { protected TimeSeriesCollection dataset = new TimeSeriesCollection(); protected JFreeChart chart; protected Timer dataGeneratorTimer; protected TimerTask dataGeneratorTimerTask; ! protected Map<T,TimeSeries> timeSeriesMap = new HashMap<T, TimeSeries>(); protected XYPlot xyplot; *************** *** 108,111 **** --- 94,98 ---- protected int failures = 0; protected static final int MAX_FAILURES = 10; + protected ChartPanel chartPanel; *************** *** 119,123 **** } - public void setChartTitle(final String name) { SwingUtilities.invokeLater(new Runnable() { --- 106,109 ---- *************** *** 140,145 **** NumberAxis range = new NumberAxis(""); ! this.xyplot = new XYPlot(dataset, domain, range, new DefaultXYItemRenderer()); ! domain.setAutoRange(true); domain.setLowerMargin(0.0); --- 126,137 ---- NumberAxis range = new NumberAxis(""); ! this.xyplot = new XYPlot(); ! this.xyplot.setDataset(dataset); ! this.xyplot.setDomainAxis(domain); ! this.xyplot.setRangeAxis(range); ! DefaultXYItemRenderer renderer = new DefaultXYItemRenderer(); ! renderer.setShapesVisible(false); ! this.xyplot.setRenderer(renderer); ! domain.setAutoRange(true); domain.setLowerMargin(0.0); *************** *** 160,164 **** new Font("SansSerif",Font.BOLD, 12))); ! ChartPanel chartPanel = new ChartPanel(chart,false,true,true,false,false); //chartPanel.setPopupMenu(null); chartPanel.setOpaque(true); --- 152,156 ---- new Font("SansSerif",Font.BOLD, 12))); ! chartPanel = new ChartPanel(chart,false,true,true,false,false); //chartPanel.setPopupMenu(null); chartPanel.setOpaque(true); *************** *** 174,179 **** buildGraphControls(); ! this.controlsButton = new ControlsPopupButton(); JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); northPanel.add(this.controlsButton); northPanel.setOpaque(false); --- 166,174 ---- buildGraphControls(); ! ControlsPopupButton dataButton = new ControlsPopupButton(new GraphSeriesPanel(dataset),"images/GraphElements.gif"); ! this.controlsButton = new ControlsPopupButton(this.controlsPanel,"images/GraphSettings2.gif"); ! JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + northPanel.add(dataButton); northPanel.add(this.controlsButton); northPanel.setOpaque(false); *************** *** 189,196 **** * A custom JCheckBox that will popup the controls toolbox for the chart */ ! public class ControlsPopupButton extends JCheckBox { private JPopupMenu popup; ! private Icon descendingIcon = createImageIcon("images/GraphSettings.gif"); /** Returns an ImageIcon, or null if the path was invalid. */ --- 184,202 ---- * A custom JCheckBox that will popup the controls toolbox for the chart */ ! public static class ControlsPopupButton extends JCheckBox { private JPopupMenu popup; ! private Icon icon;// = createImageIcon("images/GraphSettings2.gif"); ! ! private JComponent payload; ! ! public ControlsPopupButton(JComponent payload, String img) { ! this.payload = payload; ! this.icon = createImageIcon(img); ! ! setIcon(icon); ! setOpaque(false); ! init(); ! } /** Returns an ImageIcon, or null if the path was invalid. */ *************** *** 205,220 **** } - public ControlsPopupButton() { - setIcon(descendingIcon); - setOpaque(false); - init(); - } - public void showPopup() { ! if (popup == null) { ! popup = new JPopupMenu(); ! popup.add(controlsPanel); ! } ! popup.show(controlsButton, 0, controlsButton.getHeight()); } --- 211,226 ---- } public void showPopup() { ! GlassWindow.show(this.payload, this); ! //JXGlassBox gb = new JXGlassBox(0.8f); ! // gb.add(this.payload); ! // gb.setDismissOnClick(true); ! // gb.setVisible(true); ! // gb.showOnGlassPane((Container) this.getRootPane().getGlassPane(),this.getX() - this.payload.getWidth(), this.getY() + this.getHeight()); ! // if (popup == null) { ! // popup = new JPopupMenu(); ! // popup.add(this.payload); ! // } ! // popup.show(this, 0, this.getHeight()); } *************** *** 489,504 **** } ! protected void createTimeSeries(String name, Object key) { ! TimeSeries ts = ! new TimeSeries( ! name, ! Millisecond.class); ! ts.setHistoryCount(1728000); // 48 hours at 100 seconds this.timeSeriesMap.put(key, ts); dataset.addSeries(ts); } ! protected TimeSeries getTimeSeries(Object key) { ! return (TimeSeries) this.timeSeriesMap.get(key); } --- 495,512 ---- } ! protected void createTimeSeries(String name, T key) { ! TimeSeries ts = new TimeSeries(name, Millisecond.class); ! ts.setMaximumItemAge(1000 * 60 * 60 * 48); // 48 hours this.timeSeriesMap.put(key, ts); + //ts.setKey((Comparable) key); Duh, don't do this dataset.addSeries(ts); } ! protected TimeSeries getTimeSeries(T key) { ! return this.timeSeriesMap.get(key); ! } ! ! public Set<T> getTimeSeriesKeys() { ! return this.timeSeriesMap.keySet(); } --- NEW FILE: GlassWindow.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.swing.graph; import org.jdesktop.swingx.JXGlassBox; import javax.swing.*; import javax.swing.event.MouseInputAdapter; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; /** * @author Greg Hinkle (gh...@us...), Feb 24, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:06 $) */ public class GlassWindow extends JXGlassBox { protected JPanel header; protected JPanel footer; protected JLabel title; protected JComponent contents; protected static GlassWindow INSTANCE = new GlassWindow(); protected static JComponent currentParent; private GlassWindow() { super(0.85f); initUI(); } private void initUI() { setBorder(BorderFactory.createRaisedBevelBorder()); header = new JPanel(new BorderLayout()); header.add(new JLabel("Graph Series"),BorderLayout.WEST); JButton close = new JButton("x"); close.setAction(new AbstractAction() { public void actionPerformed(ActionEvent e) { INSTANCE.setVisible(false); } }); MoveListener listener = new MoveListener(); header.addMouseListener(listener); header.addMouseMotionListener(listener); header.add(close, BorderLayout.EAST); header.setBackground(Color.gray); ResizeListener resizeListener = new ResizeListener(); footer = new JPanel(new BorderLayout()); ResizeButton b = new ResizeButton(); footer.add(b); b.addMouseListener(resizeListener); b.addMouseMotionListener(resizeListener); } public static class ResizeButton extends JPanel { public ResizeButton() { super(); setSize(8,8); } public void paint(Graphics g) { super.paint(g); // After painting our components, we're gonna draw fake resize lines g.setColor(Color.white); g.fillRect(getWidth() - 8, getHeight() - 8, 8,8); g.setColor(Color.gray); g.drawLine(getWidth() - 7, getHeight() - 1, getWidth() - 1, getHeight() - 7); g.drawLine(getWidth() - 5, getHeight() - 1, getWidth() - 1, getHeight() - 5); g.drawLine(getWidth() - 3, getHeight() - 1, getWidth() - 1, getHeight() - 3); } } public class MoveListener extends MouseInputAdapter { private Point last; public void mouseClicked(MouseEvent e) { last = e.getPoint(); } public void mouseReleased(MouseEvent e) { last = null; } public void mouseDragged(MouseEvent e) { if (last == null) { last = e.getPoint(); } else { Point p = e.getPoint(); Point newLocation = getLocation(); newLocation.translate(p.x - last.x, p.y - last.y); setLocation(newLocation); } } } public class ResizeListener extends MouseInputAdapter { private Point last; public void mouseClicked(MouseEvent e) { last = e.getPoint(); } public void mouseReleased(MouseEvent e) { last = null; } public void mouseDragged(MouseEvent e) { if (last == null) { last = e.getPoint(); } else { Point p = e.getPoint(); setSize(getWidth() + p.x - last.x, getHeight() + p.y - last.y); last = e.getPoint(); } } } public void setContents(JComponent contents) { removeAll(); setLayout(new BorderLayout()); add(header, BorderLayout.NORTH); add(contents, BorderLayout.CENTER); add(footer, BorderLayout.SOUTH); } public static void show(JComponent contents, JComponent parent) { Container glass = (Container) parent.getRootPane().getGlassPane(); INSTANCE.setContents(contents); INSTANCE.setVisible(true); INSTANCE.showOnGlassPane(glass,parent,0,0,1); } } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:43
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/jre15/components Modified Files: MemoryUsageComponent.java MemoryUsageLineChartComponent.java MemoryUsagePieChartComponent.java DeadlockDetectionComponent.java MemoryUsageAreaChartComponent.java ThreadMBeanThreadBrowserComponent.java Added Files: ThreadsViewComponent.java Log Message: Merging EMS into head for the 2.0 release work Index: ThreadMBeanThreadBrowserComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/ThreadMBeanThreadBrowserComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ThreadMBeanThreadBrowserComponent.java 5 Oct 2004 05:16:19 -0000 1.4 --- ThreadMBeanThreadBrowserComponent.java 12 Apr 2006 19:14:04 -0000 1.5 *************** *** 17,50 **** package org.mc4j.jre15.components; import org.openide.ErrorManager; - import org.mc4j.console.dashboard.Dashboard; - import org.mc4j.console.dashboard.DashboardComponent; - - import java.awt.BorderLayout; - import java.awt.Component; - import java.lang.management.ManagementFactory; - import java.lang.management.ThreadInfo; - import java.lang.management.ThreadMXBean; - import java.util.Arrays; - import java.util.HashMap; - import java.util.HashSet; - import java.util.Iterator; - import java.util.Map; - import java.util.Set; - import javax.management.MBeanServer; ! import javax.management.MBeanServerInvocationHandler; ! import javax.management.MalformedObjectNameException; ! import javax.management.ObjectName; ! import javax.management.openmbean.CompositeData; ! import javax.swing.Icon; ! import javax.swing.ImageIcon; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; /** --- 17,33 ---- package org.mc4j.jre15.components; + import org.mc4j.console.dashboard.components.BeanComponent; + import org.mc4j.ems.connection.bean.EmsBean; import org.openide.ErrorManager; import javax.management.MBeanServer; ! import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; + import java.awt.*; + import java.lang.management.ThreadInfo; + import java.lang.management.ThreadMXBean; + import java.util.*; /** *************** *** 55,60 **** * @version $Revision$($Author$ / $Date$) */ ! public class ThreadMBeanThreadBrowserComponent extends JPanel implements DashboardComponent { protected ThreadMXBean threadMBean; --- 38,44 ---- * @version $Revision$($Author$ / $Date$) */ ! public class ThreadMBeanThreadBrowserComponent extends JPanel implements BeanComponent { + protected EmsBean emsThreadBean; protected ThreadMXBean threadMBean; *************** *** 66,70 **** protected MBeanServer server; ! protected Map threadMap; public ThreadMBeanThreadBrowserComponent() { --- 50,54 ---- protected MBeanServer server; ! protected Map<Long, DefaultMutableTreeNode> threadMap; public ThreadMBeanThreadBrowserComponent() { *************** *** 92,127 **** } ! public void setContext(Map context) { ! MBeanServer mBeanServer = (MBeanServer) context.get(Dashboard.CONTEXT_MBEAN_SERVER); ! this.server = mBeanServer; ! try { ! ! this.threadMBean = (ThreadMXBean) ! MBeanServerInvocationHandler.newProxyInstance( ! mBeanServer, ! new ObjectName(ManagementFactory.THREAD_MXBEAN_NAME), ! ThreadMXBean.class, ! false); ! ! } catch (MalformedObjectNameException moe) { ! ErrorManager.getDefault().notify(moe); ! } refresh(); this.treeModel.nodeStructureChanged(root); } - public void refresh() { try { // TODO GH: the added set is not being used and right now i'm firing // update events for each insertion or removal. this is probably much // slower than firing a single event with all of the changes. ! Set deadThreadSet = new HashSet(threadMap.values()); ! Set addedSet = new HashSet(); long[] threadIds = this.threadMBean.getAllThreadIds(); --- 76,107 ---- } + public void setBean(EmsBean emsBean) { + this.emsThreadBean = emsBean; ! this.threadMBean = this.emsThreadBean.getProxy(ThreadMXBean.class); refresh(); this.treeModel.nodeStructureChanged(root); + } + public void setContext(Map context) { + + + } + + public synchronized void refresh() { + + try { // TODO GH: the added set is not being used and right now i'm firing // update events for each insertion or removal. this is probably much // slower than firing a single event with all of the changes. ! Set<DefaultMutableTreeNode> deadThreadSet = new HashSet<DefaultMutableTreeNode>(threadMap.values()); ! Set<DefaultMutableTreeNode> addedSet = new HashSet<DefaultMutableTreeNode>(); long[] threadIds = this.threadMBean.getAllThreadIds(); *************** *** 132,155 **** ! CompositeData[] compositeDatas = ! (CompositeData[]) ! this.server.invoke( ! new ObjectName(ManagementFactory.THREAD_MXBEAN_NAME), ! "getThreadInfo", ! new Object[] { threadIds, new Integer(Integer.MAX_VALUE) }, ! new String[] { threadIds.getClass().getName(), Integer.TYPE.getName() }); ! ! for (int i = 0; i < compositeDatas.length; i++) { ! ThreadInfo threadInfo = ThreadInfo.from(compositeDatas[i]); DefaultMutableTreeNode threadNode = null; ! threadNode = (DefaultMutableTreeNode) threadMap.get(new Long(threadInfo.getThreadId())); if (threadNode == null) { threadNode = new DefaultMutableTreeNode(threadInfo); root.add(threadNode); ! threadMap.put(new Long(threadInfo.getThreadId()),threadNode); addedSet.add(threadNode); this.treeModel.nodesWereInserted(root, new int[] { root.getChildCount() - 1 }); --- 112,128 ---- ! ThreadInfo[] threadInfos = ! threadMBean.getThreadInfo(threadIds,Integer.MAX_VALUE); ! for (ThreadInfo threadInfo : threadInfos) { DefaultMutableTreeNode threadNode = null; ! threadNode = (DefaultMutableTreeNode) threadMap.get(threadInfo.getThreadId()); if (threadNode == null) { threadNode = new DefaultMutableTreeNode(threadInfo); root.add(threadNode); ! threadMap.put(threadInfo.getThreadId(),threadNode); addedSet.add(threadNode); this.treeModel.nodesWereInserted(root, new int[] { root.getChildCount() - 1 }); *************** *** 161,167 **** StackTraceElement[] stackElements = threadInfo.getStackTrace(); ! for (int j = 0; j < stackElements.length; j++) { ! StackTraceElement stackElement = stackElements[j]; ! DefaultMutableTreeNode stackNode = new DefaultMutableTreeNode(stackElement); threadNode.add(stackNode); --- 134,138 ---- StackTraceElement[] stackElements = threadInfo.getStackTrace(); ! for (StackTraceElement stackElement : stackElements) { DefaultMutableTreeNode stackNode = new DefaultMutableTreeNode(stackElement); threadNode.add(stackNode); *************** *** 174,183 **** // Remove any threads we didn't remove from the dead thread set... and which are therefore now dead ! for (Iterator iterator = deadThreadSet.iterator(); iterator.hasNext();) { ! DefaultMutableTreeNode defaultMutableTreeNode = (DefaultMutableTreeNode) iterator.next(); int index = root.getIndex(defaultMutableTreeNode); root.remove(defaultMutableTreeNode); ! this.treeModel.nodesWereRemoved(root, new int[] { index }, new Object[] { defaultMutableTreeNode }); ! threadMap.remove(new Long(((ThreadInfo)defaultMutableTreeNode.getUserObject()).getThreadId())); } --- 145,153 ---- // Remove any threads we didn't remove from the dead thread set... and which are therefore now dead ! for (DefaultMutableTreeNode defaultMutableTreeNode : deadThreadSet) { int index = root.getIndex(defaultMutableTreeNode); root.remove(defaultMutableTreeNode); ! this.treeModel.nodesWereRemoved(root, new int[]{index}, new Object[]{defaultMutableTreeNode}); ! threadMap.remove(((ThreadInfo) defaultMutableTreeNode.getUserObject()).getThreadId()); } Index: MemoryUsageLineChartComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/MemoryUsageLineChartComponent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MemoryUsageLineChartComponent.java 5 Oct 2004 05:16:19 -0000 1.5 --- MemoryUsageLineChartComponent.java 12 Apr 2006 19:14:04 -0000 1.6 *************** *** 17,37 **** package org.mc4j.jre15.components; ! import org.jfree.data.DefaultPieDataset; import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; ! ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.components.NumericAttributeGraph; import java.lang.management.MemoryUsage; - import java.util.Iterator; import java.util.List; import java.util.Map; - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.management.openmbean.CompositeData; - /** * You use this like an Attribute Graph Panel and it shows a --- 17,33 ---- package org.mc4j.jre15.components; ! ! import org.jfree.data.general.DefaultPieDataset; import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; ! import org.mc4j.console.dashboard.components.BeanListComponent; import org.mc4j.console.dashboard.components.NumericAttributeGraph; + import org.mc4j.ems.connection.bean.EmsBean; + import javax.management.openmbean.CompositeData; import java.lang.management.MemoryUsage; import java.util.List; import java.util.Map; /** * You use this like an Attribute Graph Panel and it shows a *************** *** 41,45 **** * @version $Revision$($Author$ / $Date$) */ ! public class MemoryUsageLineChartComponent extends NumericAttributeGraph { public static final String COMMITTED = "Committed"; --- 37,41 ---- * @version $Revision$($Author$ / $Date$) */ ! public class MemoryUsageLineChartComponent extends NumericAttributeGraph implements BeanListComponent { public static final String COMMITTED = "Committed"; *************** *** 50,66 **** protected DefaultPieDataset pieDataset; ! protected List beanList; public void addObservation() throws Exception { ! for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { ! try { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! ObjectName objectName = beanNode.getObjectName(); //String name = (String) this.server.getAttribute(objectName, "Name"); - MemoryUsage usage = MemoryUsage.from((CompositeData) this.server.getAttribute(objectName, "Usage")); ! TimeSeries ts = getTimeSeries(beanNode); ts.add(new Millisecond(), usage.getUsed()); --- 46,61 ---- protected DefaultPieDataset pieDataset; ! protected List<EmsBean> beanList; public void addObservation() throws Exception { ! for (EmsBean bean : beanList) { + try { //String name = (String) this.server.getAttribute(objectName, "Name"); ! MemoryUsage usage = MemoryUsage.from((CompositeData) bean.getAttribute("Usage").refresh()); ! ! TimeSeries ts = getTimeSeries(bean); ts.add(new Millisecond(), usage.getUsed()); *************** *** 76,93 **** public void setContext(Map context) { ! List beanList = (List) context.get(Dashboard.CONTEXT_MBEAN_LIST); ! ! this.beanList = beanList; ! ! this.server = (MBeanServer) context.get(Dashboard.CONTEXT_MBEAN_SERVER); ! ! for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! ObjectName objectName = beanNode.getObjectName(); try { ! String name = (String) this.server.getAttribute(objectName, "Name"); ! createTimeSeries(name, beanNode); } catch (Exception e) { e.printStackTrace(); --- 71,80 ---- public void setContext(Map context) { ! for (EmsBean bean : beanList) { try { ! String name = (String) bean.getAttribute("Name").getValue(); ! createTimeSeries(name, bean); } catch (Exception e) { e.printStackTrace(); *************** *** 98,100 **** --- 85,90 ---- } + public void setBeanList(List<EmsBean> beanList) { + this.beanList = beanList; + } } Index: DeadlockDetectionComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/DeadlockDetectionComponent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DeadlockDetectionComponent.java 5 Oct 2004 05:16:19 -0000 1.5 --- DeadlockDetectionComponent.java 12 Apr 2006 19:14:04 -0000 1.6 *************** *** 17,41 **** package org.mc4j.jre15.components; import org.openide.ErrorManager; ! import org.mc4j.console.dashboard.Dashboard; ! import org.mc4j.console.dashboard.DashboardComponent; ! ! import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; ! import java.util.HashMap; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.Set; ! ! import javax.management.MBeanServer; ! import javax.management.MBeanServerInvocationHandler; ! import javax.management.MalformedObjectNameException; ! import javax.management.ObjectName; ! import javax.management.openmbean.CompositeData; ! import javax.swing.BoxLayout; ! import javax.swing.JPanel; --- 17,28 ---- package org.mc4j.jre15.components; + import org.mc4j.console.dashboard.components.BeanComponent; + import org.mc4j.ems.connection.bean.EmsBean; import org.openide.ErrorManager; ! import javax.swing.*; import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; ! import java.util.*; *************** *** 45,71 **** * @version $Revision$($Author$ / $Date$) */ ! public class DeadlockDetectionComponent extends JPanel implements DashboardComponent { private ThreadMXBean threadMBean; - private MBeanServer server; ! private Map deadThreads = new HashMap(); ! public void setContext(Map context) { ! MBeanServer mBeanServer = (MBeanServer) context.get(Dashboard.CONTEXT_MBEAN_SERVER); ! this.server = mBeanServer; ! try { ! this.threadMBean = (ThreadMXBean) ! MBeanServerInvocationHandler.newProxyInstance( ! mBeanServer, ! new ObjectName(ManagementFactory.THREAD_MXBEAN_NAME), ! ThreadMXBean.class, ! false); - } catch (MalformedObjectNameException moe) { - ErrorManager.getDefault().notify(moe); - } setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); --- 32,54 ---- * @version $Revision$($Author$ / $Date$) */ ! public class DeadlockDetectionComponent extends JPanel implements BeanComponent { + private EmsBean emsBean; private ThreadMXBean threadMBean; ! private Map<Long,DeadlockedThreadComponent> deadThreads = new HashMap<Long, DeadlockedThreadComponent>(); ! public void setBean(EmsBean emsBean) { ! this.emsBean = emsBean; ! this.threadMBean = this.emsBean.getProxy(ThreadMXBean.class); ! refresh(); ! ! } ! ! ! public void setContext(Map context) { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); *************** *** 86,89 **** --- 69,73 ---- Thread t2 = new Thread(new Runnable() { + @SuppressWarnings({"InfiniteLoopStatement"}) public void run() { while(true) { *************** *** 108,113 **** try { - // TODO GH: This does not work yet! It doesn't appear to have been completed before - // the beta release of 1.5 long[] result = this.threadMBean.findMonitorDeadlockedThreads(); --- 92,95 ---- *************** *** 119,132 **** try { ThreadInfo info = ! ThreadInfo.from( ! (CompositeData) ! server.invoke( ! new ObjectName(ManagementFactory.THREAD_MXBEAN_NAME), ! "getThreadInfo", ! new Object[] { new Long(threadId), new Integer(Integer.MAX_VALUE) }, ! new String[] { Long.TYPE.getName(), Integer.TYPE.getName() })); ! if (!deadThreads.containsKey(new Long(info.getThreadId()))) { DeadlockedThreadComponent deadThread = --- 101,108 ---- try { ThreadInfo info = ! threadMBean.getThreadInfo(threadId,Integer.MAX_VALUE); ! if (!deadThreads.containsKey(info.getThreadId())) { DeadlockedThreadComponent deadThread = *************** *** 136,140 **** } ! stillDeadThreads.add(new Long(info.getThreadId())); } catch (Exception e) { --- 112,116 ---- } ! stillDeadThreads.add(info.getThreadId()); } catch (Exception e) { *************** *** 163,165 **** --- 139,142 ---- } + } Index: MemoryUsageAreaChartComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/MemoryUsageAreaChartComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemoryUsageAreaChartComponent.java 5 Oct 2004 05:16:19 -0000 1.4 --- MemoryUsageAreaChartComponent.java 12 Apr 2006 19:14:04 -0000 1.5 *************** *** 22,37 **** import org.jfree.chart.labels.XYItemLabelGenerator; import org.jfree.chart.plot.PlotOrientation; ! import org.jfree.chart.renderer.StackedXYAreaRenderer; ! import org.jfree.data.XYDataset; import org.jfree.data.time.Millisecond; import org.jfree.data.time.RegularTimePeriod; ! ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.components.BeanListComponent; import org.mc4j.console.dashboard.components.NumericAttributeGraph; ! import org.mc4j.console.swing.graph.data.BoundedTimeTableXYDataset; import java.awt.BorderLayout; import java.awt.Color; --- 22,36 ---- import org.jfree.chart.labels.XYItemLabelGenerator; import org.jfree.chart.plot.PlotOrientation; ! import org.jfree.chart.renderer.xy.StackedXYAreaRenderer; ! import org.jfree.data.xy.XYDataset; import org.jfree.data.time.Millisecond; import org.jfree.data.time.RegularTimePeriod; ! import org.jfree.data.time.TimeTableXYDataset; import org.mc4j.console.dashboard.components.BeanListComponent; import org.mc4j.console.dashboard.components.NumericAttributeGraph; ! import org.mc4j.ems.connection.bean.EmsBean; + import javax.management.openmbean.CompositeData; + import javax.swing.border.LineBorder; import java.awt.BorderLayout; import java.awt.Color; *************** *** 39,53 **** import java.text.DecimalFormat; import java.text.NumberFormat; - import java.util.ArrayList; - import java.util.Collections; - import java.util.Iterator; import java.util.List; import java.util.Map; - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.management.openmbean.CompositeData; - import javax.swing.border.LineBorder; - /** * You use this like an Attribute Graph Panel and it shows a --- 38,44 ---- *************** *** 61,69 **** public static final String USED = "Used"; ! protected List beanList; ! ! protected List nameList = new ArrayList(); ! protected BoundedTimeTableXYDataset dataset2 = new BoundedTimeTableXYDataset(); protected RegularTimePeriod removeArray[] = new RegularTimePeriod[60]; --- 52,58 ---- public static final String USED = "Used"; ! protected List<EmsBean> beanList; ! protected TimeTableXYDataset dataset2 = new TimeTableXYDataset(); protected RegularTimePeriod removeArray[] = new RegularTimePeriod[60]; *************** *** 102,107 **** ! renderer.setBaseLabelGenerator(new XYItemLabelGenerator() { ! public String generateItemLabel(XYDataset dataset, int series, int item) { Number x = dataset.getXValue(series, item); long bytes = x.longValue(); --- 91,96 ---- ! renderer.setItemLabelGenerator(new XYItemLabelGenerator() { ! public String generateLabel(XYDataset dataset, int series, int item) { Number x = dataset.getXValue(series, item); long bytes = x.longValue(); *************** *** 153,164 **** //time = System.currentTimeMillis(); ! for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { try { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! ObjectName objectName = beanNode.getObjectName(); ! ! MemoryUsage usage = MemoryUsage.from((CompositeData) this.server.getAttribute(objectName, "Usage")); ! String name = (String) ((AttributeNode)beanNode.getAttributeNodeMap().get("Name")).getValue(); dataset2.add(time, new Long(usage.getUsed()), name, false); --- 142,150 ---- //time = System.currentTimeMillis(); ! for (EmsBean bean : beanList) { try { ! MemoryUsage usage = MemoryUsage.from((CompositeData) bean.getAttribute("Usage").refresh()); ! String name = (String) bean.getAttribute("Name").getValue(); dataset2.add(time, new Long(usage.getUsed()), name, false); *************** *** 169,173 **** } ! dataset2.rebound(); chart.fireChartChanged(); --- 155,159 ---- } ! // dataset2.rebound(); chart.fireChartChanged(); *************** *** 185,208 **** - - this.server = (MBeanServer) context.get(Dashboard.CONTEXT_MBEAN_SERVER); - - ArrayList list = new ArrayList(); - Collections.reverse(beanList); - for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { - MBeanNode beanNode = (MBeanNode) iterator.next(); - ObjectName objectName = beanNode.getObjectName(); - - try { - String name = (String) this.server.getAttribute(objectName, "Name"); - - this.nameList.add(name); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - initGraphPanel2(); reschedule(); --- 171,174 ---- --- NEW FILE: ThreadsViewComponent.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.jre15.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.console.dashboard.DashboardComponent; import org.mc4j.console.dashboard.components.BeanComponent; import org.mc4j.console.swing.graph.GlassWindow; import org.mc4j.ems.connection.bean.EmsBean; import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.AbstractTableModel; import javax.swing.table.DefaultTableCellRenderer; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * @author Greg Hinkle (gh...@us...), Apr 3, 2006 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:04 $) */ public class ThreadsViewComponent extends JPanel implements DashboardComponent, BeanComponent { EmsBean emsThreadBean; ThreadMXBean threadBean; JXTable table; ThreadsTableModel model; private static final int TIME_HISTORY = 100 * 1000; public void setContext(Map context) { model = new ThreadsTableModel(threadBean); table = new JXTable(model); table.setColumnControlVisible(true); table.setHighlighters(new HighlighterPipeline(new Highlighter[]{new AlternateRowHighlighter()})); table.getColumnExt(2).setCellRenderer(new ThreadStateCellRenderer()); table.getColumnExt(3).setCellRenderer(new ThreadDataGraphRenderer()); table.getColumnExt(5).setCellRenderer(new PercentageCellRenderer()); setLayout(new BorderLayout()); add(new JScrollPane(table), BorderLayout.CENTER); table.getColumnExt(0).setPreferredWidth(35); // Id table.getColumnExt(1).setPreferredWidth(180); // Name table.getColumnExt(2).setPreferredWidth(35); // State table.getColumnExt(3).setMinWidth(200); table.getColumnExt(3).setPreferredWidth(350); table.getColumnExt(4).setVisible(false); // CPU Total table.getColumnExt(6).setVisible(false); // User CPU Total table.getColumnExt(7).setVisible(false); // Blocks Total table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { ThreadsTableModel.ThreadData d = model.getData(e.getFirstIndex()); JTextPane textPane = new JTextPane(); StringBuilder b = new StringBuilder(); ThreadInfo ti = threadBean.getThreadInfo(d.getLastData().getThreadId(), Integer.MAX_VALUE); if (ti != null) { for (StackTraceElement el : ti.getStackTrace()) { b.append(el); b.append("\n"); } textPane.setEditable(false); textPane.setText(b.toString()); textPane.setPreferredSize(new Dimension(500,600)); GlassWindow.show(new JScrollPane(textPane),ThreadsViewComponent.this); } } }); } public void refresh() { model.refresh(); model.fireTableDataChanged(); } public void setBean(EmsBean emsBean) { this.emsThreadBean = emsBean; threadBean = emsBean.getProxy(ThreadMXBean.class); // TODO: This is a little nasty, what if someone connects to a production system? this.threadBean.setThreadContentionMonitoringEnabled(true); this.threadBean.setThreadCpuTimeEnabled(true); } public static class ThreadDataGraphRenderer extends DefaultTableCellRenderer { ThreadsTableModel.ThreadData data; private static final Color blocked = new Color(205, 92, 92); private static final Color neww = new Color(135, 206, 250); private static final Color runnable = new Color(144, 238, 144); private static final Color terminated = new Color(112, 128, 244); private static final Color timed_waiting = new Color(240, 128, 128); private static final Color waiting = new Color(255, 239, 213); public ThreadDataGraphRenderer() { setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); } public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { data = (ThreadsTableModel.ThreadData) value; return this; } protected void paintComponent(Graphics g) { LinkedList<ThreadsTableModel.ThreadData.ThreadStatePoint> list = data.getStatePoints(); g.setColor(getBackground()); g.fillRect(0,0, getWidth(), getHeight()); Color c = null; long now = System.currentTimeMillis(); long then = now - TIME_HISTORY; double last = 0d; for (ThreadsTableModel.ThreadData.ThreadStatePoint point : list) { switch (point.getState()) { case BLOCKED: c = blocked; break; case NEW: c = neww; break; case RUNNABLE: c = runnable; break; case TERMINATED: c = terminated; break; case TIMED_WAITING: c = timed_waiting; break; case WAITING: c = waiting; break; } g.setColor(c); int width = getWidth() - 4; int height = getHeight() - 4; double d = width * ((double) (point.getTime() - then) / TIME_HISTORY) + 2; if (last == 0) last = width * ((double) (point.getTime() - then - 1000) / TIME_HISTORY) + 2; g.fillRect(((int) (last)) + 1, 2, (int) d, height); last = d; } } } public static class PercentageCellRenderer extends DefaultTableCellRenderer { static NumberFormat f; static { f = DecimalFormat.getPercentInstance(); f.setMaximumFractionDigits(2); } public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { return super.getTableCellRendererComponent(table, f.format(value), isSelected, hasFocus, row, column); } } public static class ThreadStateCellRenderer extends DefaultTableCellRenderer { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Icon icon = null; if (value instanceof Thread.State) { switch ((Thread.State)value) { case BLOCKED: icon = threadBlockedIcon; break; case NEW: icon = threadIcon; break; case RUNNABLE: icon = threadRunningIcon; break; case TERMINATED: icon = threadTerminatedIcon; break; case TIMED_WAITING: icon = threadWaitingIcon; break; case WAITING: icon = threadWaitingIcon; break; } } else { icon = threadIcon; } setHorizontalAlignment(CENTER); setIcon(icon); return this; } private static Icon threadIcon = createImageIcon("images/Thread.gif"); private static Icon threadRunningIcon = createImageIcon("images/ThreadRunning.gif"); private static Icon threadWaitingIcon = createImageIcon("images/ThreadWaiting.gif"); private static Icon threadBlockedIcon = createImageIcon("images/ThreadBlocked.gif"); private static Icon threadTerminatedIcon = createImageIcon("images/ThreadTerminated.gif"); private static Icon stackElementIcon = createImageIcon("images/StackElement.gif"); /** * Returns an ImageIcon, or null if the path was invalid. */ protected static ImageIcon createImageIcon(String path) { java.net.URL imgURL = ThreadMBeanThreadBrowserComponent.class.getClassLoader().getResource(path); if (imgURL != null) { return new ImageIcon(imgURL); } else { System.err.println("Couldn't find file: " + path); return null; } } } public static class ThreadsTableModel extends AbstractTableModel { private static final String[] COLUMNS = new String[]{ "Id", "Name", "State", "History", "CPU Total","CPU %", "User Total", "Blocks", "Block Time", "Lock" }; ThreadMXBean threadBean; LinkedHashMap<Long, ThreadData> data = new LinkedHashMap<Long, ThreadData>(); List<Long> threadList = new ArrayList<Long>(); long lastTotalCpu; long currentTotalCpu; public ThreadsTableModel(ThreadMXBean threadBean) { this.threadBean = threadBean; } public synchronized void refresh() { // Refresh all at once so we don't get weird array out of bounds stuff or something like that // Threads never disappear from this list, that'd be confusing, but their data would obviously stop updating long[] threadIds = threadBean.getAllThreadIds(); ThreadInfo[] threadInfos = threadBean.getThreadInfo(threadIds); HashSet<Long> deadCheck = new HashSet<Long>(threadList); currentTotalCpu = 0L; for (ThreadInfo thread : threadInfos) { ThreadData d; if (!data.containsKey(thread.getThreadId())) { threadList.add(thread.getThreadId()); d = new ThreadData(); data.put(thread.getThreadId(), d); } else { d = data.get(thread.getThreadId()); } d.update(thread); long cpu = threadBean.getThreadCpuTime(thread.getThreadId()); d.setCpuTimeForInterval(cpu - d.getCpuTime()); // subtract last recorded cpu time d.setCpuTime(cpu); currentTotalCpu += d.getCpuTimeForInterval(); d.setUserTime(threadBean.getThreadUserTime(thread.getThreadId())); deadCheck.remove(thread.getThreadId()); } for (Long deadId : deadCheck) { data.get(deadId).setDead(true); } } public int getRowCount() { return threadList.size(); } public int getColumnCount() { return COLUMNS.length; } public String getColumnName(int column) { return COLUMNS[column]; } public ThreadData getData(int row) { return data.get(threadList.get(row)); } public synchronized Object getValueAt(int rowIndex, int columnIndex) { ThreadData d = data.get(threadList.get(rowIndex)); switch (columnIndex) { case 0: return d.getLastData().getThreadId(); case 1: return d.getLastData().getThreadName(); case 2: return (d.isDead()) ? "Dead" : d.getLastData().getThreadState(); case 3: return d; case 4: return d.getCpuTime(); case 5: return (double) d.getCpuTimeForInterval() / currentTotalCpu; case 6: return d.getUserTime(); case 7: return d.getLastData().getBlockedCount(); case 8: return d.getLastData().getBlockedTime(); case 9: return d.getLastData().getLockName(); } return null; } public static class ThreadData { boolean dead = false; ThreadInfo lastData; LinkedList<ThreadStatePoint> statePoints = new LinkedList<ThreadStatePoint>(); long cpuTimeForInterval; long cpuTime; long userTime; public void update(ThreadInfo info) { lastData = info; long oldest = System.currentTimeMillis() - TIME_HISTORY; while (statePoints.size() > 0 && statePoints.getFirst().getTime() < oldest) { statePoints.removeFirst(); } statePoints.add(new ThreadStatePoint(info.getThreadState())); } public long getCpuTimeForInterval() { return cpuTimeForInterval; } public void setCpuTimeForInterval(long cpuTimeForInterval) { this.cpuTimeForInterval = cpuTimeForInterval; } public long getCpuTime() { return cpuTime; } public void setCpuTime(long cpuTime) { this.cpuTime = cpuTime; } public long getUserTime() { return userTime; } public void setUserTime(long userTime) { this.userTime = userTime; } public ThreadInfo getLastData() { return lastData; } public LinkedList<ThreadStatePoint> getStatePoints() { return statePoints; } public boolean isDead() { return dead; } public void setDead(boolean dead) { this.dead = dead; } public static class ThreadStatePoint { private long time; private Thread.State state; public ThreadStatePoint(Thread.State state) { this.time = System.currentTimeMillis(); this.state = state; } public long getTime() { return time; } public Thread.State getState() { return state; } } } } } Index: MemoryUsageComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/MemoryUsageComponent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MemoryUsageComponent.java 5 Oct 2004 05:16:19 -0000 1.3 --- MemoryUsageComponent.java 12 Apr 2006 19:14:04 -0000 1.4 *************** *** 19,29 **** import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; - import org.mc4j.console.dashboard.components.NumericAttributeGraph; - import java.lang.management.MemoryUsage; - - import javax.management.MBeanAttributeInfo; import javax.management.openmbean.CompositeData; /** --- 19,27 ---- import org.jfree.data.time.Millisecond; import org.jfree.data.time.TimeSeries; import org.mc4j.console.dashboard.components.NumericAttributeGraph; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.management.openmbean.CompositeData; + import java.lang.management.MemoryUsage; /** *************** *** 55,68 **** ! for (int i = 0; i < attributeInfo.length; i++) { ! MBeanAttributeInfo info = attributeInfo[i]; ! ! String attributeName = info.getName(); ! Object value = this.server.getAttribute(this.objectName, attributeName); MemoryUsage usage = MemoryUsage.from((CompositeData) value); TimeSeries ts; ! ts = getTimeSeries(attributeName + COMMITTED); ts.add(new Millisecond(), usage.getCommitted()); --- 53,63 ---- ! for (EmsAttribute attribute : getAttributes()) { ! Object value = attribute.refresh(); //this.emsBean.getAttribute(attributeName).refresh(); MemoryUsage usage = MemoryUsage.from((CompositeData) value); TimeSeries ts; ! String attributeName = ""; ts = getTimeSeries(attributeName + COMMITTED); ts.add(new Millisecond(), usage.getCommitted()); Index: MemoryUsagePieChartComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/jre15/components/MemoryUsagePieChartComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MemoryUsagePieChartComponent.java 5 Oct 2004 05:16:19 -0000 1.4 --- MemoryUsagePieChartComponent.java 12 Apr 2006 19:14:04 -0000 1.5 *************** *** 23,47 **** import org.jfree.chart.entity.ChartEntity; import org.jfree.chart.entity.PieSectionEntity; ! import org.jfree.chart.labels.StandardPieItemLabelGenerator; import org.jfree.chart.plot.PiePlot; ! import org.jfree.data.DefaultPieDataset; ! ! import org.openide.windows.IOProvider; ! ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.components.NumericAttributeGraph; ! import org.mc4j.console.install.ExplorerUtil; import java.awt.BorderLayout; import java.lang.management.MemoryUsage; - import java.util.Iterator; import java.util.List; import java.util.Map; - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.management.openmbean.CompositeData; - /** * You use this like an Attribute Graph Panel and it shows a --- 23,40 ---- import org.jfree.chart.entity.ChartEntity; import org.jfree.chart.entity.PieSectionEntity; ! import org.jfree.chart.labels.StandardPieSectionLabelGenerator; import org.jfree.chart.plot.PiePlot; ! import org.jfree.data.general.DefaultPieDataset; ! import org.mc4j.console.dashboard.components.BeanListComponent; import org.mc4j.console.dashboard.components.NumericAttributeGraph; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.openide.windows.IOProvider; + import javax.management.openmbean.CompositeData; import java.awt.BorderLayout; import java.lang.management.MemoryUsage; import java.util.List; import java.util.Map; /** * You use this like an Attribute Graph Panel and it shows a *************** *** 51,55 **** * @version $Revision$($Author$ / $Date$) */ ! public class MemoryUsagePieChartComponent extends NumericAttributeGraph { public static final String COMMITTED = "Committed"; --- 44,48 ---- * @version $Revision$($Author$ / $Date$) */ ! public class MemoryUsagePieChartComponent extends NumericAttributeGraph implements BeanListComponent { public static final String COMMITTED = "Committed"; *************** *** 60,64 **** protected DefaultPieDataset pieDataset; ! protected List beanList; protected void initGraphPanel() { --- 53,57 ---- protected DefaultPieDataset pieDataset; ! protected List<EmsBean> beanList; protected void initGraphPanel() { *************** *** 66,70 **** pieDataset = new DefaultPieDataset(); ! this.chart = ChartFactory.createPieChart( "JVM Memory Pool Usage", // chart title pieDataset, // data --- 59,63 ---- pieDataset = new DefaultPieDataset(); ! this.chart = ChartFactory.createPieChart3D( "JVM Memory Pool Usage", // chart title pieDataset, // data *************** *** 73,76 **** --- 66,70 ---- false ); + // set the background color for the chart... *************** *** 78,82 **** PiePlot plot = (PiePlot) chart.getPlot(); ! plot.setLabelGenerator(new StandardPieItemLabelGenerator()); //StandardPieItemLabelGenerator spilg = new StandardPieItemLabelGenerator(); --- 72,76 ---- PiePlot plot = (PiePlot) chart.getPlot(); ! plot.setLabelGenerator(new StandardPieSectionLabelGenerator()); //StandardPieItemLabelGenerator spilg = new StandardPieItemLabelGenerator(); *************** *** 97,111 **** IOProvider.getDefault().getStdOut().println("Browsing to: " + pieSection.getSectionKey()); ! for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { try { ! MBeanNode beanNode = (MBeanNode) iterator.next(); ! ! ObjectName objectName = beanNode.getObjectName(); ! ! // TODO GH: Don't need to get this from the server every time ! String name = (String) MemoryUsagePieChartComponent.this.server.getAttribute(objectName, "Name"); if (pieSection.getSectionKey().equals(name)) { ! ExplorerUtil.browseTo(beanNode); } } catch(Exception e) { --- 91,101 ---- IOProvider.getDefault().getStdOut().println("Browsing to: " + pieSection.getSectionKey()); ! for (EmsBean bean : beanList) { try { ! String name = (String) bean.getAttribute("Name").getValue(); if (pieSection.getSectionKey().equals(name)) { ! // TODO: How to do this now? ! //ExplorerUtil.browseTo(beanNode); } } catch(Exception e) { *************** *** 133,150 **** ! for (Iterator iterator = beanList.iterator(); iterator.hasNext();) { try { - MBeanNode beanNode = (MBeanNode) iterator.next(); - ObjectName objectName = beanNode.getObjectName(); // TODO GH: Don't need to get this from the server every time ! String name = (String) this.server.getAttribute(objectName, "Name"); - Object object = this.server.getAttribute(objectName, "Usage"); - MemoryUsage usage = MemoryUsage.from((CompositeData) object); ! // Old support for beta 1 ! //usage = (MemoryUsage) this.server.getAttribute(objectName, "Usage"); pieDataset.setValue(name, usage.getUsed()); --- 123,137 ---- ! for (EmsBean bean : beanList) { try { // TODO GH: Don't need to get this from the server every time ! String name = (String) bean.getAttribute("Name").getValue(); ! Object object = bean.getAttribute("Usage").refresh(); ! ! MemoryUsage usage = MemoryUsage.from((CompositeData) object); pieDataset.setValue(name, usage.getUsed()); *************** *** 165,174 **** } ! public void setContext(Map context) { ! List beanList = (List) context.get(Dashboard.CONTEXT_MBEAN_LIST); ! this.beanList = beanList; ! this.server = (MBeanServer) context.get(Dashboard.CONTEXT_MBEAN_SERVER); reschedule(); --- 152,160 ---- } ! public void setBeanList(List<EmsBean> beanList) { this.beanList = beanList; + } ! public void setContext(Map context) { reschedule(); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:41
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/advanced In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/wizard/advanced Modified Files: AdvancedPanel.java Log Message: Merging EMS into head for the 2.0 release work Index: AdvancedPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/advanced/AdvancedPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AdvancedPanel.java 5 Oct 2004 05:15:59 -0000 1.2 --- AdvancedPanel.java 12 Apr 2006 19:14:06 -0000 1.3 *************** *** 17,27 **** package org.mc4j.console.connection.wizard.advanced; ! import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Vector; - import javax.swing.table.DefaultTableModel; - --- 17,26 ---- package org.mc4j.console.connection.wizard.advanced; ! import javax.swing.table.DefaultTableModel; import java.util.Iterator; import java.util.Map; + import java.util.Properties; import java.util.Vector; *************** *** 53,62 **** } ! public Map getProperties() { ! Map properties = new HashMap(); DefaultTableModel model = (DefaultTableModel) this.propertyTable.getModel(); Vector data = model.getDataVector(); ! for (Iterator iterator = data.iterator(); iterator.hasNext();) { ! Vector vector = (Vector) iterator.next(); String key = (String) vector.get(0); String value = (String) vector.get(0); --- 52,61 ---- } ! public Properties getProperties() { ! Properties properties = new Properties(); DefaultTableModel model = (DefaultTableModel) this.propertyTable.getModel(); Vector data = model.getDataVector(); ! for (Object aData : data) { ! Vector vector = (Vector) aData; String key = (String) vector.get(0); String value = (String) vector.get(0); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:41
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/util Modified Files: ConnectionInfoAction.java ExceptionUtility.java Log Message: Merging EMS into head for the 2.0 release work Index: ExceptionUtility.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/util/ExceptionUtility.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ExceptionUtility.java 5 Oct 2004 05:16:19 -0000 1.4 --- ExceptionUtility.java 12 Apr 2006 19:14:00 -0000 1.5 *************** *** 101,105 **** Method method = theClass.getMethod("getCause", GET_CAUSE_PARAMS ); ! return (Throwable)method.invoke(throwable, null ); } catch(Throwable t ) { // That didn't work, but that's ok --- 101,105 ---- Method method = theClass.getMethod("getCause", GET_CAUSE_PARAMS ); ! return (Throwable)method.invoke(throwable ); } catch(Throwable t ) { // That didn't work, but that's ok Index: ConnectionInfoAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/util/ConnectionInfoAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConnectionInfoAction.java 19 Jan 2005 14:10:34 -0000 1.4 --- ConnectionInfoAction.java 12 Apr 2006 19:14:00 -0000 1.5 *************** *** 17,20 **** --- 17,21 ---- package org.mc4j.console.util; + import org.mc4j.ems.connection.EmsConnection; import org.openide.util.HelpCtx; import org.openide.util.actions.CallableSystemAction; *************** *** 27,31 **** import java.text.Format; import java.text.MessageFormat; ! import java.util.Arrays; /** --- 28,33 ---- import java.text.Format; import java.text.MessageFormat; ! import java.util.Set; ! import java.util.WeakHashMap; /** *************** *** 35,47 **** public class ConnectionInfoAction extends CallableSystemAction { ! private static long serverHits; ! public static void addHit() { ! serverHits++; } - public static long getHits() { - return serverHits; - } public String getName() { return "Server calls"; --- 37,46 ---- public class ConnectionInfoAction extends CallableSystemAction { ! private static WeakHashMap<EmsConnection,String> map = new WeakHashMap<EmsConnection,String>(); ! public static void addStats(EmsConnection connection) { ! map.put(connection, null); } public String getName() { return "Server calls"; *************** *** 53,61 **** public static void resetStats() { - serverHits = 0; } public void performAction() { - serverHits = 0; } --- 52,58 ---- *************** *** 83,91 **** enableEvents(java.awt.AWTEvent.MOUSE_EVENT_MASK); // To get the size right: ! setText(f.format(new Object[] {new Double(999.0d), new Double(999.0d)})); setOpaque(false); setBorder(BorderFactory.createEmptyBorder(2,3,2,3)); ! setToolTipText("The number of server roundtrips made. Click to reset."); } --- 80,88 ---- enableEvents(java.awt.AWTEvent.MOUSE_EVENT_MASK); // To get the size right: ! setText(f.format(new Object[] {999.0d, 999.0d})); setOpaque(false); setBorder(BorderFactory.createEmptyBorder(2,3,2,3)); ! setToolTipText("The number of server roundtrips / The number of connection failures."); } *************** *** 112,116 **** private void update(boolean ticked) { ! setText(String.valueOf(getHits())); } --- 109,122 ---- private void update(boolean ticked) { ! long hits = 0; ! long failures = 0; ! ! Set<EmsConnection> connections = map.keySet(); ! for (EmsConnection connection : connections) { ! hits += connection.getRoundTrips(); ! failures += connection.getFailures(); ! } ! ! setText(String.valueOf(hits) + "/" + String.valueOf(failures)); } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:41
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/install/finder Modified Files: ServerInstallInfo.java FileSystemModel.java ServerInstallFinder.java Log Message: Merging EMS into head for the 2.0 release work Index: ServerInstallFinder.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/ServerInstallFinder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ServerInstallFinder.java 5 Oct 2004 05:15:58 -0000 1.2 --- ServerInstallFinder.java 12 Apr 2006 19:13:58 -0000 1.3 *************** *** 17,27 **** package org.mc4j.console.connection.install.finder; ! import org.mc4j.console.ManagementNode; ! import org.mc4j.console.connection.install.ConnectionTypeDescriptor; ! import java.util.Map; import java.util.HashMap; import java.util.Iterator; ! import java.io.File; /** --- 17,27 ---- package org.mc4j.console.connection.install.finder; ! import org.mc4j.ems.connection.ConnectionFactory; ! import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; ! import java.io.File; import java.util.HashMap; import java.util.Iterator; ! import java.util.Map; /** *************** *** 31,34 **** --- 31,40 ---- public class ServerInstallFinder { + /** + * A map of the install directory to the recognition file used to recognize + * that install. + */ + private Map<File,File> recognitionFiles = new HashMap<File, File>(); + public static void main(String[] args) { outputClassloaders(ServerInstallFinder.class.getClassLoader()); *************** *** 57,62 **** public ServerInstallFinder() { ! for (int i = 0; i < ManagementNode.CONNECTION_DESCRIPTORS.length; i++) { ! ConnectionTypeDescriptor connectionDescriptor = ManagementNode.CONNECTION_DESCRIPTORS[i]; if (connectionDescriptor.getRecongnitionPath() != null) { recognitionMap.put(connectionDescriptor.getRecongnitionPath(), connectionDescriptor); --- 63,68 ---- public ServerInstallFinder() { ! ! for (ConnectionTypeDescriptor connectionDescriptor : ConnectionFactory.getConnectionTypes()) { if (connectionDescriptor.getRecongnitionPath() != null) { recognitionMap.put(connectionDescriptor.getRecongnitionPath(), connectionDescriptor); *************** *** 67,72 **** public void testDir(File file) { File[] children = file.listFiles(); ! for (int i = 0; i < children.length; i++) { ! File child = children[i]; if (child.isDirectory()) { ConnectionTypeDescriptor type = getServerTypePath(child); --- 73,77 ---- public void testDir(File file) { File[] children = file.listFiles(); ! for (File child : children) { if (child.isDirectory()) { ConnectionTypeDescriptor type = getServerTypePath(child); *************** *** 79,82 **** --- 84,91 ---- } + public File getRecognitionFile(File intallDirectory) { + return this.recognitionFiles.get(intallDirectory); + } + public ConnectionTypeDescriptor getServerTypePath(File file) { for (Iterator iterator = recognitionMap.entrySet().iterator(); iterator.hasNext();) { *************** *** 85,95 **** ConnectionTypeDescriptor descriptor = (ConnectionTypeDescriptor) entry.getValue(); ! if (matches(file, recognition)) return descriptor; } return null; } ! public boolean matches(File file, String recognition) { int l = recognition.indexOf('/'); String name = recognition; --- 94,107 ---- ConnectionTypeDescriptor descriptor = (ConnectionTypeDescriptor) entry.getValue(); ! File recognitionFile = matches(file, recognition); ! if (recognitionFile != null) { ! recognitionFiles.put(file, recognitionFile); return descriptor; + } } return null; } ! public File matches(File parentFile, String recognition) { int l = recognition.indexOf('/'); String name = recognition; *************** *** 100,113 **** } ! File curFile = new File(file.getAbsoluteFile() + "/" + name); ! if (!curFile.exists()) ! return false; ! ! if (nextName != null) { ! return matches(curFile,nextName); } else { ! return true; ! } } --- 112,133 ---- } ! if ("*".equals(name)) { ! File[] children = parentFile.listFiles(new FileSystemModel.DirectoryFilter()); ! for (File child : children) { ! File found = matches(child,nextName); ! if (found != null) return found; ! } ! return null; } else { ! File curFile = new File(parentFile.getAbsoluteFile() + "/" + name); ! if (!curFile.exists()) ! return null; + if (nextName != null) { + return matches(curFile,nextName); + } else { + return curFile; + } + } } Index: ServerInstallInfo.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/ServerInstallInfo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ServerInstallInfo.java 14 Mar 2005 15:16:14 -0000 1.4 --- ServerInstallInfo.java 12 Apr 2006 19:13:58 -0000 1.5 *************** *** 17,21 **** package org.mc4j.console.connection.install.finder; ! import org.mc4j.console.connection.install.ConnectionTypeDescriptor; import java.io.File; --- 17,21 ---- package org.mc4j.console.connection.install.finder; ! import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; import java.io.File; Index: FileSystemModel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/install/finder/FileSystemModel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileSystemModel.java 14 Mar 2005 15:16:04 -0000 1.3 --- FileSystemModel.java 12 Apr 2006 19:13:58 -0000 1.4 *************** *** 17,31 **** package org.mc4j.console.connection.install.finder; - import org.mc4j.console.connection.install.ConnectionTypeDescriptor; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; - import javax.swing.event.TreeModelListener; - import java.util.Map; - import java.util.HashMap; - import java.util.Vector; - import java.util.Arrays; import java.io.File; import java.io.FileFilter; /** --- 17,32 ---- package org.mc4j.console.connection.install.finder; + import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; + + import javax.swing.event.TreeModelListener; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import java.io.File; import java.io.FileFilter; + import java.util.Arrays; + import java.util.HashMap; + import java.util.Map; + import java.util.Vector; /** *************** *** 97,101 **** ConnectionTypeDescriptor type = finder.getServerTypePath(f); if (type != null) { ! File recognitionFile = new File(f.getAbsolutePath() + "/" + type.getRecongnitionPath()); String version = type.getServerVersion(recognitionFile); if (version == null) { --- 98,102 ---- ConnectionTypeDescriptor type = finder.getServerTypePath(f); if (type != null) { ! File recognitionFile = finder.getRecognitionFile(f); String version = type.getServerVersion(recognitionFile); if (version == null) { |
Update of /cvsroot/mc4j/mc4j/application/dashboards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards Modified Files: BasicMBean.xml Dashboard_1_0.dtd HtmlDocumentTest.xml RelationsGraph2.xml RelationsGraph.xml HtmlDocumentTest.html Added Files: Dashboard_2_0.dtd Log Message: Merging EMS into head for the 2.0 release work Index: BasicMBean.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/BasicMBean.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BasicMBean.xml 5 Oct 2004 04:01:08 -0000 1.10 --- BasicMBean.xml 12 Apr 2006 19:14:02 -0000 1.11 *************** *** 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 "EmsAttribute-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <!-- *************** *** 10,107 **** --> ! <Dashboard version="1.0" name="Basic MBean View"> ! <Description>Displays general information about any MBean in the system.</Description> ! ! <DashboardMatch type="Bean"> ! <BeanMatch id="BeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter=".*"/> ! </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="(Message)General information about {ObjectName}"/> ! <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)30000"/> ! </Component> ! </Content> ! </Component> ! <!-- *** The main content is displayed within a scrollpane for easy viewing *** --> ! <Component type="javax.swing.JScrollPane"> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> - <Content> - <Component type="javax.swing.JPanel"> - <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> ! <Content> ! <!-- *** A Section holder is an included component for providing hide-able parts *** --> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)MBean Attributes"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <LayoutManager type="java.awt.BorderLayout"/> ! <Content> ! ! <!-- *** This component displays the attributes of an MBean *** --> ! <Component type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> ! <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="beanNode" value="BeanNode"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Border type="javax.swing.border.LineBorder" color="(Literal)0x444444" thickness="(Literal)1"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! </Component> ! </Content> ! </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)MBean Operations"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="beanNode" value="BeanNode"/> ! <Attribute name="format" value="(Literal)FULL_FORMAT"/> ! </Component> ! </Content> ! </Component> ! <!-- ! <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> ! </Component> ! --> ! </Content> ! </Component> ! </Content> ! </Component> ! </Content> </Dashboard> --- 10,54 ---- --> ! <Dashboard version="2.0" name="Basic MBean View" standardHeader="true" autoRefresh="true" refreshControl="true"> ! <Description>Displays general information about any MBean in the system.</Description> ! <DashboardMatch type="Bean"> ! <BeanMatch id="bean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter=".*"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="org.jdesktop.swingx.VerticalLayout"/> ! <Content> ! <!-- *** A Section holder is an included component for providing hide-able parts *** --> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'MBean Attributes'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Content> ! <!-- *** This component displays the attributes of an MBean *** --> ! <Component type="org.mc4j.console.dashboard.components.AttributeListComponent"> ! <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="bean" value="#bean"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Border type="javax.swing.border.LineBorder" color="'0x444444'" thickness="1"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! </Component> ! </Content> ! </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'MBean Operations'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.OperationListComponent"> ! <Attribute name="bean" value="#bean"/> ! <Attribute name="format" value="@org.mc4j.console.dashboard.components.OperationListComponent@FULL_FORMAT"/> ! </Component> ! </Content> ! </Component> ! </Content> </Dashboard> Index: RelationsGraph.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/RelationsGraph.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RelationsGraph.xml 8 Apr 2004 15:07:17 -0000 1.4 --- RelationsGraph.xml 12 Apr 2006 19:14:02 -0000 1.5 *************** *** 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"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Relations Graph"> <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Relations Graph"> <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> *************** *** 32,38 **** <Component type="javax.swing.JLabel" id="titleLable"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTHWEST" fill="HORIZONTAL" gridx="1" gridy="1"/--> ! <Attribute name="text" value="(Literal)Relationship graph"/> ! <Attribute name="font" value="(Literal)Dialog bold 24"/> ! <Attribute name="foreground" value="(Literal)0xFF2222"/> </Component> --- 32,38 ---- <Component type="javax.swing.JLabel" id="titleLable"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTHWEST" fill="HORIZONTAL" gridx="1" gridy="1"/--> ! <Attribute name="text" value="'Relationship graph'"/> ! <Attribute name="font" value="'Dialog bold 24'"/> ! <Attribute name="foreground" value="'0xFF2222'"/> </Component> *************** *** 40,46 **** <Component type="javax.swing.JTextArea"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2"/--> ! <Attribute name="text" value="(Literal)This Dashboard displays a graph of the relations in the system."/> ! <Attribute name="opaque" value="(Literal)false"/> ! <Attribute name="editable" value="(Literal)false"/> </Component> --- 40,46 ---- <Component type="javax.swing.JTextArea"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2"/--> ! <Attribute name="text" value="'This Dashboard displays a graph of the relations in the system.'"/> ! <Attribute name="opaque" value="'false'"/> ! <Attribute name="editable" value="'false'"/> </Component> *************** *** 51,61 **** <Component type="javax.swing.JScrollPane"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> <Component type="org.mc4j.console.dashboard.components.RelationsGraphComponent"> ! <Attribute name="beanNode" value="RelationServiceBean"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="preferredSize" value="(Literal)800,800"/> </Component> --- 51,61 ---- <Component type="javax.swing.JScrollPane"> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Content> <Component type="org.mc4j.console.dashboard.components.RelationsGraphComponent"> ! <Attribute name="bean" value="#RelationServiceBean"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="preferredSize" value="'0'"/> </Component> --- NEW FILE: Dashboard_2_0.dtd --- <!ELEMENT Dashboard (#PCDATA | DashboardMatch | Description | Context | LayoutManager | Content)*> <!ATTLIST Dashboard version CDATA #REQUIRED> <!ATTLIST Dashboard name CDATA #REQUIRED> <!ATTLIST Dashboard standardHeader CDATA #IMPLIED> <!ATTLIST Dashboard refreshControl CDATA #IMPLIED> <!ATTLIST Dashboard autoRefresh CDATA #IMPLIED> <!ELEMENT DashboardMatch (#PCDATA | BeanMatch)*> <!ATTLIST DashboardMatch type CDATA #REQUIRED> <!ATTLIST DashboardMatch location CDATA #IMPLIED> <!ELEMENT BeanMatch (#PCDATA | Condition)*> <!ATTLIST BeanMatch id CDATA #REQUIRED> <!ATTLIST BeanMatch type CDATA #REQUIRED> <!ELEMENT Condition (#PCDATA)*> <!ATTLIST Condition type CDATA #REQUIRED> <!ATTLIST Condition filter CDATA #IMPLIED> <!ATTLIST Condition attributeName CDATA #IMPLIED> <!ATTLIST Condition value CDATA #IMPLIED> <!ATTLIST Condition serverType CDATA #IMPLIED> <!ELEMENT Context (#PCDATA)> <!ATTLIST Context name CDATA #IMPLIED> <!ATTLIST Context type CDATA #IMPLIED> <!ATTLIST Context value CDATA #IMPLIED> <!ELEMENT Attribute (#PCDATA | Component)*> <!ATTLIST Attribute name CDATA #REQUIRED> <!ATTLIST Attribute value CDATA #IMPLIED> <!ATTLIST Attribute literal CDATA #IMPLIED> <!ELEMENT Description (#PCDATA)> <!ELEMENT Component (#PCDATA | Constraint | LayoutManager | Content | Attribute | Border)*> <!ATTLIST Component id CDATA #IMPLIED> <!ATTLIST Component type CDATA #REQUIRED> <!ELEMENT Constraint (#PCDATA)> <!ATTLIST Constraint anchor CDATA #IMPLIED> <!ATTLIST Constraint gridx CDATA #IMPLIED> <!ATTLIST Constraint gridy CDATA #IMPLIED> <!ATTLIST Constraint widthx CDATA #IMPLIED> <!ATTLIST Constraint weightx CDATA #IMPLIED> <!ATTLIST Constraint weighty CDATA #IMPLIED> <!ATTLIST Constraint fill CDATA #IMPLIED> <!ATTLIST Constraint insets CDATA #IMPLIED> <!ATTLIST Constraint type CDATA #REQUIRED> <!ATTLIST Constraint direction CDATA #IMPLIED> <!ELEMENT LayoutManager (#PCDATA)> <!ATTLIST LayoutManager rows CDATA #IMPLIED> <!ATTLIST LayoutManager cols CDATA #IMPLIED> <!ATTLIST LayoutManager type CDATA #REQUIRED> <!ATTLIST LayoutManager axis CDATA #IMPLIED> <!ELEMENT Content (#PCDATA | Component)*> <!ELEMENT Border (#PCDATA | Attribute)*> <!ATTLIST Border type CDATA #REQUIRED> <!ATTLIST Border color CDATA #IMPLIED> <!ATTLIST Border thickness CDATA #IMPLIED> <!ATTLIST Border top CDATA #IMPLIED> <!ATTLIST Border left CDATA #IMPLIED> <!ATTLIST Border bottom CDATA #IMPLIED> <!ATTLIST Border right CDATA #IMPLIED> Index: HtmlDocumentTest.html =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/HtmlDocumentTest.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HtmlDocumentTest.html 13 Oct 2004 04:52:45 -0000 1.1 --- HtmlDocumentTest.html 12 Apr 2006 19:14:02 -0000 1.2 *************** *** 4,8 **** <body bgcolor="#CC3388"> ! <h1 style="color: #FF3322">This is a test</h> <p>This document is an example html dashboard for MC4J. It is only a test --- 4,8 ---- <body bgcolor="#CC3388"> ! <h1 style="color: #FF3322">This is a test</h1> <p>This document is an example html dashboard for MC4J. It is only a test Index: HtmlDocumentTest.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/HtmlDocumentTest.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HtmlDocumentTest.xml 13 Oct 2004 04:52:45 -0000 1.1 --- HtmlDocumentTest.xml 12 Apr 2006 19:14:02 -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 1.0//EN" "http://mc4j.org/Dashboard_1_0.dtd"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Html Document View"> <Description>Uses html to lay out a dashboard.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="BeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter=".*"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Html Document View"> <Description>Uses html to lay out a dashboard.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="bean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter=".*"/> </BeanMatch> </DashboardMatch> *************** *** 24,36 **** <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="(Literal)HtmlDocumentTest.html"/> <Content> <Component id="attributeTable" type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="beanNode" value="BeanNode"/> ! <Border type="javax.swing.border.LineBorder" color="(Literal)0x444444" thickness="(Literal)1"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> </Component> --- 24,36 ---- <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> ! <Attribute name="htmlDocumentName" value="'HtmlDocumentTest.html'"/> <Content> <Component id="attributeTable" type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> <!-- *** Notice were setting the node that we matched above by name here *** --> ! <Attribute name="bean" value="bean"/> ! <Border type="javax.swing.border.LineBorder" color="'0x444444'" thickness="'1'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> </Component> *************** *** 41,44 **** --- 41,68 ---- + <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> + + <Attribute name="html"> + <![CDATA[ + + <h3>This is a test</h3> + + <table> + <tr><td>Hello</td><td>Goodbye</td></tr> + <tr<td>Foobar</td><td>Baz Splat</td></tr> + </table> + <br> + <font color="#FF0000">Emergency</font> + + ]]> + + </Attribute> + + <Content> + + </Content> + + </Component> + </Content> </Dashboard> Index: RelationsGraph2.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/RelationsGraph2.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RelationsGraph2.xml 8 Apr 2004 15:07:17 -0000 1.4 --- RelationsGraph2.xml 12 Apr 2006 19:14:02 -0000 1.5 *************** *** 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"> <!-- *************** *** 10,19 **** --> ! <Dashboard version="1.0" name="Relations Graph2" > <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> --- 10,19 ---- --> ! <Dashboard version="2.0" name="Relations Graph2" > <Description>Displays a graph of the relations in the system.</Description> <DashboardMatch type="Bean"> <BeanMatch id="RelationServiceBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="name=RelationService"/> </BeanMatch> </DashboardMatch> *************** *** 31,37 **** <Component type="javax.swing.JLabel" id="titleLable"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTHWEST" fill="HORIZONTAL" gridx="1" gridy="1"/--> ! <Attribute name="text" value="(Literal)Relationship graph2"/> ! <Attribute name="font" value="(Literal)Dialog bold 24"/> ! <Attribute name="foreground" value="(Literal)0xFF2222"/> </Component> --- 31,37 ---- <Component type="javax.swing.JLabel" id="titleLable"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTHWEST" fill="HORIZONTAL" gridx="1" gridy="1"/--> ! <Attribute name="text" value="'Relationship graph2'"/> ! <Attribute name="font" value="'Dialog bold 24'"/> ! <Attribute name="foreground" value="'0xFF2222'"/> </Component> *************** *** 39,44 **** <Component type="javax.swing.JTextArea"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2"/--> ! <Attribute name="text" value="(Literal)This Dashboard displays a graph of the relations in the system."/> ! <Attribute name="opaque" value="(Literal)false"/> </Component> --- 39,44 ---- <Component type="javax.swing.JTextArea"> <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2"/--> ! <Attribute name="text" value="'This Dashboard displays a graph of the relations in the system.'"/> ! <Attribute name="opaque" value="'false'"/> </Component> *************** *** 49,59 **** <Component type="org.mc4j.console.dashboard.components.RelationsGraphComponent4"> ! <Attribute name="beanNode" value="RelationServiceBean"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Attribute name="preferredSize" value="(Literal)600,600"/> ! <Attribute name="size" value="(Literal)600,600"/> </Component> --- 49,59 ---- <Component type="org.mc4j.console.dashboard.components.RelationsGraphComponent4"> ! <Attribute name="bean" value="#RelationServiceBean"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Attribute name="preferredSize" value="'600,600'"/> ! <Attribute name="size" value="'600,600'"/> </Component> Index: Dashboard_1_0.dtd =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/Dashboard_1_0.dtd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Dashboard_1_0.dtd 13 Apr 2004 19:38:29 -0000 1.3 --- Dashboard_1_0.dtd 12 Apr 2006 19:14:02 -0000 1.4 *************** *** 3,6 **** --- 3,8 ---- <!ATTLIST Dashboard name CDATA #REQUIRED> + <!ENTITY StandardHeader SYSTEM "StandardHeader.xml"> + <!ELEMENT DashboardMatch (#PCDATA | BeanMatch)*> <!ATTLIST DashboardMatch type CDATA #REQUIRED> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:40
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/cluster Modified Files: ClusterAddConnectionAction.java ClusterConnection.java Log Message: Merging EMS into head for the 2.0 release work Index: ClusterConnection.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster/ClusterConnection.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ClusterConnection.java 5 Oct 2004 05:15:57 -0000 1.7 --- ClusterConnection.java 12 Apr 2006 19:13:58 -0000 1.8 *************** *** 17,32 **** package org.mc4j.console.cluster; ! import java.util.ArrayList; ! import java.util.Iterator; ! import java.util.List; ! ! import javax.management.MBeanServer; ! ! import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.actions.SystemAction; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,28 ---- package org.mc4j.console.cluster; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.nodes.Node; import org.openide.util.actions.SystemAction; ! import java.util.ArrayList; ! import java.util.Iterator; ! import java.util.List; /** *************** *** 43,47 **** /** Creates a new instance of ClusterConnection */ public ClusterConnection() { ! super(new Children.Array()); setIconBase("org/mc4j/console/connection/DisconnectedConnectionNodeIcon"); --- 39,43 ---- /** Creates a new instance of ClusterConnection */ public ClusterConnection() { ! super(new ConnectionSettings()); setIconBase("org/mc4j/console/connection/DisconnectedConnectionNodeIcon"); *************** *** 69,72 **** --- 65,69 ---- public void initialize(ConnectionSettings settings) { } + public Node.PropertySet[] getPropertySets() { *************** *** 84,91 **** } } ! ! public MBeanServer getMBeanServer() { ! return null; ! } } --- 81,85 ---- } } ! } Index: ClusterAddConnectionAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/cluster/ClusterAddConnectionAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ClusterAddConnectionAction.java 5 Oct 2004 05:15:57 -0000 1.8 --- ClusterAddConnectionAction.java 12 Apr 2006 19:13:58 -0000 1.9 *************** *** 17,24 **** package org.mc4j.console.cluster; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; --- 17,22 ---- package org.mc4j.console.cluster; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDisplayer; import org.openide.ErrorManager; *************** *** 28,33 **** import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.connection.wizard.ConnectionDescriptor; /** --- 26,31 ---- import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; /** |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/dashboard/components/html Modified Files: HtmlDashboardComponent.java DashboardHtmlEditorKit.java MappedObjectView.java Added Files: DashboardHtmlTransformer.java Log Message: Merging EMS into head for the 2.0 release work Index: MappedObjectView.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/MappedObjectView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MappedObjectView.java 14 Mar 2005 16:05:35 -0000 1.2 --- MappedObjectView.java 12 Apr 2006 19:14:01 -0000 1.3 *************** *** 17,34 **** package org.mc4j.console.dashboard.components.html; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.dashboard.components.AttributeComponent; import javax.swing.*; import javax.swing.text.Element; import javax.swing.text.html.HTML; - import javax.swing.text.html.ObjectView; - import javax.swing.text.html.CSS; import javax.swing.text.html.HTMLDocument; import java.awt.*; import java.util.Map; import java.util.NoSuchElementException; import java.util.StringTokenizer; /** --- 17,34 ---- package org.mc4j.console.dashboard.components.html; ! import org.mc4j.console.Refreshable; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.swing.*; import javax.swing.text.Element; + import javax.swing.text.BadLocationException; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLDocument; + import javax.swing.text.html.ObjectView; import java.awt.*; import java.util.Map; import java.util.NoSuchElementException; import java.util.StringTokenizer; + import java.io.IOException; /** *************** *** 41,45 **** private Map contextMap; ! public MappedObjectView(Element elem,Map contextMap) { super(elem); this.contextMap = contextMap; --- 41,45 ---- private Map contextMap; ! public MappedObjectView(Element elem, Map contextMap) { super(elem); this.contextMap = contextMap; *************** *** 52,61 **** try { width = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.WIDTH)); ! } catch(Exception e) {} try { height = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.HEIGHT)); ! } catch(Exception e) {} ! classId = (String)getElement().getAttributes().getAttribute(HTML.Attribute.CLASSID); // String text = (String) getElement().getAttributes().getAttribute("message"); --- 52,63 ---- try { width = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.WIDTH)); ! } catch (Exception e) { ! } try { height = Integer.parseInt((String) getElement().getAttributes().getAttribute(HTML.Attribute.HEIGHT)); ! } catch (Exception e) { ! } ! classId = (String) getElement().getAttributes().getAttribute(HTML.Attribute.CLASSID); // String text = (String) getElement().getAttributes().getAttribute("message"); *************** *** 67,90 **** try { // create an attribute pointer? ! StringTokenizer tok = new StringTokenizer(classId,"."); String beanName = (String) tok.nextElement(); String attributeName = (String) tok.nextElement(); ! if (beanName != null && attributeName != null) { ! MBeanNode bean = (MBeanNode) contextMap.get(beanName); if (bean != null) { ! AttributeNode attributeNode = (AttributeNode) bean.getAttributeNodeMap().get(attributeName); ! if (attributeNode != null) { ! AttributeComponent attributeComponent = new AttributeComponent(); ! attributeComponent.setBeanNode(bean); ! attributeComponent.setAttributeName(attributeName); ! attributeComponent.setContext(contextMap); ! attributeComponent.setToolTipText(attributeNode.getShortDescription()); ! contextMap.put(classId,attributeComponent); ! comp = attributeComponent; } } ! } ! } catch (NoSuchElementException nsee) {} } --- 69,96 ---- try { // create an attribute pointer? ! StringTokenizer tok = new StringTokenizer(classId, "."); String beanName = (String) tok.nextElement(); String attributeName = (String) tok.nextElement(); ! /*if (beanName != null && attributeName != null) { ! EmsBean bean = (EmsBean) co ! ntextMap.get(beanName); if (bean != null) { ! EmsAttribute emsAttribute = bean.getAttribute(attributeName); ! if (emsAttribute != null) { ! // AttributeComponent attributeComponent = new AttributeComponent(); ! // attributeComponent.setBean(bean); ! // attributeComponent.setAttributeName(attributeName); ! // attributeComponent.setContext(contextMap); ! // attributeComponent.setToolTipText(emsAttribute.getDescription()); ! // contextMap.put(classId, attributeComponent); ! // comp = attributeComponent; ! comp = new InfoComponent(getElement(),emsAttribute); } } ! }*/ ! // comp = new InfoComponent(getElement(), null); ! } catch (NoSuchElementException nsee) { ! } } *************** *** 96,105 **** if (comp instanceof JLabel) { // This seems to set the label text a the inline text baseline ! ((JLabel)comp).setAlignmentY(0.80f);//SwingConstants.TOP); Font inlineFont = ! ((HTMLDocument)getDocument()).getStyleSheet().getFont( ! ((HTMLDocument)getDocument()).getStyleSheet().getViewAttributes(this)); ! ((JLabel)comp).setFont(inlineFont); } --- 102,111 ---- if (comp instanceof JLabel) { // This seems to set the label text a the inline text baseline ! ((JLabel) comp).setAlignmentY(0.80f);//SwingConstants.TOP); Font inlineFont = ! ((HTMLDocument) getDocument()).getStyleSheet().getFont( ! ((HTMLDocument) getDocument()).getStyleSheet().getViewAttributes(this)); ! ((JLabel) comp).setFont(inlineFont); } *************** *** 109,111 **** --- 115,190 ---- return comp; } + + /* + public static class InfoComponent extends JComponent implements Refreshable { + static long l; + + EmsAttribute attribute; + int existingInfoLength; + Element element; + String key; + + boolean inited = false; + + public InfoComponent(Element element, EmsAttribute attribute) { + if (element.getDocument() instanceof Tester.InfoBackedHtmlDocument) { + Tester.InfoBackedHtmlDocument doc = (Tester.InfoBackedHtmlDocument) element.getDocument(); + doc.register(this); + } + + setSize(1, 1); + setPreferredSize(new Dimension(1,1)); + setMaximumSize(new Dimension(1,1)); + this.attribute = attribute; + this.element = element; + + HTMLDocument doc = (HTMLDocument) element.getDocument(); + + } + + public void refresh() { + Tester.InfoBackedHtmlDocument doc = (Tester.InfoBackedHtmlDocument) element.getDocument(); + + if (!inited) { + try { + long n = l++; + this.key = "_key" + n; + + doc.dump(System.out); + doc.insertBeforeStart(element,"<span id=\"" + key + "\">Loading...</span>"); + doc.dump(System.out); + Thread.sleep(1000); + doc.dump(System.out); + + this.element = doc.getElement("_key" + String.valueOf(n)); + assert(element != null); + } catch (BadLocationException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + inited = true; + } + + try { + // getDocument().remove(start, oldLength); + Object val = "hi";//attribute.refresh(); + String txt = val == null ? "null" : val.toString(); + + + doc.setOuterHTML(element,"<span id=\"" + key + "\">" + "just a test" + " </span>"); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public Element getElement() { + return element; + } + */ + + } \ No newline at end of file Index: HtmlDashboardComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/HtmlDashboardComponent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HtmlDashboardComponent.java 13 Oct 2004 04:59:36 -0000 1.1 --- HtmlDashboardComponent.java 12 Apr 2006 19:14:01 -0000 1.2 *************** *** 17,26 **** package org.mc4j.console.dashboard.components.html; import org.mc4j.console.dashboard.DashboardComponent; ! import org.openide.modules.InstalledFileLocator; import javax.swing.*; import javax.swing.text.html.HTMLDocument; ! import java.awt.*; import java.io.File; import java.io.IOException; --- 17,36 ---- package org.mc4j.console.dashboard.components.html; + import ognl.OgnlException; + import org.jdesktop.swingx.JXEditorPane; + import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.DashboardComponent; ! import org.mc4j.console.dashboard.context.OgnlHelper; import javax.swing.*; + import javax.swing.text.BadLocationException; + import javax.swing.text.Element; import javax.swing.text.html.HTMLDocument; ! import java.awt.BorderLayout; ! import java.awt.Component; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import java.awt.Graphics2D; ! import java.awt.RenderingHints; import java.io.File; import java.io.IOException; *************** *** 28,31 **** --- 38,42 ---- import java.net.URL; import java.net.URLClassLoader; + import java.util.HashMap; import java.util.Map; *************** *** 40,44 **** --- 51,59 ---- private DashboardHtmlEditorKit editorKit; private String htmlDocumentName; + private String html; + private boolean refreshAttributes; private Map contextMap; + private DashboardHtmlTransformer transformer; + protected void addImpl(Component comp, Object constraints, int index) { *************** *** 52,57 **** public static class AliasedEditorPane extends JEditorPane { protected void paintComponent(Graphics g) { ! ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); super.paintComponent(g); } --- 67,72 ---- public static class AliasedEditorPane extends JEditorPane { protected void paintComponent(Graphics g) { ! ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! RenderingHints.VALUE_ANTIALIAS_ON); super.paintComponent(g); } *************** *** 59,82 **** private void initComponents() { ! editorPane = new AliasedEditorPane(); editorKit = new DashboardHtmlEditorKit(contextMap); editorPane.setEditorKit(editorKit); editorPane.setEditable(false); ! File dashboardDir = ! InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); try { ! URLClassLoader cl = new URLClassLoader(new URL[] { dashboardDir.toURL() }); ! InputStream documentStream = cl.getResourceAsStream(htmlDocumentName); ! editorPane.read(documentStream,(HTMLDocument) editorKit.createDefaultDocument()); } catch (IOException e) { e.printStackTrace(); } setLayout(new BorderLayout()); --- 74,109 ---- private void initComponents() { + setMaximumSize(new Dimension(Short.MAX_VALUE, + Short.MAX_VALUE)); ! ! editorPane = new JXEditorPane(); //new AliasedEditorPane(); editorKit = new DashboardHtmlEditorKit(contextMap); editorPane.setEditorKit(editorKit); editorPane.setEditable(false); ! // File dashboardDir = new File("dashboards"); ! //InstalledFileLocator.getDefault().locate("dashboards","org.mc4j.console",false); + File dashboardFile = (File) contextMap.get(Dashboard.CONTEXT_DASHBOARD_FILE); + File dashboardDir = dashboardFile.getParentFile(); try { ! if (htmlDocumentName != null) { ! URLClassLoader cl = new URLClassLoader(new URL[]{dashboardDir.toURL()}); ! InputStream documentStream = cl.getResourceAsStream(htmlDocumentName); ! editorPane.read(documentStream, editorKit.createDefaultDocument()); ! } else if (html != null) { ! transformer = new DashboardHtmlTransformer(); ! html = transformer.transform(html, contextMap); ! editorPane.setText(html); + } } catch (IOException e) { e.printStackTrace(); } + editorPane.setEditable(false); setLayout(new BorderLayout()); *************** *** 86,104 **** } - public String getHtmlDocumentName() { - return htmlDocumentName; - } - public void setHtmlDocumentName(String htmlDocumentName) { this.htmlDocumentName = htmlDocumentName; } public void setContext(Map context) { ! this.contextMap = context; initComponents(); } ! public void refresh() { ! initComponents(); } } --- 113,186 ---- } public void setHtmlDocumentName(String htmlDocumentName) { this.htmlDocumentName = htmlDocumentName; } + public void setHtml(String html) { + this.html = html; + } + public void setContext(Map context) { ! this.contextMap = new HashMap(context); initComponents(); } ! ! ! private Map<String, Element> elements = new HashMap<String, Element>(); ! ! public synchronized void refresh() { ! //initComponents(); ! ! // try { ! // HTMLDocument doc = (HTMLDocument) editorPane.getDocument(); ! // doc. ! // editorPane.getDocument().insertString(editorPane.getDocument().getEndPosition().getOffset(),"\n<P>Add some more lines</P>",null); ! // } catch (BadLocationException e) { ! // e.printStackTrace(); ! // } ! ! if (transformer != null) { ! final HTMLDocument doc = (HTMLDocument) editorPane.getDocument(); ! ! ! ! for (Map.Entry<String, String> entry : transformer.getKeys().entrySet()) { ! ! String displayValue; ! try { ! Object val = OgnlHelper.getValue(entry.getValue(),contextMap, String.class); ! //Ognl.getValue(entry.getValue(), contextMap); ! displayValue = val != null ? val.toString() : "null"; ! } catch (OgnlException e) { ! e.printStackTrace(); ! displayValue = "~unreadable: " + e.getMessage() + "~"; ! } ! try { ! final Element e = doc.getElement(entry.getKey()); ! ! final int p0 = e.getStartOffset(); ! final int p1 = e.getEndOffset(); ! ! final String displayValue1 = displayValue; ! SwingUtilities.invokeAndWait(new Runnable() { ! public void run() { ! try { ! doc.replace(p0, p1 - p0, ! displayValue1, ! e.getAttributes()); ! } catch (BadLocationException e1) { ! e1.printStackTrace(); ! } ! ! } ! }); ! // doc.setOuterHTML(e, "<span id=\"" + entry.getKey() + "\">" + displayValue + "</span>"); ! } catch (Exception e1) { ! e1.printStackTrace(); ! } ! } ! ! } } } Index: DashboardHtmlEditorKit.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components/html/DashboardHtmlEditorKit.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DashboardHtmlEditorKit.java 13 Oct 2004 04:59:36 -0000 1.1 --- DashboardHtmlEditorKit.java 12 Apr 2006 19:14:01 -0000 1.2 *************** *** 19,22 **** --- 19,23 ---- import org.mc4j.console.swing.html.ClassPathImageView; + import javax.swing.*; import javax.swing.text.Element; import javax.swing.text.StyleConstants; *************** *** 25,28 **** --- 26,30 ---- import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLEditorKit; + import javax.swing.text.html.ParagraphView; import java.util.Map; *************** *** 53,68 **** public View create(Element elem) { Object o = ! elem.getAttributes().getAttribute(StyleConstants.NameAttribute); if (o instanceof HTML.Tag) { HTML.Tag kind = (HTML.Tag) o; ! if (kind == HTML.Tag.IMG) { ! return new ClassPathImageView(elem); ! } else if (kind == HTML.Tag.OBJECT) { return new MappedObjectView(elem, contextMap); } } ! return super.create( elem ); } } } --- 55,96 ---- public View create(Element elem) { Object o = ! elem.getAttributes().getAttribute(StyleConstants.NameAttribute); ! if (o instanceof HTML.Tag) { HTML.Tag kind = (HTML.Tag) o; ! if (kind == HTML.Tag.IMG) { ! return new ClassPathImageView(elem); ! } else if (kind == HTML.Tag.OBJECT) { return new MappedObjectView(elem, contextMap); + } else if (kind == HTML.Tag.P || kind == HTML.Tag.IMPLIED) { + return new WordSplittingParagraphView(elem); } } ! return super.create(elem); ! } ! } ! ! ! /** ! * This just allows us to split long words onto multiple lines instead of ! * making the component bigger. ! */ ! private static class WordSplittingParagraphView extends ParagraphView { ! public WordSplittingParagraphView(Element elem) { ! super(elem); ! } ! ! protected SizeRequirements calculateMinorAxisRequirements(int axis, ! SizeRequirements r) { ! SizeRequirements sup = super.calculateMinorAxisRequirements(axis, r); ! // TODO: This is the minumum rendering size (sizes smaller than a displayable character) ! // will cause the renderer to go nuts. Should never size smaler than the largest character in a ! // paragraph ! sup.minimum = 30; ! return sup; } } + + } --- NEW FILE: DashboardHtmlTransformer.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.html; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @author Greg Hinkle (gh...@us...), Dec 21, 2005 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:01 $) */ public class DashboardHtmlTransformer { static int n; private Map<String, String> keys = new HashMap<String, String>(); public String transform(String data, Map context) { // Searches for cases of ${foo.bar.baz} as they are property references Pattern pattern = Pattern.compile("\\$\\{([^\\}]*)\\}"); String result = transformForEach(data,context); Matcher m = pattern.matcher(result); while (m.find()) { String identifier = m.group(); identifier = identifier.substring(2,identifier.length()-1); String key = "key" + ++n; result = m.replaceFirst("<span id=\"" + key +"\">loading...</span>"); keys.put(key,identifier); m = pattern.matcher(result); //System.out.println(key + " = " + identifier); } return result; } private String transformForEach(String data, Map context) { Pattern pattern = Pattern.compile("\\#foreach\\(([^\\)]*)\\)(.*)\\#endfor",Pattern.MULTILINE|Pattern.DOTALL); // Pattern pattern = Pattern.compile("\\#foreach\\(([^\\)]*)\\)(.*)\\#endfor", Pattern.MULTILINE|Pattern.DOTALL); Matcher m = pattern.matcher(data); while (m.find()) { StringBuffer allRows = new StringBuffer(); String variableAssignment = m.group(1); String content = m.group(2); String[] vars =variableAssignment.split("\\:"); String key = vars[0].trim(); String contextKey = vars[1].trim(); Collection c; try { contextKey = Pattern.compile("\\$\\{(.*)\\}").matcher(contextKey).replaceAll("$1"); Object val = ognl.Ognl.getValue(contextKey,context); if (val.getClass().isArray()) { c = Arrays.asList((Object[]) val); } else { c = (Collection) val; } } catch (Exception e) { c = Collections.EMPTY_LIST; } key = key.replace("$","\\$"); Pattern p = Pattern.compile(key); //("\\$\\{(.*)(" + key + ")(.*)\\}"); for (Object row : c) { allRows.append(p.matcher(content).replaceAll(row.toString())); //("\\${$1"+row.toString()+"$3}")); } data = data.substring(0,m.start()) + allRows.toString() + data.substring(m.end(),data.length()); m = pattern.matcher(data); } return data; } public Map<String, String> getKeys() { return Collections.unmodifiableMap(keys); } public static void main3(String[] args) { String[] foo = new String[] { "a","b"}; Object bar = foo; System.out.println(Arrays.asList((Object[]) bar).size()); } public static void main(String[] args) { String test = "<html> hello, world <p> \n <b>${foo.bar}</b> ${baz} - [${biteme}] $100.50 {cool}\n" + " #foreach($foo : ${bar[\"woa\"]}) \n" + " <b> woa neat</b>\n" + " Cool: ${$foo.bar.baz a.b[\"$foo\"]}\n" + " #endfor\n" + " bah. ${last.one}"; System.out.println("Start:\n"+test); Map ctx = new HashMap(); ctx.put("bar", Arrays.asList(new String[] { "alpha","beta","gamma","delta" })); System.out.println("Transform:\n"+ new DashboardHtmlTransformer().transform(test,ctx)); } public static void main2(String[] args) { Pattern p = Pattern.compile("\\#foreach\\((.*)\\)(.*)\\#endfor",Pattern.MULTILINE|Pattern.DOTALL); Matcher m = p.matcher("fdgh #foreach($a : ${b.c.d}) foo\n bar\n baz\n #endfor dfg "); System.out.println(m.find()); System.out.println(m.group(1)); } } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:40
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/attribute/watch/monitor Modified Files: StartMonitoringAction.java MonitorFactory.java BeanMonitorNode.java StopMonitoringAction.java Log Message: Merging EMS into head for the 2.0 release work Index: StartMonitoringAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/StartMonitoringAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StartMonitoringAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- StartMonitoringAction.java 12 Apr 2006 19:14:00 -0000 1.3 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch.monitor; - 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; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.MonitorTopComponent; - /** * Action sensitive to the node selection that does something useful. --- 17,24 ---- Index: BeanMonitorNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/BeanMonitorNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanMonitorNode.java 5 Oct 2004 05:15:55 -0000 1.2 --- BeanMonitorNode.java 12 Apr 2006 19:14:00 -0000 1.3 *************** *** 18,67 **** import org.jfree.ui.ExtensionFileFilter; ! ! import java.io.File; ! import java.io.FileFilter; ! import java.io.IOException; ! import java.net.MalformedURLException; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! import java.util.Date; ! import java.util.ArrayList; ! import java.util.Timer; ! import java.util.TimerTask; ! import java.lang.reflect.InvocationTargetException; ! import java.beans.PropertyEditor; ! import java.beans.PropertyEditorSupport; ! ! import javax.swing.Action; ! import javax.swing.JOptionPane; ! import javax.swing.JFileChooser; ! import org.openide.ErrorManager; - import org.openide.modules.InstalledFileLocator; - import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; - import org.openide.nodes.Sheet; - import org.openide.nodes.PropertySupport; import org.openide.util.HelpCtx; - import org.openide.util.NbBundle; - import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.ConnectAction; ! import org.mc4j.console.IConnectionNode; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.watch.log.Logger; ! import org.mc4j.console.bean.attribute.watch.log.AttributeLogger; ! import org.mc4j.console.bean.attribute.watch.monitor.StartMonitoringAction; ! import org.mc4j.console.bean.attribute.watch.monitor.StopMonitoringAction; ! import org.mc4j.console.bean.attribute.watch.monitor.AbstractMonitorNode; ! import org.mc4j.console.bean.attribute.AttributeNode; /** --- 18,33 ---- import org.jfree.ui.ExtensionFileFilter; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.attribute.watch.log.AttributeLogger; ! import org.mc4j.console.bean.attribute.watch.log.Logger; import org.openide.ErrorManager; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; ! import javax.swing.*; ! import java.io.File; ! import java.io.IOException; /** Index: MonitorFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/MonitorFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MonitorFactory.java 5 Oct 2004 05:15:55 -0000 1.2 --- MonitorFactory.java 12 Apr 2006 19:14:00 -0000 1.3 *************** *** 17,29 **** package org.mc4j.console.bean.attribute.watch.monitor; - import org.openide.ErrorManager; - import org.mc4j.console.bean.attribute.AttributeNode; - import javax.management.monitor.CounterMonitor; import javax.management.monitor.CounterMonitorMBean; - import javax.management.ObjectName; - import javax.management.ObjectInstance; - import javax.management.MBeanServerInvocationHandler; --- 17,24 ---- package org.mc4j.console.bean.attribute.watch.monitor; import org.mc4j.console.bean.attribute.AttributeNode; + import org.openide.ErrorManager; import javax.management.monitor.CounterMonitorMBean; *************** *** 40,49 **** try { ! String domain = node.getServer().getDefaultDomain(); ! ObjectName counterMonitorName = new ObjectName(domain + ":name=CounterMonitor" + monitorIndex++); ! ObjectInstance instance = ! node.getServer().createMBean("javax.management.monitor.CounterMonitor", counterMonitorName); --- 35,44 ---- try { ! // String domain = node.getServer().getDefaultDomain(); ! // ObjectName counterMonitorName = new ObjectName(domain + ":name=CounterMonitor" + monitorIndex++); ! // ObjectInstance instance = ! // node.getServer().createMBean("javax.management.monitor.CounterMonitor", counterMonitorName); *************** *** 60,65 **** //monitor.addObservedObject(node.getObjectName()); ! node.getServer().addNotificationListener( ! instance.getObjectName(), new MonitorListener(), null, null); monitor.start(); --- 55,60 ---- //monitor.addObservedObject(node.getObjectName()); ! // node.getServer().addNotificationListener( ! // instance.getObjectName(), new MonitorListener(), null, null); monitor.start(); Index: StopMonitoringAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/monitor/StopMonitoringAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StopMonitoringAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- StopMonitoringAction.java 12 Apr 2006 19:14:00 -0000 1.3 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch.monitor; - 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; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.MonitorTopComponent; - /** * Action sensitive to the node selection that does something useful. --- 17,24 ---- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:40
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/wizard Modified Files: ConnectionDescriptor.java ServerInstallVisualPanel.java ConnectionIterator.java ServerInstallPanel.java ClassPathListPanel.java ClassPathListVisualPanel.java ConnectionVisualPanel.java Removed Files: JBossConnectorChoicePanel.java JBossConnectorChoiceVisualPanel.java Log Message: Merging EMS into head for the 2.0 release work Index: ClassPathListVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListVisualPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ClassPathListVisualPanel.java 5 Oct 2004 05:15:59 -0000 1.7 --- ClassPathListVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.8 *************** *** 17,32 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; import java.io.File; import java.util.ArrayList; import java.util.List; - import javax.swing.DefaultListModel; - import javax.swing.JFileChooser; - import javax.swing.JPanel; - import javax.swing.filechooser.FileFilter; - - import org.openide.util.NbBundle; - /** * This visual panel lets you manage a list of class path entries --- 17,29 ---- package org.mc4j.console.connection.wizard; ! import org.openide.util.NbBundle; ! ! import javax.swing.*; ! import javax.swing.filechooser.FileFilter; ! import java.awt.*; import java.io.File; import java.util.ArrayList; import java.util.List; /** * This visual panel lets you manage a list of class path entries *************** *** 76,94 **** } ! public void setFileList(List fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (int i = 0; i < fileList.size(); i++) { ! File file = (File) fileList.get(i); ! ((DefaultListModel)this.jListEntries.getModel()).addElement(file); } } } ! public List getFileList() { ! List results = new ArrayList(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add(this.jListEntries.getModel().getElementAt(i)); } return results; --- 73,90 ---- } ! public void setFileList(List<File> fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (File file : fileList) { ! ((DefaultListModel) this.jListEntries.getModel()).addElement(file); } } } ! public List<File> getFileList() { ! List<File> results = new ArrayList<File>(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add((File) this.jListEntries.getModel().getElementAt(i)); } return results; --- JBossConnectorChoicePanel.java DELETED --- Index: ConnectionIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionIterator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConnectionIterator.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionIterator.java 12 Apr 2006 19:14:00 -0000 1.12 *************** *** 50,55 **** new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor), ! new JBossConnectorChoicePanel(this.connectionDescriptor) }; } --- 50,54 ---- new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor) }; } *************** *** 61,66 **** "Connect to Server", "Select Server Installation", ! "Customize classpath", ! "Choose connector" }; } --- 60,64 ---- "Connect to Server", "Select Server Installation", ! "Customize classpath" }; } *************** *** 113,119 **** case 2: return true; - case 3: - return false; - //return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); default: throw new NoSuchElementException (); --- 111,114 ---- Index: ConnectionDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionDescriptor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConnectionDescriptor.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionDescriptor.java 12 Apr 2006 19:14:00 -0000 1.12 *************** *** 17,29 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,27 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import java.awt.*; ! import java.net.MalformedURLException; ! import java.net.URL; /** Index: ServerInstallVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallVisualPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ServerInstallVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.9 --- ServerInstallVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.10 *************** *** 29,34 **** import java.awt.event.ActionListener; import java.io.File; - import java.util.Iterator; - import java.util.Set; /** --- 29,32 ---- *************** *** 96,103 **** serverInstallList.getSelectionModel().addListSelectionListener(this); ! Set installs = ServerInstallSetDatabase.getNodes(); ! for (Iterator iterator = installs.iterator(); iterator.hasNext();) { ! ServerInstallInfo serverInstallSettings = (ServerInstallInfo) iterator.next(); ! serverInstallModel.addElement(serverInstallSettings); } --- 94,98 ---- serverInstallList.getSelectionModel().addListSelectionListener(this); ! for (ServerInstallInfo serverInstallSettings : ServerInstallSetDatabase.getNodes()) { serverInstallModel.addElement(serverInstallSettings); } Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ServerInstallPanel.java 14 Mar 2005 15:16:17 -0000 1.13 --- ServerInstallPanel.java 12 Apr 2006 19:14:00 -0000 1.14 *************** *** 130,134 **** return; ! List fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); --- 130,134 ---- return; ! List<File> fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); *************** *** 169,173 **** } ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray((new File[fileList.size()]))); System.out.println("Saving " + settings.hashCode()); } --- 169,173 ---- } ! this.descriptor.getSettings().setClassPathEntries(fileList); System.out.println("Saving " + settings.hashCode()); } Index: ConnectionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionVisualPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ConnectionVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.20 --- ConnectionVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.21 *************** *** 17,25 **** package org.mc4j.console.connection.wizard; - import org.mc4j.console.ManagementNode; - import org.mc4j.console.connection.install.ConnectionTypeDescriptor; - import org.mc4j.console.connection.persistence.ConnectionSettings; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; --- 17,25 ---- package org.mc4j.console.connection.wizard; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; + import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; + import org.mc4j.ems.connection.ConnectionFactory; + import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; *************** *** 32,45 **** import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.Set; ! import java.util.HashMap; /** --- 32,43 ---- import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Dialog; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.*; /** *************** *** 61,65 **** private final ConnectionDescriptor connectionDescriptor; ! private Map advancedProperties; --- 59,63 ---- private final ConnectionDescriptor connectionDescriptor; ! private Properties advancedProperties; *************** *** 67,71 **** /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(ManagementNode.CONNECTION_DESCRIPTORS), Color.darkGray, 2); initComponents(); --- 65,69 ---- /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(new Vector(ConnectionFactory.getConnectionTypes())), Color.darkGray, 2); initComponents(); *************** *** 96,110 **** throw new IllegalStateException(mfue.toString()); } - - - } - - private static Object[] getConnectionTypeNames() { - Object[] names = new Object[ManagementNode.CONNECTION_DESCRIPTORS.length]; - for (int i = 0; i < ManagementNode.CONNECTION_DESCRIPTORS.length; i++) { - ConnectionTypeDescriptor descriptor = ManagementNode.CONNECTION_DESCRIPTORS[i]; - names[i] = descriptor.getDisplayName(); - } - return names; } --- 94,97 ---- *************** *** 118,122 **** dMessage = null; ! Map dAdvancedProperties = null; dName = ""; // Everyone needs a name --- 105,109 ---- dMessage = null; ! Properties dAdvancedProperties = null; dName = ""; // Everyone needs a name *************** *** 155,159 **** if (dAdvancedProperties != null) { ! this.advancedProperties = new HashMap(dAdvancedProperties); } } --- 142,146 ---- if (dAdvancedProperties != null) { ! this.advancedProperties = dAdvancedProperties; } } *************** *** 170,174 **** settings.setCredentials(this.credentialsField.getText()); settings.setAdvancedProperties(this.advancedProperties); - settings.setAdvancedProperties(this.advancedProperties); } --- 157,160 ---- Index: ClassPathListPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassPathListPanel.java 5 Oct 2004 05:15:59 -0000 1.6 --- ClassPathListPanel.java 12 Apr 2006 19:14:00 -0000 1.7 *************** *** 17,31 **** package org.mc4j.console.connection.wizard; ! import java.awt.Component; ! import java.io.File; ! import java.util.Arrays; ! import java.util.List; ! ! import javax.swing.event.ChangeListener; ! import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import org.mc4j.console.ManagementNode; /** --- 17,28 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.console.ManagementNode; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import javax.swing.event.ChangeListener; ! import java.awt.*; ! import java.io.File; ! import java.util.List; /** *************** *** 123,128 **** System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! List fileList = Arrays.asList(descriptor.getSettings().getClassPathEntries()); ! ((ClassPathListVisualPanel)getComponent()).setFileList(fileList); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); --- 120,124 ---- System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! ((ClassPathListVisualPanel)getComponent()).setFileList(descriptor.getSettings().getClassPathEntries()); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); *************** *** 130,138 **** public void storeSettings(Object settings) { ! List fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray(new File[fileList.size()])); ! } --- 126,133 ---- public void storeSettings(Object settings) { ! List<File> fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries(fileList); } --- JBossConnectorChoiceVisualPanel.java DELETED --- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:40
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/jre15 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/jre15 Modified Files: JRE15_ThreadTree.xml JRE15_MemoryUsage_AllPools.xml JRE15_MemoryUsage_AreaChart.xml JRE15_MemoryUsagePools_PieChart.xml JRE15_MemoryUsage_Graph.xml JRE15_MemoryUsage_LineChart.xml JRE15_Deadlock.xml Added Files: JRE15_GarbageCollector.xml JRE15_ThreadInfo.xml JRE15_SystemInfo.xml Log Message: Merging EMS into head for the 2.0 release work Index: JRE15_MemoryUsage_AllPools.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_AllPools.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JRE15_MemoryUsage_AllPools.xml 8 May 2004 03:55:34 -0000 1.1 --- JRE15_MemoryUsage_AllPools.xml 12 Apr 2006 19:14:01 -0000 1.2 *************** *** 1,97 **** <?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="All Memory Pool Graphs"> ! ! <Description>Memory usage graph for all JRE 1.5 Memory Pools.</Description> ! ! <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MemoryPoolList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> ! </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> ! </Content> ! </Component> ! ! <!-- *** Scroll pane of info *** --> ! <Component type="javax.swing.JScrollPane"> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Content> ! <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> ! <Attribute name="BeanList" value="MemoryPoolList"/> ! <Attribute name="IdKey" value="(Literal)beanNode"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="preferredSize" value="100,100"/> ! <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> ! <Content> - <Component type="org.mc4j.console.swing.SectionHolder"> - <Attribute name="title" value="(Literal)Usage"/> - <Attribute name="background" value="(Literal)0xFFFFFF"/> - <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> - <Content> - <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> - <Attribute name="beanNode" value="beanNode"/> - <Attribute name="preferredSize" value="(Literal)400,250"/> - <Attribute name="attributeName" value="(Literal)Usage"/> - </Component> - </Content> - </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="beanNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> ! </Component> ! </Content> </Component> ! <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> - </Component> </Content> ! </Component> ! ! ! </Content> </Dashboard> --- 1,61 ---- <?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="All Memory Pool Graphs"> ! <Description>Memory usage graph for all JRE 1.5 Memory Pools.</Description> ! <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> ! </BeanMatch> ! </DashboardMatch> ! <LayoutManager type="org.jdesktop.swingx.VerticalLayout"/> ! <Content> ! ! ! <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> ! ! <Attribute name="beanList" value="memoryPools"/> ! <Attribute name="IdKey" value="'memoryPool'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="preferredSize" value="100,100"/> ! <LayoutManager type="" axis="Y_AXIS"/> ! <Content> ! ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> + </Content> + </Component> ! <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> ! <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> ! <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> + </Content> ! ! </Component> ! ! ! </Content> </Dashboard> Index: JRE15_Deadlock.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_Deadlock.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JRE15_Deadlock.xml 5 Oct 2004 04:01:07 -0000 1.1 --- JRE15_Deadlock.xml 12 Apr 2006 19:14:01 -0000 1.2 *************** *** 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="Deadlock"> <Description>Deadlocked threads.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="MBeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="Deadlock" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Deadlocked threads.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="threadingBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> *************** *** 14,55 **** <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.JScrollPane"> ! <Content> ! <Component type="org.mc4j.jre15.components.DeadlockDetectionComponent"/> ! </Content> ! </Component> </Content> </Dashboard> --- 14,24 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! ! <Component type="org.mc4j.jre15.components.DeadlockDetectionComponent"> ! <Attribute name="bean" value="threadingBean"/> ! </Component> ! </Content> </Dashboard> Index: JRE15_MemoryUsage_AreaChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_AreaChart.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JRE15_MemoryUsage_AreaChart.xml 26 May 2004 03:10:58 -0000 1.1 --- JRE15_MemoryUsage_AreaChart.xml 12 Apr 2006 19:14:01 -0000 1.2 *************** *** 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="Pool Usage Area Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MemoryPools" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="Pool Usage Area Chart" standardHeader="true" autoRefresh="false" refreshControl="false"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <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.jre15.components.MemoryUsageAreaChartComponent"> ! <Attribute name="beanList" value="MemoryPools"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> --- 15,23 ---- <Content> ! ! <Component type="org.mc4j.jre15.components.MemoryUsageAreaChartComponent"> ! <Attribute name="beanList" value="#memoryPools"/> ! <Attribute name="preferredSize" value="'400,250'"/> </Component> Index: JRE15_MemoryUsage_Graph.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_Graph.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JRE15_MemoryUsage_Graph.xml 8 Apr 2004 21:38:26 -0000 1.4 --- JRE15_MemoryUsage_Graph.xml 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 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="(Message){name} Memory Pool Graph"> <Description>Memory usage graph for a JRE 1.5 Memory Pool.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="MemoryPoolNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="(Message){name} Memory Pool Graph" standardHeader="true"> <Description>Memory usage graph for a JRE 1.5 Memory Pool.</Description> <DashboardMatch type="Bean"> ! <BeanMatch id="memoryPool" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,53 **** <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> ! <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> --- 15,26 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! ! <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> *************** *** 56,67 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="MemoryPoolNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)Usage"/> </Component> </Content> --- 29,40 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> </Content> *************** *** 69,87 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="beanNode" value="MemoryPoolNode"/> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> </Component> </Content> </Component> - <Component type="org.mc4j.console.dashboard.components.FillerComponent"> - <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> - </Component> </Content> --- 42,57 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="bean" value="#memoryPool"/> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> </Content> --- NEW FILE: JRE15_GarbageCollector.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="Garbage Collectors" standardHeader="true" autoRefresh="true" refreshControl="true"> <Description>Garbage collector information.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> <BeanMatch id="garbageCollectors" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="type=GarbageCollector"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <!--<Component type="org.mc4j.console.dashboard.components.TabularDataComponent"> <Attribute name="bean" value="gcBean"/> <Attribute name="attributeName" value="'LastGcInfo'"/> </Component>--> <Component type="org.mc4j.console.dashboard.components.ForEachPanelComponent"> <Attribute name="beanList" value="#garbageCollectors"/> <Attribute name="IdKey" value="'collector'"/> <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> <Content> <Component type="org.mc4j.console.swing.SectionHolder"> <Attribute name="title" value="#collector.name"/> <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> <Attribute name="html"> <![CDATA[ <html> <h1>Garbage Collector: ${collector["Name"]}</h1> <b>Collections:</b> ${collector["CollectionCount"]}<br> <b>Total Collection Time:</b> ${collector["CollectionTime"]}<br> <b>Collections:</b> ${collector["CollectionCount"]}<br> <b>Last Collection:</b><br> <blockquote> <b>Duration:</b> ${collector["LastGcInfo"]["endTime"] - collector["LastGcInfo"]["startTime"]}<br> <b>Id:</b> ${collector["LastGcInfo"]["id"]}<br> #foreach($pool : ${collector["MemoryPoolNames"]}) <blockquote> <b>${collector["LastGcInfo"].memoryUsageAfterGc["$pool"].key}</b><br> Usage Delta: ${(collector["LastGcInfo"].memoryUsageAfterGc["$pool"].value.used - collector["LastGcInfo"].memoryUsageBeforeGc["$pool"].value.used) / 1024} KB </blockquote> #endfor </blockquote> </html> ]]> </Attribute> </Component> </Content> </Component> </Content> </Component> </Content> </Dashboard> Index: JRE15_MemoryUsagePools_PieChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsagePools_PieChart.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JRE15_MemoryUsagePools_PieChart.xml 16 Apr 2004 15:57:46 -0000 1.4 --- JRE15_MemoryUsagePools_PieChart.xml 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 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="Pool Usage Pie Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="Pool Usage Pie Chart" standardHeader="true"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 15,56 **** <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.jre15.components.MemoryUsagePieChartComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> --- 15,30 ---- <Content> <Component type="org.mc4j.jre15.components.MemoryUsagePieChartComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="beanList" value="#memoryPools"/> </Component> <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> *************** *** 59,69 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)Usage"/> </Component> </Content> --- 33,43 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'Usage'"/> </Component> </Content> *************** *** 71,88 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Peak Usage"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> ! <Attribute name="attributeName" value="(Literal)PeakUsage"/> </Component> </Content> </Component> - <Component type="org.mc4j.console.dashboard.components.FillerComponent"> - <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> - </Component> </Content> --- 45,59 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Peak Usage'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.jre15.components.MemoryUsageComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="attributeName" value="'PeakUsage'"/> </Component> </Content> </Component> </Content> Index: JRE15_ThreadTree.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_ThreadTree.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JRE15_ThreadTree.xml 16 Apr 2004 15:57:46 -0000 1.4 --- JRE15_ThreadTree.xml 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 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="Threading"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="MBeanNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="Threading" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> ! <BeanMatch id="threadBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> *************** *** 15,51 **** <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.jre15.components.ThreadMBeanThreadBrowserComponent"> </Component> --- 15,22 ---- <Content> ! <Component type="org.mc4j.jre15.components.ThreadMBeanThreadBrowserComponent"> + <Attribute name="bean" value="#threadBean"/> </Component> --- NEW FILE: JRE15_SystemInfo.xml --- <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 2.0//EN" "http://mc4j.org/Dashboard_2_0.dtd"> <Dashboard version="2.0" name="JVM Info" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>General Java Virtual Machine statistics</Description> <DashboardMatch type="Global" location="/JVM"> <BeanMatch id="Runtime" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Runtime"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="OperatingSystem" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=OperatingSystem"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Threading" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Memory" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Memory"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="ClassLoading" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=ClassLoading"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="Compilation" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Compilation"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> <BeanMatch id="garbageCollectors" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="type=GarbageCollector"/> <Condition type="BeanObjectNameRegexCondition" filter="java.lang"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.html.HtmlDashboardComponent"> <Attribute name="html"> <![CDATA[ <table cellpadding="2"> <tr><td colspan="2"><font size="+2"><u>Summary</u></font></u></td></tr> <tr> <td align="right"><b>Uptime:</b></td><td> ${#format.timeMillis(#Runtime.Uptime)}</td> <td align="right"><b>Process CPU Time:</b></td><td> ${#format.timeNanos(#OperatingSystem.ProcessCpuTime)} </td> </tr> <tr><td colspan="2"><font size="+2"><u>Threads</u></font></td></tr> <tr> <td align="right"><b>Live Threads:</b></td><td> ${Threading.ThreadCount}</td> <td align="right"><b>Peak Threads:</b></td><td> ${Threading.PeakThreadCount}</td> </tr> <tr> <td align="right"><b>Daemon Threads:</b></td><td> ${Threading.DaemonThreadCount}</td> <td align="right"><b>Total Started:</b></td><td> ${Threading.TotalStartedThreadCount}</td> </tr> <tr><td colspan="4"><font size="+2"><u>Memory</u></font></td></tr> <tr> <td align="right"><b>Current Heap Size:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["used"])}</td> <td align="right"><b>Commited Heap:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["committed"])}</td> </tr> <tr> <td align="right"><b>Maximum Heap:</b></td><td> ${#format.sizeBytes(Memory.HeapMemoryUsage["max"])}</td> <td align="right"><b>Object pending finalization:</b></td><td> ${Memory.ObjectPendingFinalizationCount}</td> </tr> <tr><td colspan="4"><font size="+2"><u>Classes</u></font></td></tr> <tr> <td align="right"><b>Current classes loaded:</b></td><td> ${ClassLoading.LoadedClassCount}</td> <td align="right"><b>Unloaded classes:</b></td><td> ${ClassLoading.UnloadedClassCount}</td> </tr> <tr> <td align="right"><b>Total classes loaded:</b></td><td> ${ClassLoading.TotalLoadedClassCount}</td> <td align="right"><b>Compile time:</b></td><td> ${#format.timeMillis(Compilation.TotalCompilationTime)}</td> </tr> </table> <object classid="SystemProperties"> </object> ]]> </Attribute> <Content> <Component type="org.mc4j.console.swing.SectionHolder" id="SystemProperties"> <Attribute name="title" value="'System Properties'"/> <!--<Attribute name="width" value="'500'"/>--> <Content> <Component type="org.mc4j.console.dashboard.components.TabularDataComponent"> <Attribute name="bean" value="#Runtime"/> <Attribute name="refreshable" value="false"/> <Attribute name="preferredSize" value="'500,350'"/> <Attribute name="attributeName" value="'SystemProperties'"/> </Component> </Content> </Component> </Content> </Component> <!-- #foreach($collector : ${garbageCollectors}) <tr> <td>Garbage Collector: ${$collector.Name}</td> <td colspan="3"> Collections: ${$collector.CollectionCount} Collection Time: ${$collector.CollectionTime} </td> </tr> #endfor --> </Content> </Dashboard> Index: JRE15_MemoryUsage_LineChart.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/jre15/JRE15_MemoryUsage_LineChart.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JRE15_MemoryUsage_LineChart.xml 16 Apr 2004 15:57:38 -0000 1.4 --- JRE15_MemoryUsage_LineChart.xml 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 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="Pool Usage Line Chart"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="MBeanList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> --- 1,12 ---- <?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="Pool Usage Line Chart" standardHeader="true"> <Description>Memory usage chart of pools for a 1.5 JVM.</Description> <DashboardMatch type="Global" location="/JVM/Memory"> ! <BeanMatch id="memoryPools" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=MemoryPool"/> </BeanMatch> </DashboardMatch> *************** *** 14,48 **** <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.jre15.components.MemoryUsageLineChartComponent"> ! <Attribute name="preferredSize" value="(Literal)400,250"/> </Component> --- 14,22 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <Component type="org.mc4j.jre15.components.MemoryUsageLineChartComponent"> ! <Attribute name="preferredSize" value="'400,250'"/> ! <Attribute name="beanList" value="#memoryPools"/> </Component> --- NEW FILE: JRE15_ThreadInfo.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="Thread Info" autoRefresh="true" refreshControl="true" standardHeader="true"> <Description>Live thread states and stacks.</Description> <DashboardMatch type="Global" location="/JVM"> <BeanMatch id="threadBean" type="Single"> <Condition type="BeanObjectNameRegexCondition" filter="type=Threading"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.jre15.components.ThreadsViewComponent"> <Attribute name="bean" value="#threadBean"/> </Component> </Content> </Dashboard> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:39
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/attribute/watch Modified Files: CreateMonitorAction.java MonitorRootNode.java Log Message: Merging EMS into head for the 2.0 release work Index: MonitorRootNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/MonitorRootNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MonitorRootNode.java 5 Oct 2004 05:15:55 -0000 1.2 --- MonitorRootNode.java 12 Apr 2006 19:14:02 -0000 1.3 *************** *** 17,47 **** package org.mc4j.console.bean.attribute.watch; ! import java.io.File; ! import java.io.FileFilter; ! import java.net.MalformedURLException; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.Set; ! ! import javax.swing.Action; ! import javax.swing.JOptionPane; ! ! import org.openide.ErrorManager; ! import org.openide.modules.InstalledFileLocator; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; - import org.openide.util.NbBundle; import org.openide.util.actions.NodeAction; ! import org.mc4j.console.connection.persistence.ConnectionSetDatabase; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.ConnectAction; ! import org.mc4j.console.IConnectionNode; /** --- 17,28 ---- package org.mc4j.console.bean.attribute.watch; ! import org.mc4j.console.ConnectAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import javax.swing.*; /** Index: CreateMonitorAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/watch/CreateMonitorAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateMonitorAction.java 5 Oct 2004 05:15:55 -0000 1.2 --- CreateMonitorAction.java 12 Apr 2006 19:14:02 -0000 1.3 *************** *** 17,40 **** package org.mc4j.console.bean.attribute.watch; ! 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; - import org.mc4j.console.bean.attribute.AttributeNode; - import org.mc4j.console.bean.attribute.AttributeGraphPanel; - import org.mc4j.console.bean.attribute.watch.monitor.MonitorFactory; - import org.mc4j.console.bean.attribute.watch.monitor.BeanMonitorNode; - /** * Action sensitive to the node selection that does something useful. --- 17,26 ---- package org.mc4j.console.bean.attribute.watch; ! import org.mc4j.console.bean.attribute.AttributeNode; ! import org.mc4j.console.bean.attribute.watch.monitor.BeanMonitorNode; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; /** * Action sensitive to the node selection that does something useful. *************** *** 49,53 **** 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 --- 35,39 ---- 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 *************** *** 63,67 **** AttributeNode[] attributeNodes = new AttributeNode[nodes.length]; ! System.arraycopy(nodes,0,attributeNodes, 0, nodes.length); beanMonitorNode.setAttributeNodes(attributeNodes); --- 49,53 ---- AttributeNode[] attributeNodes = new AttributeNode[nodes.length]; ! System.arraycopy(nodes, 0, attributeNodes, 0, nodes.length); beanMonitorNode.setAttributeNodes(attributeNodes); *************** *** 71,75 **** protected boolean enable(Node[] nodes) { ! for (int i = 0; i < nodes.length; i++) { if (!(nodes[i] instanceof AttributeNode)) { return false; --- 57,61 ---- protected boolean enable(Node[] nodes) { ! for (int i = 0; i < nodes.length; i++) { if (!(nodes[i] instanceof AttributeNode)) { return false; *************** *** 81,85 **** - public String getName() { return "Create watch..."; --- 67,70 ---- |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:39
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/tracker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/notification/tracker Modified Files: NotificationTracker.java Log Message: Merging EMS into head for the 2.0 release work Index: NotificationTracker.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/notification/tracker/NotificationTracker.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NotificationTracker.java 5 Oct 2004 05:15:56 -0000 1.4 --- NotificationTracker.java 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 17,25 **** package org.mc4j.console.bean.notification.tracker; import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; - import javax.management.Notification; import javax.swing.*; import javax.swing.table.DefaultTableModel; --- 17,25 ---- package org.mc4j.console.bean.notification.tracker; + import org.mc4j.ems.connection.bean.notification.EmsNotificationEvent; import org.openide.windows.Mode; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; import javax.swing.*; import javax.swing.table.DefaultTableModel; *************** *** 78,89 **** } ! public void addNotification(Notification notif) { // message, sequence #, source, timestamp, type, userdata this.model.addRow( new Object[] { notif.getMessage(), ! new Long(notif.getSequenceNumber()), notif.getSource(), ! new Long(notif.getTimeStamp()), notif.getType(), notif.getUserData() --- 78,89 ---- } ! public void addNotification(EmsNotificationEvent notif) { // message, sequence #, source, timestamp, type, userdata this.model.addRow( new Object[] { notif.getMessage(), ! notif.getSequenceNumber(), notif.getSource(), ! notif.getTimeStamp(), notif.getType(), notif.getUserData() |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:39
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/bean/operation Modified Files: OperationExecuteNodeAction.java OperationSetChildren.java OperationExecutionResultsVisualPanel.java OperationExecutionVisualPanel.java OperationNode.java OperationExecuteDescriptor.java OperationSetNode.java Log Message: Merging EMS into head for the 2.0 release work Index: OperationExecuteNodeAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecuteNodeAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OperationExecuteNodeAction.java 5 Oct 2004 05:15:56 -0000 1.9 --- OperationExecuteNodeAction.java 12 Apr 2006 19:13:58 -0000 1.10 *************** *** 17,24 **** package org.mc4j.console.bean.operation; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; --- 17,21 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.DialogDisplayer; import org.openide.ErrorManager; *************** *** 29,32 **** --- 26,32 ---- import org.openide.util.actions.NodeAction; + import javax.swing.*; + import java.awt.Dialog; + /** * This action is used to execute MBean Operations against a *************** *** 39,56 **** public void performAction(Node[] nodes) { - // do work based on the current node selection, e.g.: OperationNode node = (OperationNode)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. ! final WizardDescriptor desc = new OperationExecuteDescriptor(node.getServer(),node.getObjectName(),node.getOperationInfo()); final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); dlg.setSize(650, 600); ! // The following assumes the wizard descriptor is modal: try { --- 39,54 ---- public void performAction(Node[] nodes) { OperationNode node = (OperationNode)nodes[0]; ! performAction(node.getEmsOperation()); ! } ! ! ! public void performAction(EmsOperation operation) { ! ! final WizardDescriptor desc = new OperationExecuteDescriptor(operation); final Dialog dlg = DialogDisplayer.getDefault().createDialog(desc); dlg.setSize(650, 600); ! // The following assumes the wizard descriptor is modal: try { *************** *** 65,88 **** } if (desc.getValue() == WizardDescriptor.FINISH_OPTION) { - // Do whatever it is you want to do here. - /* - MBeanOperationInfo operationInfo = node.getOperationInfo(); - if (operationInfo.getSignature().length == 0) { - try { - - Object result = node.getServer().invoke( - node.getObjectName(), - operationInfo.getName(), - new Object[] {}, - new String[] {}); - org.openide.windows.IOProvider.getDefault().getStdOut().println("Executed operation " + - operationInfo.getName() + " on managed bean " + node.getObjectName().getCanonicalName()); - org.openide.windows.IOProvider.getDefault().getStdOut().println("Results " + result); - } catch (Exception e) { - ErrorManager.getDefault().notify(e); - } - - } - */ System.out.println("User finished the wizard"); // NOI18N --- 63,66 ---- *************** *** 90,95 **** System.out.println("User closed or cancelled the wizard"); // NOI18N } - - } --- 68,71 ---- Index: OperationNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OperationNode.java 5 Oct 2004 05:15:56 -0000 1.8 --- OperationNode.java 12 Apr 2006 19:13:58 -0000 1.9 *************** *** 17,119 **** package org.mc4j.console.bean.operation; ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanParameterInfo; ! import javax.management.MBeanServer; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.util.HelpCtx; import org.openide.util.actions.SystemAction; /** - * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) */ ! public class OperationNode extends AbstractNode { ! ! protected MBeanServer server; ! protected ObjectInstance objectInstance; ! protected ObjectName objectName; ! protected MBeanOperationInfo operationInfo; - /** - * @deprecated just pass object name - * @param server - * @param objectInstance - * @param operationInfo - */ - public OperationNode(MBeanServer server, ObjectInstance objectInstance, MBeanOperationInfo operationInfo) { - this(server, objectInstance.getObjectName(), operationInfo); - } ! public OperationNode(MBeanServer server, ObjectName objectName, MBeanOperationInfo operationInfo) { super(Children.LEAF); ! this.server = server; ! this.operationInfo = operationInfo; ! this.objectName = objectName; ! setIconBase("org/mc4j/console/bean/operation/OperationNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operationInfo.getName()); ! setDisplayName(this.operationInfo.getName()); ! setShortDescription(getDescription()); setDefaultAction(SystemAction.get(OperationExecuteNodeAction.class)); - - } - - private String getDescription() { - StringBuffer buf = new StringBuffer(100); - buf.append("<html><b>"); - buf.append(this.operationInfo.getName()); - buf.append("</b><br>"); - buf.append("Description: "); - buf.append(this.operationInfo.getDescription()); - - if (this.operationInfo.getSignature().length > 0) { - buf.append("<br>Parameters:<br>"); - MBeanParameterInfo[] params = this.operationInfo.getSignature(); - for (int i = 0; i < params.length; i++) { - MBeanParameterInfo param = params[i]; - buf.append(" "); - buf.append(param.getName()); - buf.append(" - "); - buf.append(param.getType()); - buf.append("<br>"); - } - } - buf.append("Return Type: "); - buf.append(this.operationInfo.getReturnType()); - buf.append("</html>"); - return buf.toString(); } // Create the popup menu: 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(OperationExecuteNodeAction.class), null, ! SystemAction.get(ToolsAction.class), null, ! SystemAction.get(PropertiesAction.class), }; } --- 17,64 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; 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.util.HelpCtx; import org.openide.util.actions.SystemAction; /** * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) */ ! public class OperationNode extends AbstractNode implements Comparable { ! protected EmsOperation operation; ! public OperationNode(EmsOperation operation) { super(Children.LEAF); ! this.operation = operation; setIconBase("org/mc4j/console/bean/operation/OperationNodeIcon"); // Set FeatureDescriptor stuff: ! setName(this.operation.getName()); ! setDisplayName(this.operation.getName()); ! setShortDescription(this.operation.getDescription()); setDefaultAction(SystemAction.get(OperationExecuteNodeAction.class)); } + public EmsOperation getEmsOperation() { + return operation; + } // Create the popup menu: protected SystemAction[] createActions() { ! return new SystemAction[]{ ! SystemAction.get(OperationExecuteNodeAction.class), null, ! SystemAction.get(ToolsAction.class), null, ! SystemAction.get(PropertiesAction.class), }; } *************** *** 127,253 **** ! /** Getter for property server. ! * @return Value of property server. ! * ! */ ! public javax.management.MBeanServer getServer() { ! return server; ! } ! ! /** Setter for property server. ! * @param server New value of property server. ! * ! */ ! public void setServer(javax.management.MBeanServer server) { ! this.server = server; ! } ! ! /** Getter for property objectName. ! * @return Value of property objectName. ! * ! */ ! public javax.management.ObjectName getObjectName() { ! return objectName; ! } ! ! ! /** Getter for property operationInfo. ! * @return Value of property operationInfo. ! * ! */ ! public javax.management.MBeanOperationInfo getOperationInfo() { ! return operationInfo; ! } ! ! ! // 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 OperationNode(); ! } ! */ ! ! // Create a property sheet: ! /* ! protected Sheet createSheet() { ! Sheet sheet = super.createSheet(); ! // Make sure there is a "Properties" set: ! Sheet.Set 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; ! } ! */ ! ! // Handle renaming: ! /* ! public boolean canRename() { ! return true; ! } ! public void setName(String nue) { ! // Update visible name, fire property changes: ! super.setName(nue); ! // perform additional actions, i.e. rename underlying object ! } ! */ ! ! // Handle deleting: ! /* ! public boolean canDestroy() { ! return true; ! } ! public void destroy() throws IOException { ! // Actually remove the node itself and fire property changes: ! super.destroy(); ! // perform additional actions, i.e. delete underlying object ! } ! */ ! ! // Handle copying and cutting specially: ! /* ! public boolean canCopy() { ! return true; ! } ! public boolean canCut() { ! return true; ! } ! public Transferable clipboardCopy() { ! // Add to, do not replace, the default node copy flavor: ! ExTransferable et = ExTransferable.create(super.clipboardCopy()); ! et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { ! protected Object getData() { ! return OperationNode.this.getDisplayName(); ! } ! }); ! return et; ! } ! public Transferable clipboardCut() { ! // Add to, do not replace, the default node cut flavor: ! ExTransferable et = ExTransferable.create(super.clipboardCut()); ! // This is not so useful because this node will not be destroyed afterwards ! // (it is up to the paste type to decide whether to remove the "original", ! // and it is not safe to assume that getData will only be called once): ! et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { ! protected Object getData() { ! return OperationNode.this.getDisplayName(); ! } ! }); ! return et; ! } ! */ ! ! // Permit user to customize whole node at once (instead of per-property): ! /* ! public boolean hasCustomizer() { ! return true; ! } ! public Component getCustomizer() { ! return new MyCustomizingPanel(this); } - */ } --- 72,79 ---- ! public int compareTo(Object o) { ! Node otherNode = (Node) o; ! return this.getDisplayName().compareTo(otherNode.getDisplayName()); } } Index: OperationExecuteDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecuteDescriptor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OperationExecuteDescriptor.java 5 Oct 2004 05:15:56 -0000 1.7 --- OperationExecuteDescriptor.java 12 Apr 2006 19:13:58 -0000 1.8 *************** *** 17,31 **** package org.mc4j.console.bean.operation; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.MBeanServer; ! import javax.management.ObjectName; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; /** * --- 17,28 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; + import java.awt.*; + import java.net.MalformedURLException; + import java.net.URL; + /** * *************** *** 38,63 **** private final OperationExecuteIterator iterator; ! ! public static final String MBEAN_SERVER = "MBeanServer"; ! public static final String OBJECT_NAME = "ObjectName"; ! public static final String OPERATION_INFO = "OperationInfo"; public static final String PARAMETER_VALUES = "ParameterValues"; /** Make a descriptor suited to use OperationExecuteIterator. * Sets up various wizard properties to follow recommended * style guidelines. */ ! public OperationExecuteDescriptor(MBeanServer server, ObjectName objectName, MBeanOperationInfo operationInfo) { this(new OperationExecuteIterator()); ! ! putProperty(MBEAN_SERVER, server); ! putProperty(OBJECT_NAME, objectName); ! putProperty(OPERATION_INFO, operationInfo); } ! private OperationExecuteDescriptor(OperationExecuteIterator iterator) { super(iterator); this.iterator = iterator; ! this.iterator.setExecuteDescriptor(this); // Set title for the dialog: --- 35,57 ---- private final OperationExecuteIterator iterator; ! ! public static final String OPERATION = "Operation"; public static final String PARAMETER_VALUES = "ParameterValues"; + /** Make a descriptor suited to use OperationExecuteIterator. * Sets up various wizard properties to follow recommended * style guidelines. */ ! public OperationExecuteDescriptor(EmsOperation operation) { this(new OperationExecuteIterator()); ! ! putProperty(OPERATION, operation); } ! private OperationExecuteDescriptor(OperationExecuteIterator iterator) { super(iterator); this.iterator = iterator; ! this.iterator.setExecuteDescriptor(this); // Set title for the dialog: *************** *** 79,83 **** putProperty("WizardPanel_leftDimension", new Dimension(100, 400)); // NOI18N */ ! // Optional: if you want a special background image for the left pane: try { --- 73,77 ---- putProperty("WizardPanel_leftDimension", new Dimension(100, 400)); // NOI18N */ ! // Optional: if you want a special background image for the left pane: try { *************** *** 88,92 **** throw new IllegalStateException(mfue.toString()); } ! } --- 82,86 ---- throw new IllegalStateException(mfue.toString()); } ! } Index: OperationExecutionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecutionVisualPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OperationExecutionVisualPanel.java 5 Oct 2004 05:15:56 -0000 1.7 --- OperationExecutionVisualPanel.java 12 Apr 2006 19:13:58 -0000 1.8 *************** *** 17,33 **** package org.mc4j.console.bean.operation; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.util.Map; ! ! import javax.management.MBeanOperationInfo; ! import javax.management.ObjectName; ! import javax.swing.BorderFactory; ! import javax.swing.JEditorPane; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! import javax.swing.UIManager; ! import org.openide.ErrorManager; import org.openide.explorer.propertysheet.PropertySheet; --- 17,22 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.console.bean.operation.execution.ExecutionNode; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.ErrorManager; import org.openide.explorer.propertysheet.PropertySheet; *************** *** 35,42 **** import org.openide.util.NbBundle; ! import org.mc4j.console.bean.operation.execution.ExecutionNode; /** - * * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) --- 24,32 ---- import org.openide.util.NbBundle; ! import javax.swing.*; ! import java.awt.*; ! import java.util.Map; /** * @author Greg Hinkle (gh...@us...), January 2002 * @version $Revision$($Author$ / $Date$) *************** *** 44,56 **** public class OperationExecutionVisualPanel extends javax.swing.JPanel { ! /** The wizard panel descriptor associated with this GUI panel. * If you need to fire state changes or something similar, you can * use this handle to do so. */ private final OperationExecutionPanel panel; ! private ExecutionNode executionNode; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionVisualPanel(OperationExecutionPanel panel) { this.panel = panel; --- 34,49 ---- public class OperationExecutionVisualPanel extends javax.swing.JPanel { ! /** ! * The wizard panel descriptor associated with this GUI panel. * If you need to fire state changes or something similar, you can * use this handle to do so. */ private final OperationExecutionPanel panel; ! private ExecutionNode executionNode; ! /** ! * Create the wizard panel and set up some basic properties. ! */ public OperationExecutionVisualPanel(OperationExecutionPanel panel) { this.panel = panel; *************** *** 58,130 **** // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionVisualPanel.class, "TITLE_WizardPanel")); - - ! MBeanOperationInfo operationInfo = ! (MBeanOperationInfo) ! this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION_INFO); ! ObjectName objectName = ! (ObjectName) ! this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OBJECT_NAME); ! ! PropertySheet sheet = new PropertySheet(); - this.executionNode = new ExecutionNode(operationInfo); try { ! sheet.setNodes(new Node[] { ! executionNode ! }); ! } catch (Exception e) { ErrorManager.getDefault().notify(e); } ! JPanel topPanel = new JPanel(new BorderLayout()); topPanel.setBorder(BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(1,0,0,0,UIManager.getDefaults().getColor("control")), // NOI18N ! BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(0,0,1,1,UIManager.getDefaults().getColor("controlHighlight")), // NOI18N ! BorderFactory.createLineBorder(UIManager.getDefaults().getColor("controlDkShadow")) // NOI18N ! )) ); ! ! String info = ! "<font size='-1'><b>MBean: </b>" + objectName.getCanonicalName() + "<br>" + ! "<b>Operation: </b>" + operationInfo.getName() + "<br>" + ! "<b>Impact: </b>"; ! switch (operationInfo.getImpact()) { ! case MBeanOperationInfo.ACTION: ! info += "This operation alters the state of this component.<br>"; ! break; ! case MBeanOperationInfo.ACTION_INFO: ! info += "This operation alters the state of this component and returns information.<br>"; ! break; ! case MBeanOperationInfo.INFO: ! info += "This operation merly returns information.<br>"; ! break; ! case MBeanOperationInfo.UNKNOWN: ! info += "unknown<br>"; ! break; } ! info += "<b>Return Type: </b> " + operationInfo.getReturnType() + "<br>"; info += "<b>Description: </b><br>"; ! info += "<blockquote>" + operationInfo.getDescription() + "</blockquote></font>"; ! ! JEditorPane jta = new JEditorPane("text/html", info); jta.setBackground(Color.lightGray); jta.setEditable(false); jta.setPreferredSize(new Dimension(0, 150)); ! JScrollPane topPanelScrollPane = new JScrollPane(); topPanelScrollPane.setViewportView(jta); ! topPanel.add(topPanelScrollPane, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); ! add(sheet, BorderLayout.CENTER); ! repaint(); ! } --- 51,115 ---- // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionVisualPanel.class, "TITLE_WizardPanel")); ! EmsOperation operation = ! (EmsOperation) this.panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION); + PropertySheet sheet = new PropertySheet(); + + this.executionNode = new ExecutionNode(operation); try { ! sheet.setNodes(new Node[]{ ! executionNode ! }); ! } catch (Exception e) { ! ErrorManager.getDefault().notify(e); ! } ! JPanel topPanel = new JPanel(new BorderLayout()); topPanel.setBorder(BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getDefaults().getColor("control")), // NOI18N ! BorderFactory.createCompoundBorder( ! BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getDefaults().getColor("controlHighlight")), // NOI18N ! BorderFactory.createLineBorder(UIManager.getDefaults().getColor("controlDkShadow")) // NOI18N ! )) ); ! ! String info = ! "<font size='-1'><b>MBean: </b>" + operation + "<br>" + ! "<b>Operation: </b>" + operation.getName() + "<br>" + ! "<b>Impact: </b>"; ! if (EmsOperation.Impact.ACTION.equals(operation.getImpact())) { ! info += "This operation alters the state of this component.<br>"; ! } else if (EmsOperation.Impact.ACTION_INFO.equals(operation.getImpact())) { ! info += "This operation alters the state of this component and returns information.<br>"; ! } else if (EmsOperation.Impact.ACTION.equals(operation.getImpact())) { ! info += "This operation merly returns information.<br>"; ! } else { ! info += "unknown<br>"; } ! ! info += "<b>Return Type: </b> " + operation.getReturnType() + "<br>"; info += "<b>Description: </b><br>"; ! info += "<blockquote>" + operation.getDescription() + "</blockquote></font>"; ! ! JEditorPane jta = new JEditorPane("text/html", info); jta.setBackground(Color.lightGray); jta.setEditable(false); jta.setPreferredSize(new Dimension(0, 150)); ! JScrollPane topPanelScrollPane = new JScrollPane(); topPanelScrollPane.setViewportView(jta); ! topPanel.add(topPanelScrollPane, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); ! add(sheet, BorderLayout.CENTER); ! repaint(); ! } *************** *** 132,138 **** return this.executionNode.getParameterValues(); } ! ! ! /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is --- 117,124 ---- return this.executionNode.getParameterValues(); } ! ! ! /** ! * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is Index: OperationExecutionResultsVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationExecutionResultsVisualPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** OperationExecutionResultsVisualPanel.java 5 Oct 2004 05:15:56 -0000 1.12 --- OperationExecutionResultsVisualPanel.java 12 Apr 2006 19:13:58 -0000 1.13 *************** *** 17,42 **** package org.mc4j.console.bean.operation; ! import java.awt.Rectangle; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Map; import java.util.Map.Entry; - import java.util.Vector; - - import javax.management.MBeanOperationInfo; - import javax.management.MBeanParameterInfo; - import javax.management.MBeanServer; - import javax.management.ObjectName; - import javax.management.ReflectionException; - import javax.swing.JList; - import javax.swing.JPanel; - import javax.swing.JTable; - import javax.swing.SwingUtilities; - - import org.openide.util.NbBundle; - - import org.mc4j.console.util.ExceptionUtility; /** --- 17,32 ---- package org.mc4j.console.bean.operation; ! import org.mc4j.console.util.ExceptionUtility; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; ! import org.mc4j.ems.connection.bean.parameter.EmsParameter; ! import org.openide.util.NbBundle; ! ! import javax.swing.*; ! import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; ! import java.util.*; ! import java.util.List; import java.util.Map.Entry; /** *************** *** 54,144 **** private Object results; ! private Throwable failure; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionResultsVisualPanel(OperationExecutionResultsPanel panel) { this.panel = panel; initComponents(); ! this.textTypeCheckbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { ! //if (e.getStateChange() == ItemEvent.ITEM_STATE_CHANGED) { switchView(); //} }}); ! // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionResultsVisualPanel.class, "TITLE_WizardPanel")); /* ! // Optional: provide a special description for this pane. ! // You must have turned on WizardDescriptor.WizardPanel_helpDisplayed ! // (see descriptor in standard iterator template for an example of this). ! try { ! putClientProperty("WizardPanel_helpURL", // NOI18N ! new URL("nbresloc:/org/mc4j/console/bean/operation/OperationExecutionResultsVisualHelp.html")); // NOI18N ! } catch (MalformedURLException mfue) { ! throw new IllegalStateException(mfue.toString()); ! } ! */ ! //executeOperation(); } ! public void executeOperation() { ! final MBeanServer server = ! (MBeanServer) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.MBEAN_SERVER); ! ! final MBeanOperationInfo operationInfo = ! (MBeanOperationInfo) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION_INFO); ! ! final ObjectName objectName = ! (ObjectName) ! panel.getDescriptor().getProperty(OperationExecuteDescriptor.OBJECT_NAME); ! final Map parameters = (Map) panel.getDescriptor().getProperty(OperationExecuteDescriptor.PARAMETER_VALUES); ! try { ! ! MBeanParameterInfo[] params = ! operationInfo.getSignature(); ! ! final Object[] parameterValues = new Object[params.length]; ! final String[] parameterTypes = new String[params.length]; ! ! for (int i=0; i < params.length; i++) { ! String name = params[i].getName(); ! parameterValues[i] = parameters.get(name); ! parameterTypes[i] = params[i].getType(); } ! this.resultsEditorPane.setContentType("text/html"); setText("<h3>Waiting for results...</h3>"); ! Runnable execution = new Runnable() { public void run() { try { ! results = ! server.invoke( ! objectName, ! operationInfo.getName(), ! parameterValues, ! parameterTypes); resultsEditorPane.setContentType("text/html"); displayData(); - } catch (ReflectionException re) { - Throwable cause = re.getTargetException(); - if (cause != null) { - failure = cause; - } else { - failure = re; - } - setText(ExceptionUtility.printStackTracesToString(failure)); } catch (Exception e) { failure = e; --- 44,108 ---- private Object results; ! private Throwable failure; ! /** Create the wizard panel and set up some basic properties. */ public OperationExecutionResultsVisualPanel(OperationExecutionResultsPanel panel) { this.panel = panel; initComponents(); ! this.textTypeCheckbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { ! //if (e.getStateChange() == ItemEvent.ITEM_STATE_CHANGED) { switchView(); //} }}); ! // Provide a name in the title bar. setName(NbBundle.getMessage(OperationExecutionResultsVisualPanel.class, "TITLE_WizardPanel")); /* ! // Optional: provide a special description for this pane. ! // You must have turned on WizardDescriptor.WizardPanel_helpDisplayed ! // (see descriptor in standard iterator template for an example of this). ! try { ! putClientProperty("WizardPanel_helpURL", // NOI18N ! new URL("nbresloc:/org/mc4j/console/bean/operation/OperationExecutionResultsVisualHelp.html")); // NOI18N ! } catch (MalformedURLException mfue) { ! throw new IllegalStateException(mfue.toString()); ! } ! */ ! //executeOperation(); } ! public void executeOperation() { ! ! final EmsOperation operation = (EmsOperation) panel.getDescriptor().getProperty(OperationExecuteDescriptor.OPERATION); final Map parameters = (Map) panel.getDescriptor().getProperty(OperationExecuteDescriptor.PARAMETER_VALUES); ! try { ! ! List<EmsParameter> params = operation.getParameters(); ! ! ! final Object[] arguments = new Object[params.size()]; ! for (int i = 0; i < params.size(); i++) { ! EmsParameter param = params.get(i); ! arguments[i] = parameters.get(param.getName()); } ! this.resultsEditorPane.setContentType("text/html"); setText("<h3>Waiting for results...</h3>"); ! Runnable execution = new Runnable() { public void run() { try { ! results = operation.invoke(arguments); resultsEditorPane.setContentType("text/html"); displayData(); } catch (Exception e) { failure = e; *************** *** 147,165 **** } }; ! // Need to run this outside the AWT update thread // so as not to freeze the UI in case of failed connection. (new Thread(execution, "mc4j OperationExecution")).start(); ! } catch (Exception e) { this.failure = e; setText(ExceptionUtility.printStackTracesToString(e)); ! } ! ! } private void displayData() { ! if (this.failure != null) { setText(ExceptionUtility.printStackTracesToString(this.failure)); --- 111,129 ---- } }; ! // Need to run this outside the AWT update thread // so as not to freeze the UI in case of failed connection. (new Thread(execution, "mc4j OperationExecution")).start(); ! } catch (Exception e) { this.failure = e; setText(ExceptionUtility.printStackTracesToString(e)); ! } ! ! } private void displayData() { ! if (this.failure != null) { setText(ExceptionUtility.printStackTracesToString(this.failure)); *************** *** 182,186 **** doLayout(); } else if (this.results instanceof Map) { ! Iterator iter = ((Map)this.results).entrySet().iterator(); Vector data = new Vector(); --- 146,150 ---- doLayout(); } else if (this.results instanceof Map) { ! Iterator iter = ((Map)this.results).entrySet().iterator(); Vector data = new Vector(); *************** *** 199,203 **** doLayout(); } else if (this.results.getClass().isArray()) { ! JList list = new JList((Object[]) this.results); resultsScrollPane.setViewportView(list); doLayout(); --- 163,167 ---- doLayout(); } else if (this.results.getClass().isArray()) { ! JList list = new JList((Object[]) this.results); resultsScrollPane.setViewportView(list); doLayout(); *************** *** 207,215 **** } this.textTypeCheckbox.setEnabled(!complexType); ! } validate(); this.repaint(); } ! /** This method is called from within the constructor to * initialize the form. --- 171,179 ---- } this.textTypeCheckbox.setEnabled(!complexType); ! } validate(); this.repaint(); } ! /** This method is called from within the constructor to * initialize the form. *************** *** 236,240 **** }//GEN-END:initComponents ! public void switchView() { boolean isHtml = this.textTypeCheckbox.isSelected(); --- 200,204 ---- }//GEN-END:initComponents ! public void switchView() { boolean isHtml = this.textTypeCheckbox.isSelected(); *************** *** 248,252 **** displayData(); } ! public void setText(String text) { this.resultsEditorPane.setText(text); --- 212,216 ---- displayData(); } ! public void setText(String text) { this.resultsEditorPane.setText(text); *************** *** 258,262 **** }); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox textTypeCheckbox; --- 222,226 ---- }); } ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox textTypeCheckbox; Index: OperationSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationSetNode.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OperationSetNode.java 5 Oct 2004 05:15:56 -0000 1.5 --- OperationSetNode.java 12 Apr 2006 19:13:58 -0000 1.6 *************** *** 25,28 **** --- 25,29 ---- import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 34,40 **** public static final String NAME = "Operations"; - public OperationSetNode() { - super(new OperationSetChildren()); //new Children.SortedArray()); setIconBase("org/mc4j/console/bean/operation/OperationSetNodeIcon"); // Set FeatureDescriptor stuff: --- 35,44 ---- public static final String NAME = "Operations"; + private EmsBean emsBean; + + public OperationSetNode(EmsBean emsBean) { + super(new OperationSetChildren(emsBean)); //new Children.SortedArray()); + this.emsBean = emsBean; setIconBase("org/mc4j/console/bean/operation/OperationSetNodeIcon"); // Set FeatureDescriptor stuff: Index: OperationSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/operation/OperationSetChildren.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OperationSetChildren.java 5 Oct 2004 05:15:56 -0000 1.4 --- OperationSetChildren.java 12 Apr 2006 19:13:58 -0000 1.5 *************** *** 17,27 **** package org.mc4j.console.bean.operation; ! 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.operation; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.operation.EmsOperation; import org.openide.nodes.Children; import org.openide.nodes.Node; + import java.util.SortedSet; + /** * *************** *** 29,83 **** * @version $Revision$($Author$ / $Date$) */ ! public class OperationSetChildren extends Children.Keys { ! /** Optional holder for the keys, to be used when changing them dynamically. */ ! protected List myKeys; ! public OperationSetChildren() { ! 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,53 ---- * @version $Revision$($Author$ / $Date$) */ ! public class OperationSetChildren extends Children.SortedArray { ! private EmsBean emsBean; ! public OperationSetChildren(EmsBean emsBean) { ! this.emsBean = emsBean; } protected void addNotify() { super.addNotify(); ! SortedSet<EmsOperation> operations = emsBean.getOperations(); ! Node[] newNodes = new Node[operations.size()]; ! int i = 0; ! for (EmsOperation operation : operations) { ! OperationNode node = new OperationNode(operation); ! newNodes[i++] = node; ! } ! add(newNodes); } } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:39
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/tomcat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/tomcat Modified Files: Tomcat_RequestProcessorTable.xml Tomcat_ServletTable.xml Tomcat_SingleServlet_Graph.xml Log Message: Merging EMS into head for the 2.0 release work Index: Tomcat_ServletTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/tomcat/Tomcat_ServletTable.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Tomcat_ServletTable.xml 5 Oct 2004 04:01:08 -0000 1.5 --- Tomcat_ServletTable.xml 12 Apr 2006 19:14:01 -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="Tomcat Servlet Statistics"> <Description>This dashboard shows the statistics of a Tomcat Servlets.</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="Tomcat Servlet Statistics"> <Description>This dashboard shows the statistics of a Tomcat Servlets.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Tomcat/Web"> <BeanMatch id="ServletList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=Servlet"/> <Condition type="ServerAttributeCondition" serverType="MX4J"/> </BeanMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Tomcat/Web"> <BeanMatch id="ServletList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=Servlet"/> <Condition type="ServerAttributeCondition" serverType="MX4J"/> </BeanMatch> *************** *** 16,74 **** <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.console.dashboard.components.AttributeTablePopupComponent"> ! <Attribute name="beanList" value="ServletList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)J2EEServer"/> ! <Attribute name="AttributeName" value="(Literal)J2EEApplication"/> ! <Attribute name="AttributeName" value="(Literal)WebModule"/> ! <Attribute name="AttributeName" value="(Literal)name"/> ! <Attribute name="AttributeName" value="(Literal)requestCount"/> ! <Attribute name="AttributeName" value="(Literal)processingTime"/> ! <Attribute name="AttributeName" value="(Literal)minTime"/> ! <Attribute name="AttributeName" value="(Literal)maxTime"/> ! <Attribute name="AttributeName" value="(Literal)loadTime"/> ! <Attribute name="AttributeName" value="(Literal)classLoadTime"/> ! <Attribute name="AttributeName" value="(Literal)errorCount"/> --- 16,42 ---- <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> ! <Attribute name="beanList" value="#ServletList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'J2EEServer'"/> ! <Attribute name="AttributeName" value="'J2EEApplication'"/> ! <Attribute name="AttributeName" value="'WebModule'"/> ! <Attribute name="AttributeName" value="'name'"/> ! <Attribute name="AttributeName" value="'requestCount'"/> ! <Attribute name="AttributeName" value="'processingTime'"/> ! <Attribute name="AttributeName" value="'minTime'"/> ! <Attribute name="AttributeName" value="'maxTime'"/> ! <Attribute name="AttributeName" value="'loadTime'"/> ! <Attribute name="AttributeName" value="'classLoadTime'"/> ! <Attribute name="AttributeName" value="'errorCount'"/> Index: Tomcat_SingleServlet_Graph.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/tomcat/Tomcat_SingleServlet_Graph.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Tomcat_SingleServlet_Graph.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Tomcat_SingleServlet_Graph.xml 12 Apr 2006 19:14:01 -0000 1.4 *************** *** 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="Tomcat Servlet Statistics Graph"> <Description>This dashboard shows the statistics of a Tomcat servlet.</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="Tomcat Servlet Statistics Graph"> <Description>This dashboard shows the statistics of a Tomcat servlet.</Description> *************** *** 8,12 **** <DashboardMatch type="Bean"> <BeanMatch id="ServletNode" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="j2eeType=Servlet"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Bean"> <BeanMatch id="ServletNode" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="j2eeType=Servlet"/> </BeanMatch> </DashboardMatch> *************** *** 14,53 **** <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> <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> --- 14,26 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <!-- *** 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"/> <Attribute name="preferredSize" value="100,100"/> *************** *** 56,69 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Request Counts"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ServletNode"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)requestCount"/> ! <Attribute name="attributeName" value="(Literal)errorCount"/> </Component> </Content> --- 29,42 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Request Counts'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ServletNode"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'requestCount'"/> ! <Attribute name="attributeName" value="'errorCount'"/> </Component> </Content> *************** *** 71,83 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Execution Speed"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ServletNode"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)minTime"/> ! <Attribute name="attributeName" value="(Literal)maxTime"/> </Component> </Content> --- 44,56 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Execution Speed'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ServletNode"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'minTime'"/> ! <Attribute name="attributeName" value="'maxTime'"/> </Component> </Content> *************** *** 85,97 **** <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Processing Time"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ServletNode"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)processingTime"/> </Component> </Content> --- 58,70 ---- <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Processing Time'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ServletNode"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'processingTime'"/> </Component> </Content> *************** *** 99,103 **** <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> --- 72,76 ---- <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="'VERTICAL_GLUE_SHAPE'"/> </Component> </Content> Index: Tomcat_RequestProcessorTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/tomcat/Tomcat_RequestProcessorTable.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Tomcat_RequestProcessorTable.xml 5 Oct 2004 04:01:08 -0000 1.4 --- Tomcat_RequestProcessorTable.xml 12 Apr 2006 19:14:01 -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="Request Processor Statistics"> <Description>This dashboard shows the statistics of Tomcat Request Processors.</Description> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE Dashboard PUBLIC "-//MC4J//DTD Dashboard 1.0//EN" "http://mc4j.org/Dashboard_1_1.dtd"> ! <Dashboard version="2.0" name="Request Processor Statistics" refreshControl="true" standardHeader="true" autoRefresh="true"> <Description>This dashboard shows the statistics of Tomcat Request Processors.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Tomcat/Web"> <BeanMatch id="RequestProcessorList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="type=RequestProcessor"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Tomcat/Web"> <BeanMatch id="RequestProcessorList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="type=RequestProcessor"/> </BeanMatch> </DashboardMatch> *************** *** 15,74 **** <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.console.dashboard.components.AttributeTablePopupComponent"> ! <Attribute name="beanList" value="RequestProcessorList"/> <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)worker"/> ! <Attribute name="AttributeName" value="(Literal)remoteAddr"/> ! <Attribute name="AttributeName" value="(Literal)protocol"/> ! <Attribute name="AttributeName" value="(Literal)requestCount"/> ! <Attribute name="AttributeName" value="(Literal)requestProcessingTime"/> ! <Attribute name="AttributeName" value="(Literal)maxTime"/> ! <Attribute name="AttributeName" value="(Literal)bytesSent"/> ! <Attribute name="AttributeName" value="(Literal)bytesReceived"/> ! <Attribute name="AttributeName" value="(Literal)processingTime"/> ! <Attribute name="AttributeName" value="(Literal)errorCount"/> --- 15,42 ---- <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> ! <Attribute name="beanList" value="#RequestProcessorList"/> <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="'worker'"/> ! <Attribute name="AttributeName" value="'remoteAddr'"/> ! <Attribute name="AttributeName" value="'protocol'"/> ! <Attribute name="AttributeName" value="'requestCount'"/> ! <Attribute name="AttributeName" value="'requestProcessingTime'"/> ! <Attribute name="AttributeName" value="'maxTime'"/> ! <Attribute name="AttributeName" value="'bytesSent'"/> ! <Attribute name="AttributeName" value="'bytesReceived'"/> ! <Attribute name="AttributeName" value="'processingTime'"/> ! <Attribute name="AttributeName" value="'errorCount'"/> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:39
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/mejb Modified Files: MBeanFilterNode.java MEJBChildren.java Log Message: Merging EMS into head for the 2.0 release work Index: MBeanFilterNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/MBeanFilterNode.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MBeanFilterNode.java 15 Jan 2005 03:52:15 -0000 1.7 --- MBeanFilterNode.java 12 Apr 2006 19:13:59 -0000 1.8 *************** *** 17,27 **** package org.mc4j.console.mejb; import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.RefreshAction; - import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.mejb.view.ShowMEJBViewAction; - import org.mc4j.console.connection.ConnectionNode; - import org.mc4j.console.Refreshable; import org.mc4j.console.util.NodeUtil; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; --- 17,26 ---- package org.mc4j.console.mejb; + import org.mc4j.console.Refreshable; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.mejb.view.ShowMEJBViewAction; import org.mc4j.console.util.NodeUtil; + import org.mc4j.ems.connection.bean.EmsBeanName; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; *************** *** 32,50 **** import org.openide.windows.IOProvider; ! import javax.swing.*; import javax.management.j2ee.ListenerRegistration; import javax.management.j2ee.Management; ! import javax.management.ObjectName; ! import javax.management.NotificationListener; ! import javax.management.Notification; ! import javax.management.InstanceNotFoundException; import java.util.HashMap; - import java.util.Map; - import java.util.Hashtable; import java.util.Iterator; - import java.util.ArrayList; import java.util.List; ! import java.awt.*; ! import java.rmi.RemoteException; /** --- 31,45 ---- import org.openide.windows.IOProvider; ! import javax.management.Notification; ! import javax.management.NotificationListener; import javax.management.j2ee.ListenerRegistration; import javax.management.j2ee.Management; ! import java.awt.Image; ! import java.rmi.RemoteException; ! import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; ! import java.util.Map; /** *************** *** 76,87 **** filteredNode = node; ! filteredDisplayName = filteredNode.getObjectName().getKeyProperty("name"); ! filteredDomain = this.filteredNode.getObjectName().getDomain(); ! filteredType = this.filteredNode.getObjectName().getKeyProperty("j2eeType"); //((MBeanFilterNodeChildren) getChildren()).setParentNode(this); ! Hashtable hash = node.getObjectName().getKeyPropertyList(); for (Iterator iterator = hash.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); --- 71,84 ---- filteredNode = node; ! EmsBeanName name = filteredNode.getEmsBean().getBeanName(); ! ! filteredDisplayName = name.getKeyProperty("name"); ! filteredDomain = name.getDomain(); ! filteredType = name.getKeyProperty("j2eeType"); //((MBeanFilterNodeChildren) getChildren()).setParentNode(this); ! Map<String,String> hash = name.getKeyProperties(); for (Iterator iterator = hash.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); *************** *** 137,153 **** public void loadMetadata() { ! AttributeNode attributeNode = (AttributeNode) filteredNode.getAttributeNodeMap().get("eventProvider"); ! eventProvider = ((Boolean) attributeNode.getValue()).booleanValue(); ! attributeNode = (AttributeNode) filteredNode.getAttributeNodeMap().get("stateManageable"); ! stateManageable = ((Boolean) attributeNode.getValue()).booleanValue(); ! attributeNode = (AttributeNode) filteredNode.getAttributeNodeMap().get("statisticsProvider"); ! statsProvider = ((Boolean) attributeNode.getValue()).booleanValue(); if (stateManageable) { ! AttributeNode stateAttribute = (AttributeNode) filteredNode.getAttributeNodeMap().get("state"); if (stateAttribute == null) ! stateAttribute = (AttributeNode) filteredNode.getAttributeNodeMap().get("State"); if (stateAttribute != null) { --- 134,150 ---- public void loadMetadata() { ! EmsAttribute attribute = filteredNode.getAttributeNodeMap().get("eventProvider"); ! eventProvider = ((Boolean) attribute.getValue()).booleanValue(); ! attribute = filteredNode.getAttributeNodeMap().get("stateManageable"); ! stateManageable = ((Boolean) attribute.getValue()).booleanValue(); ! attribute = filteredNode.getAttributeNodeMap().get("statisticsProvider"); ! statsProvider = ((Boolean) attribute.getValue()).booleanValue(); if (stateManageable) { ! EmsAttribute stateAttribute = filteredNode.getAttributeNodeMap().get("state"); if (stateAttribute == null) ! stateAttribute = filteredNode.getAttributeNodeMap().get("State"); if (stateAttribute != null) { *************** *** 186,190 **** /* register an event listener */ IOProvider.getDefault().getStdOut().println( ! "addNotificationListener( " + this + " ) to " + filteredNode.getObjectName()); Object managementObject = filteredNode.getConnectionNode().getMEJB(); --- 183,187 ---- /* register an event listener */ IOProvider.getDefault().getStdOut().println( ! "addNotificationListener( " + this + " ) to " + filteredNode.getEmsBean().getBeanName().getCanonicalName()); Object managementObject = filteredNode.getConnectionNode().getMEJB(); *************** *** 197,203 **** ListenerRegistration lr = mejb.getListenerRegistry(); ! lr.addNotificationListener(filteredNode.getObjectName(), this, null, "MEJB Listener"); ! } catch (InstanceNotFoundException e) { ! e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); --- 194,201 ---- ListenerRegistration lr = mejb.getListenerRegistry(); ! // TODO!! use ems notification support ! // lr.addNotificationListener(filteredNode.getObjectName(), this, null, "MEJB Listener"); ! // } catch (InstanceNotFoundException e) { ! // e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); *************** *** 212,216 **** IOProvider.getDefault().getStdOut().println( "Got an event (" + notification + ") on: " + ! filteredNode.getObjectName().getCanonicalName()); } --- 210,214 ---- IOProvider.getDefault().getStdOut().println( "Got an event (" + notification + ") on: " + ! filteredNode.getEmsBean().getBeanName().getCanonicalName()); } *************** *** 279,283 **** } protected void performAction(Node[] nodes) { ! filteredNode.getConnectionNode().browseToMBean(filteredNode.getObjectName()); } protected boolean enable(Node[] nodes) { --- 277,281 ---- } protected void performAction(Node[] nodes) { ! filteredNode.getConnectionNode().browseToMBean(filteredNode.getEmsBean().getBeanName().getCanonicalName()); } protected boolean enable(Node[] nodes) { Index: MEJBChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/MEJBChildren.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MEJBChildren.java 30 Nov 2004 03:38:43 -0000 1.2 --- MEJBChildren.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 19,32 **** import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.ConnectionNode; import org.openide.nodes.Children; import org.openide.nodes.Node; - import org.openide.windows.IOProvider; - import javax.management.MBeanServer; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; - import java.util.Hashtable; /** --- 19,30 ---- import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.ConnectionNode; + import org.mc4j.ems.connection.EmsConnection; import org.openide.nodes.Children; import org.openide.nodes.Node; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; /** *************** *** 37,40 **** --- 35,39 ---- private ConnectionNode connectionNode; + private EmsConnection connection; private String parentType; private String parentName; *************** *** 45,48 **** --- 44,48 ---- public MEJBChildren(ConnectionNode connectionNode, MEJBNodeLayer parentNode) { this.connectionNode = connectionNode; + this.connection = connectionNode.getEmsConnection(); setFilteredNode(parentNode); } *************** *** 82,86 **** java.util.Map parentKeys = null; ! java.util.Map keys = null; if (parentNode != null) { parentKeys = parentNode.getKeys(); --- 82,86 ---- java.util.Map parentKeys = null; ! java.util.Map<String, String> keys = null; if (parentNode != null) { parentKeys = parentNode.getKeys(); *************** *** 89,92 **** --- 89,93 ---- } + for (int i = 0; childTypes != null && i < childTypes.length; i++) { String childType = childTypes[i]; *************** *** 96,100 **** AggregateNode aggregateNode = getAggregateNode(childType); - MBeanServer mgmt = connectionNode.getMBeanServer(); List allMBeans = connectionNode.getMBeanList(); --- 97,100 ---- *************** *** 104,114 **** // Check if it matches ! String canName = beanNode.getObjectName().getCanonicalName(); ! Hashtable table = beanNode.getObjectName().getKeyPropertyList(); if (keys != null && keys.size() > 0) { // If there are no keys, there isn't anything to match ! for (Iterator iterator1 = keys.entrySet().iterator(); iterator1.hasNext();) { ! java.util.Map.Entry entry = (java.util.Map.Entry) iterator1.next(); String value = (String) table.get(entry.getKey()); --- 104,113 ---- // Check if it matches ! String canName = beanNode.getEmsBean().getBeanName().getCanonicalName(); ! java.util.Map<String,String> table = beanNode.getEmsBean().getBeanName().getKeyProperties(); if (keys != null && keys.size() > 0) { // If there are no keys, there isn't anything to match ! for (java.util.Map.Entry<String,String> entry : keys.entrySet()) { String value = (String) table.get(entry.getKey()); *************** *** 149,153 **** MBeanNode beanNode = (MBeanNode) iterator.next(); ! String name = beanNode.getObjectName().getKeyProperty("name"); for (int j = 0; j < existingChildren.length; j++) { Node node = existingChildren[j]; --- 148,152 ---- MBeanNode beanNode = (MBeanNode) iterator.next(); ! String name = beanNode.getEmsBean().getBeanName().getKeyProperty("name"); for (int j = 0; j < existingChildren.length; j++) { Node node = existingChildren[j]; *************** *** 170,174 **** for (int j = 0; j < allMBeans.size(); j++) { MBeanNode beanNode = (MBeanNode) allMBeans.get(j); ! if (beanNode.getObjectName().getCanonicalName().indexOf("J2EEServer=none") > 0) { found = true; } --- 169,173 ---- for (int j = 0; j < allMBeans.size(); j++) { MBeanNode beanNode = (MBeanNode) allMBeans.get(j); ! if (beanNode.getEmsBean().getBeanName().getCanonicalName().indexOf("J2EEServer=none") > 0) { found = true; } *************** *** 191,195 **** for (int j = 0; j < allMBeans.size(); j++) { MBeanNode beanNode = (MBeanNode) allMBeans.get(j); ! if (beanNode.getObjectName().getCanonicalName().indexOf("J2EEApplication="+applicationName) > 0) { found = true; } --- 190,194 ---- for (int j = 0; j < allMBeans.size(); j++) { MBeanNode beanNode = (MBeanNode) allMBeans.get(j); ! if (beanNode.getEmsBean().getBeanName().getCanonicalName().indexOf("J2EEApplication="+applicationName) > 0) { found = true; } |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/persistence Modified Files: ServerInstallSetDatabase.java ConnectionSetDatabase.java Removed Files: ConnectionSettingsBeanInfo.java ConnectionSettings.java Log Message: Merging EMS into head for the 2.0 release work Index: ServerInstallSetDatabase.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence/ServerInstallSetDatabase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ServerInstallSetDatabase.java 15 Jan 2005 03:49:16 -0000 1.3 --- ServerInstallSetDatabase.java 12 Apr 2006 19:14:01 -0000 1.4 *************** *** 44,48 **** private final static String DATABASE_FILENAME = "ServerInstalls.db"; ! private static Set descriptors = Collections.synchronizedSet(new HashSet()); public synchronized static boolean addNode(ServerInstallInfo descriptor) { --- 44,48 ---- private final static String DATABASE_FILENAME = "ServerInstalls.db"; ! private static Set<ServerInstallInfo> descriptors = Collections.synchronizedSet(new HashSet()); public synchronized static boolean addNode(ServerInstallInfo descriptor) { *************** *** 64,71 **** int size = ServerInstallSetDatabase.descriptors.size(); outStream.writeInt( size ); ! Iterator iter = descriptors.iterator(); ! while (iter.hasNext()) { ! ServerInstallInfo element = (ServerInstallInfo)iter.next(); ! outStream.writeObject( element ); } } --- 64,69 ---- int size = ServerInstallSetDatabase.descriptors.size(); outStream.writeInt( size ); ! for (ServerInstallInfo element : descriptors) { ! outStream.writeObject(element); } } *************** *** 124,128 **** } ! public synchronized static Set getNodes() { if (ServerInstallSetDatabase.descriptors.isEmpty()) { loadNodes(); --- 122,126 ---- } ! public synchronized static Set<ServerInstallInfo> getNodes() { if (ServerInstallSetDatabase.descriptors.isEmpty()) { loadNodes(); --- ConnectionSettingsBeanInfo.java DELETED --- --- ConnectionSettings.java DELETED --- Index: ConnectionSetDatabase.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/persistence/ConnectionSetDatabase.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ConnectionSetDatabase.java 15 Jan 2005 03:49:16 -0000 1.14 --- ConnectionSetDatabase.java 12 Apr 2006 19:14:01 -0000 1.15 *************** *** 18,22 **** ! import java.io.EOFException; import java.io.File; import java.io.FileInputStream; --- 18,27 ---- ! import org.mc4j.ems.connection.settings.ConnectionSettings; ! import org.openide.ErrorManager; ! ! import java.beans.XMLDecoder; ! import java.beans.XMLEncoder; ! import java.beans.DefaultPersistenceDelegate; import java.io.File; import java.io.FileInputStream; *************** *** 24,40 **** import java.io.FileOutputStream; import java.io.IOException; - import java.io.InvalidClassException; - import java.io.ObjectInputStream; - import java.io.ObjectOutputStream; - import java.io.StreamCorruptedException; - import java.util.Collections; - import java.util.HashSet; - import java.util.Iterator; import java.util.Set; ! ! import org.openide.ErrorManager; ! import org.openide.windows.IOProvider; /** * @author Corby Page 09.07.02 * @author Greg Hinkle (gh...@us...), December 2002 --- 29,41 ---- import java.io.FileOutputStream; import java.io.IOException; import java.util.Set; ! import java.util.SortedSet; ! import java.util.TreeSet; /** + * TODO GH: Maybe just translate this to util.prefs storage... + * it would be nice not to lose connections this on upgrade + * + * * @author Corby Page 09.07.02 * @author Greg Hinkle (gh...@us...), December 2002 *************** *** 43,178 **** public class ConnectionSetDatabase { ! private final static String DATABASE_FILENAME = "ConnectionNodes.db"; ! private static Set descriptors = Collections.synchronizedSet(new HashSet()); - public synchronized static boolean addNode(ConnectionSettings descriptor) { - ObjectOutputStream outStream = null; - ConnectionSetDatabase.descriptors.remove(descriptor); - ConnectionSetDatabase.descriptors.add(descriptor); - try { - if (getDatabaseFile() == null) { - File file = new File(DATABASE_FILENAME); - file.createNewFile(); - } - outStream = - new ObjectOutputStream( - new FileOutputStream( - getDatabaseFile())); - int size = ConnectionSetDatabase.descriptors.size(); - outStream.writeInt( size ); - Iterator iter = descriptors.iterator(); - while (iter.hasNext()) { - ConnectionSettings element = (ConnectionSettings)iter.next(); - outStream.writeObject( element ); - } - } - catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when adding node" ); ! ErrorManager.getDefault().notify(ex); ! ConnectionSetDatabase.descriptors.remove( descriptor ); ! } ! finally { ! try { ! outStream.close(); ! } ! catch( IOException ioEx ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close outputStream" ); ! } ! } - return true; } ! public synchronized static void removeNode(ConnectionSettings descriptor) { ! ObjectOutputStream outStream = null; ! ConnectionSetDatabase.descriptors.remove( descriptor ); try { - outStream = - new ObjectOutputStream( - new FileOutputStream( - getDatabaseFile())); ! int size = ConnectionSetDatabase.descriptors.size(); ! outStream.writeInt( size ); ! Iterator iter = descriptors.iterator(); ! while (iter.hasNext()) { ! ConnectionSettings element = (ConnectionSettings)iter.next(); ! outStream.writeObject( element ); ! } ! } catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when removing node" ); ! ConnectionSetDatabase.descriptors.add( descriptor ); } finally { try { ! outStream.close(); ! } catch( IOException ioEx ) { org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close outputStream" ); } } } - public synchronized static Set getNodes() { - if (ConnectionSetDatabase.descriptors.isEmpty()) { - loadNodes(); - } - Set nodes = new HashSet(); - nodes.addAll(ConnectionSetDatabase.descriptors); - return nodes; //(new HashSet()).addAll(ConnectionSetDatabase.descriptors); - } protected synchronized static void loadNodes() { - ObjectInputStream inStream = null; ! //IOProvider.getDefault().getStdOut().println("Loading connections"); ! ConnectionSetDatabase.descriptors.clear(); ! try { ! inStream = ! new ObjectInputStream( ! new FileInputStream( ! getDatabaseFile())); ! //IOProvider.getDefault().getStdOut().println("Reading connections"); ! int size = inStream.readInt(); ! for ( int i=0; i<size; i++ ) { ! try { ! Object value = inStream.readObject(); ! ConnectionSettings setting = (ConnectionSettings) value; ! descriptors.add(setting); ! } catch (StreamCorruptedException sce) { ! // Ignore. We'll throw this away later... ! } catch (InvalidClassException ice) { ! // old version of class.. fur-get-about-it ! } catch(ClassCastException cce) { ! IOProvider.getDefault().getStdOut().println( ! "Unable to load old connection information."); ! } ! } ! } catch( FileNotFoundException ex ) { ! IOProvider.getDefault().getStdOut().println( ! "Node file missing: " + ex); ! ErrorManager.getDefault().notify(ex); ! } catch (EOFException eofe) { ! // Happens when there are no connections... its cool ! } catch( Exception ex ) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Caught exception " + ex + " when getting nodes" ); ! ErrorManager.getDefault().notify(ex); } finally { try { ! if ( inStream != null ) { ! inStream.close(); } } --- 44,123 ---- public class ConnectionSetDatabase { ! private final static String DATABASE_FILENAME = "ConnectionNodes.xml"; ! private static SortedSet<ConnectionSettings> descriptors = ! new TreeSet<ConnectionSettings>(); ! public synchronized static boolean addNode(ConnectionSettings descriptor) { ! boolean found = descriptors.add(descriptor); ! saveNodes(); ! return found; ! } ! public synchronized static void removeNode(ConnectionSettings descriptor) { ! descriptors.remove(descriptor); ! saveNodes(); } ! public synchronized static Set getNodes() { ! if (ConnectionSetDatabase.descriptors.isEmpty()) { ! loadNodes(); ! } ! return new TreeSet(ConnectionSetDatabase.descriptors); ! } ! protected synchronized static void saveNodes() { + FileOutputStream fos= null; try { ! fos = new FileOutputStream(getDatabaseFile(), false); ! XMLEncoder encoder = new XMLEncoder(fos); ! encoder.setPersistenceDelegate( ! File.class, ! new DefaultPersistenceDelegate(new String[] { "absolutePath" })); ! ! ! encoder.writeObject(descriptors); ! ! encoder.close(); ! } catch (FileNotFoundException e) { ! e.printStackTrace(); } finally { try { ! if ( fos != null ) { ! fos.close(); ! } ! } ! catch( IOException ioEx ) { org.openide.windows.IOProvider.getDefault().getStdOut().println( ! "Could not close inputStream" ); } } } protected synchronized static void loadNodes() { ! FileInputStream fis = null; ! try { ! fis = new FileInputStream(getDatabaseFile()); ! XMLDecoder decoder = new XMLDecoder(fis); ! ConnectionSetDatabase.descriptors.clear(); ! descriptors = (SortedSet<ConnectionSettings>) decoder.readObject(); ! ! } catch (FileNotFoundException e) { ! e.printStackTrace(); } finally { try { ! if ( fis != null ) { ! fis.close(); } } *************** *** 207,209 **** --- 152,156 ---- return connectionsFile; } + + } \ No newline at end of file |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:38
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/dashboard/match Modified Files: MatchExecutor.java DashboardMatch.java ServerAttributeCondition.java BeanCondition.java BeanMatch.java BeanObjectNameCondition.java Added Files: BeanObjectNameRegexCondition.java Log Message: Merging EMS into head for the 2.0 release work Index: BeanCondition.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/BeanCondition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanCondition.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanCondition.java 12 Apr 2006 19:14:01 -0000 1.3 *************** *** 18,21 **** --- 18,22 ---- import org.mc4j.console.bean.MBeanNode; + import org.mc4j.ems.connection.bean.EmsBean; import org.w3c.dom.Element; *************** *** 29,33 **** public void initializeCondition(Element rootElement); ! public boolean testCondition(MBeanNode node); --- 30,34 ---- public void initializeCondition(Element rootElement); ! public boolean testCondition(EmsBean node); Index: DashboardMatch.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/DashboardMatch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DashboardMatch.java 5 Oct 2004 05:16:00 -0000 1.2 --- DashboardMatch.java 12 Apr 2006 19:14:01 -0000 1.3 *************** *** 32,36 **** public static final String TYPE_BEAN = "Bean"; ! private List beanMatchList = new ArrayList(); --- 32,36 ---- public static final String TYPE_BEAN = "Bean"; ! private List<BeanMatch> beanMatchList = new ArrayList<BeanMatch>(); *************** *** 59,67 **** } ! public List getBeanMatchList() { return beanMatchList; } ! public void setBeanMatchList(List beanMatchList) { this.beanMatchList = beanMatchList; } --- 59,67 ---- } ! public List<BeanMatch> getBeanMatchList() { return beanMatchList; } ! public void setBeanMatchList(List<BeanMatch> beanMatchList) { this.beanMatchList = beanMatchList; } Index: MatchExecutor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/MatchExecutor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MatchExecutor.java 5 Oct 2004 05:16:00 -0000 1.3 --- MatchExecutor.java 12 Apr 2006 19:14:01 -0000 1.4 *************** *** 17,32 **** package org.mc4j.console.dashboard.match; - import java.util.ArrayList; - import java.util.Hashtable; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - - import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.ConnectionNode; import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.context.ContextHelper; /** * @author Greg Hinkle (gh...@us...), Apr 5, 2004 * @version $Revision$($Author$ / $Date$) --- 17,30 ---- package org.mc4j.console.dashboard.match; import org.mc4j.console.connection.ConnectionNode; import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.context.ContextHelper; + import org.mc4j.ems.connection.bean.EmsBean; + + import java.util.*; /** + * Matches dashboards against the list of currently known beans + * * @author Greg Hinkle (gh...@us...), Apr 5, 2004 * @version $Revision$($Author$ / $Date$) *************** *** 48,52 **** ! public boolean matchSingle(Dashboard dashboard, MBeanNode mBeanNode) { DashboardMatch dashboardMatch = dashboard.getDashboardMatch(); --- 46,50 ---- ! public boolean matchSingle(Dashboard dashboard, EmsBean bean) { DashboardMatch dashboardMatch = dashboard.getDashboardMatch(); *************** *** 58,73 **** BeanMatch beanMatch = (BeanMatch) beanMatchList.get(0); ! List conditionList = beanMatch.getConditionList(); ! if (beanConditionListMatch(conditionList, mBeanNode)) { ! dashboard.putContext(beanMatch.getId(), mBeanNode); ! // For single types, experimenting with placing their object name attributes in context ! Hashtable objectNameProps = mBeanNode.getObjectName().getKeyPropertyList(); ! for(Iterator iterator2 = objectNameProps.entrySet().iterator(); iterator2.hasNext(); ) { ! Map.Entry entry = (Map.Entry) iterator2.next(); ! String key = (String)entry.getKey(); ! String value = (String)entry.getValue(); dashboard.putContext(key, value); } --- 56,71 ---- BeanMatch beanMatch = (BeanMatch) beanMatchList.get(0); ! List<BeanCondition> conditionList = beanMatch.getConditionList(); ! if (beanConditionListMatch(conditionList, bean)) { ! dashboard.putContext(beanMatch.getId(), bean); ! beanMatch.addMatchedBean(bean); ! // For single types, experimenting with placing their object name attributes in context ! Map<String, String> objectNameProps = bean.getBeanName().getKeyProperties(); ! for (Map.Entry<String, String> entry : objectNameProps.entrySet()) { ! String key = (String) entry.getKey(); ! String value = (String) entry.getValue(); dashboard.putContext(key, value); } *************** *** 76,80 **** String newName = null; try { ! newName = (String) ContextHelper.getValue(currentName,dashboard.getContextStarter()); } catch (Exception e) { // This is ok, just assume its not a context lookup --- 74,78 ---- String newName = null; try { ! newName = (String) ContextHelper.getValue(currentName, dashboard.getContextStarter()); } catch (Exception e) { // This is ok, just assume its not a context lookup *************** *** 85,89 **** return true; ! } } return false; --- 83,87 ---- return true; ! } } return false; *************** *** 91,105 **** /** - * * @param dashboard * @param connectionNode * @return null if no matches are found, otherwise a list of dashboards with the ! * associated bindings. */ ! public List matchGlobalDashboards(Dashboard dashboard, ConnectionNode connectionNode) { ! List matches = new ArrayList(); DashboardMatch dashboardMatch = dashboard.getDashboardMatch(); List mbeanNodes = connectionNode.getMBeanList(); boolean allBeansMatched = true; --- 89,103 ---- /** * @param dashboard * @param connectionNode * @return null if no matches are found, otherwise a list of dashboards with the ! * associated bindings. */ ! public List<Dashboard> matchGlobalDashboards(Dashboard dashboard, ConnectionNode connectionNode) { ! List<Dashboard> matches = new ArrayList<Dashboard>(); DashboardMatch dashboardMatch = dashboard.getDashboardMatch(); List mbeanNodes = connectionNode.getMBeanList(); + SortedSet<EmsBean> beans = connectionNode.getEmsConnection().getBeans(); boolean allBeansMatched = true; *************** *** 107,124 **** if (DashboardMatch.TYPE_GLOBAL.equals(dashboardMatch.getType())) { ! List beanMatchList = dashboardMatch.getBeanMatchList(); ! for (Iterator iterator = beanMatchList.iterator(); iterator.hasNext();) { ! BeanMatch beanMatch = (BeanMatch) iterator.next(); ! List conditionList = beanMatch.getConditionList(); boolean beanMatched = false; if (BeanMatch.TYPE_MULTIPLE.equals(beanMatch.getType())) { ! List matchedBeanList = new ArrayList(); ! for (Iterator iterator1 = mbeanNodes.iterator(); iterator1.hasNext();) { ! MBeanNode mBeanNode = (MBeanNode) iterator1.next(); ! if (beanConditionListMatch(conditionList, mBeanNode)) { ! matchedBeanList.add(mBeanNode); beanMatched = true; } --- 105,124 ---- if (DashboardMatch.TYPE_GLOBAL.equals(dashboardMatch.getType())) { ! List<BeanMatch> beanMatchList = dashboardMatch.getBeanMatchList(); ! for (BeanMatch beanMatch : beanMatchList) { ! List<BeanCondition> conditionList = beanMatch.getConditionList(); boolean beanMatched = false; if (BeanMatch.TYPE_MULTIPLE.equals(beanMatch.getType())) { ! List<EmsBean> matchedBeanList = new ArrayList<EmsBean>(); ! // for (Iterator iterator1 = mbeanNodes.iterator(); iterator1.hasNext();) { ! // MBeanNode mBeanNode = (MBeanNode) iterator1.next(); ! for (EmsBean bean : beans) { ! ! if (beanConditionListMatch(conditionList, bean)) { ! matchedBeanList.add(bean); ! beanMatch.addMatchedBean(bean); beanMatched = true; } *************** *** 128,145 **** } else if (BeanMatch.TYPE_SINGLE.equals(beanMatch.getType())) { ! for (Iterator iterator1 = mbeanNodes.iterator(); iterator1.hasNext();) { ! MBeanNode mBeanNode = (MBeanNode) iterator1.next(); ! if (beanConditionListMatch(conditionList, mBeanNode)) { ! dashboard.putContext(beanMatch.getId(), mBeanNode); beanMatched = true; // For single types, experimenting with placing their object name attributes in context ! Hashtable objectNameProps = mBeanNode.getObjectName().getKeyPropertyList(); ! for(Iterator iterator2 = objectNameProps.entrySet().iterator(); iterator2.hasNext(); ) { ! Map.Entry entry = (Map.Entry) iterator2.next(); ! String key = (String)entry.getKey(); ! String value = (String)entry.getValue(); dashboard.putContext(key, value); } --- 128,144 ---- } else if (BeanMatch.TYPE_SINGLE.equals(beanMatch.getType())) { ! for (EmsBean bean : beans) { ! if (beanConditionListMatch(conditionList, bean)) { ! dashboard.putContext(beanMatch.getId(), bean); beanMatched = true; // For single types, experimenting with placing their object name attributes in context ! Map<String, String> objectNameProps = bean.getBeanName().getKeyProperties(); ! for (Map.Entry<String, String> entry : objectNameProps.entrySet()) { ! String key = entry.getKey(); ! String value = entry.getValue(); dashboard.putContext(key, value); + beanMatch.addMatchedBean(bean); } *************** *** 165,180 **** } - /** - * Test all conditions. * @param conditionList ! * @param mBeanNode ! * @return */ ! protected boolean beanConditionListMatch(List conditionList, MBeanNode mBeanNode) { boolean match = true; ! for (Iterator iterator = conditionList.iterator(); iterator.hasNext();) { ! BeanCondition beanCondition = (BeanCondition) iterator.next(); ! if (!beanCondition.testCondition(mBeanNode)) match = false; } --- 164,176 ---- } /** * @param conditionList ! * @param bean */ ! protected boolean beanConditionListMatch(List<BeanCondition> conditionList, EmsBean bean) { boolean match = true; ! ! for (BeanCondition beanCondition : conditionList) { ! if (!beanCondition.testCondition(bean)) match = false; } Index: BeanObjectNameCondition.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/BeanObjectNameCondition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanObjectNameCondition.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanObjectNameCondition.java 12 Apr 2006 19:14:01 -0000 1.3 *************** *** 17,27 **** package org.mc4j.console.dashboard.match; ! import org.openide.ErrorManager; ! import org.openide.windows.IOProvider; ! ! import org.mc4j.console.bean.MBeanNode; ! ! import org.apache.regexp.RE; ! import org.apache.regexp.RESyntaxException; /** --- 17,21 ---- package org.mc4j.console.dashboard.match; ! import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 30,40 **** */ public class BeanObjectNameCondition extends AbstractBeanCondition { - private String filter; - private RE nameFilter; public String[] getConditionAttributes() { ! return new String[] { "filter" }; --- 24,32 ---- */ public class BeanObjectNameCondition extends AbstractBeanCondition { private String filter; public String[] getConditionAttributes() { ! return new String[]{ "filter" }; *************** *** 47,69 **** public void setFilter(String filter) { this.filter = filter; ! try { ! this.nameFilter = new RE(filter); ! //REUtil.createRE(filter); ! } catch (RESyntaxException rese) { ! ErrorManager.getDefault().notify(rese); ! IOProvider.getDefault().getStdOut().println( ! "Invalid dashboard matching regular expression [" + filter + ! "] in dashboard."); ! } ! } ! public boolean testCondition(MBeanNode node) { ! String cName = node.getObjectName().getCanonicalName(); ! ! if (this.nameFilter != null) { ! return this.nameFilter.match(cName); } else { return true; --- 39,50 ---- public void setFilter(String filter) { this.filter = filter; ! // TODO Check valid Filter } ! public boolean testCondition(EmsBean bean) { ! if (filter != null) { ! return bean.getBeanName().apply(filter); } else { return true; Index: BeanMatch.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/BeanMatch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanMatch.java 5 Oct 2004 05:16:00 -0000 1.2 --- BeanMatch.java 12 Apr 2006 19:14:01 -0000 1.3 *************** *** 17,20 **** --- 17,22 ---- package org.mc4j.console.dashboard.match; + import org.mc4j.ems.connection.bean.EmsBean; + import java.util.List; import java.util.ArrayList; *************** *** 32,36 **** private String type; ! private List conditionList = new ArrayList(); public String getId() { --- 34,40 ---- private String type; ! private List<BeanCondition> conditionList = new ArrayList<BeanCondition>(); ! ! private List<EmsBean> matchedBeans = new ArrayList<EmsBean>(); public String getId() { *************** *** 54,62 **** } ! public List getConditionList() { return conditionList; } ! public void setConditionList(List conditionList) { this.conditionList = conditionList; } --- 58,66 ---- } ! public List<BeanCondition> getConditionList() { return conditionList; } ! public void setConditionList(List<BeanCondition> conditionList) { this.conditionList = conditionList; } *************** *** 65,67 **** --- 69,79 ---- this.conditionList.add(beanCondition); } + + public void addMatchedBean(EmsBean bean) { + this.matchedBeans.add(bean); + } + + public List<EmsBean> getMatchedBeans() { + return matchedBeans; + } } --- NEW FILE: BeanObjectNameRegexCondition.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.match; import org.mc4j.ems.connection.bean.EmsBean; import org.openide.ErrorManager; import org.openide.windows.IOProvider; import java.util.regex.Pattern; /** * @author Greg Hinkle (gh...@us...), Apr 5, 2004 * @version $Revision: 1.2 $($Author: ghinkl $ / $Date: 2006/04/12 19:14:01 $) */ public class BeanObjectNameRegexCondition extends AbstractBeanCondition { private String filter; private Pattern nameFilter; public String[] getConditionAttributes() { return new String[] { "filter" }; } public String getFilter() { return filter; } public void setFilter(String filter) { this.filter = filter; try { this.nameFilter = Pattern.compile(filter); //REUtil.createRE(filter); } catch (Exception rese) { ErrorManager.getDefault().notify(rese); IOProvider.getDefault().getStdOut().println( "Invalid dashboard matching regular expression [" + filter + "] in dashboard."); } } public boolean testCondition(EmsBean bean) { String cName = bean.getBeanName().getCanonicalName(); if (this.nameFilter != null) { return this.nameFilter.matcher(cName).find(); } else { return true; } } } Index: ServerAttributeCondition.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match/ServerAttributeCondition.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ServerAttributeCondition.java 5 Oct 2004 05:35:41 -0000 1.4 --- ServerAttributeCondition.java 12 Apr 2006 19:14:01 -0000 1.5 *************** *** 18,21 **** --- 18,22 ---- import org.mc4j.console.bean.MBeanNode; + import org.mc4j.ems.connection.bean.EmsBean; /** *************** *** 39,43 **** } ! public boolean testCondition(MBeanNode node) { // TODO GH: Fixme return true; //serverType.equals(node.getConnectionNode().getgetConnectionType()); --- 40,44 ---- } ! public boolean testCondition(EmsBean bean) { // TODO GH: Fixme return true; //serverType.equals(node.getConnectionNode().getgetConnectionType()); |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:38
|
Update of /cvsroot/mc4j/mc4j In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162 Modified Files: ant.developer.properties MC4JProject.iws Readme.txt .cvsignore build.xml MC4JProject.ipr Added Files: MC4J.iml Log Message: Merging EMS into head for the 2.0 release work Index: .cvsignore =================================================================== RCS file: /cvsroot/mc4j/mc4j/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 10 Nov 2004 15:50:09 -0000 1.1 --- .cvsignore 12 Apr 2006 19:14:00 -0000 1.2 *************** *** 1,2 **** .nbintdb ! Thumbs.db \ No newline at end of file --- 1,4 ---- .nbintdb ! Thumbs.db ! .nbattrs ! .DS_Store Index: build.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/build.xml,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** build.xml 14 Mar 2005 15:09:00 -0000 1.40 --- build.xml 12 Apr 2006 19:14:00 -0000 1.41 *************** *** 44,47 **** --- 44,49 ---- <property name="module.jar" value="org-mc4j-console.jar"/> + <property name="platform.dir" value="platform6"/> + <property name="application.install" value="build/mc4j"/> *************** *** 49,53 **** name="init" description="Initializes the MC4J build system."> ! <echo message="MC4J Build Environment - Try [ant -projecthelp] for more info."/> --- 51,55 ---- name="init" description="Initializes the MC4J build system."> ! <echo message="MC4J Build Environment - Try [ant -projecthelp] for more info."/> *************** *** 56,74 **** <!-- Make sure we have all the directories we need to run a build. --> <mkdir dir="classes"/> ! <path id="classpath.compile"> <!-- When reasonable, replace these with specific paths --> <!-- to openide*.jar and whatever else you need. --> - <pathelement path="${application.install}/lib/openide.jar"/> - <pathelement path="${application.install}/lib/openide-loaders.jar"/> - <pathelement path="${application.install}/lib/ext/regexp*.jar"/> - <pathelement path="${application.install}/modules/autoload/openide-io.jar"/> ! <fileset dir="${application.install}/core"> ! <include name="*.jar"/> </fileset> ! <fileset dir="${application.install}/modules"> ! <include name="*.jar"/> </fileset> --- 58,80 ---- <!-- Make sure we have all the directories we need to run a build. --> <mkdir dir="classes"/> ! <path id="classpath.compile"> <!-- When reasonable, replace these with specific paths --> <!-- to openide*.jar and whatever else you need. --> ! <pathelement path="modules/ems/dist/org-mc4j-ems.jar"/> ! ! <fileset dir="${application.install}/${platform.dir}/core"> ! <include name="**/*.jar"/> </fileset> ! ! <fileset dir="${application.install}/${platform.dir}/lib"> ! <include name="**/*.jar"/> ! </fileset> ! ! ! <fileset dir="${application.install}/${platform.dir}/modules"> ! <include name="**/*.jar"/> </fileset> *************** *** 89,106 **** <available classpathref="classpath.compile" ! classname="org.openide.DialogDisplayer" property="installed.netbeans"/> ! ! <condition property="compile.target" value="jsr14" > <isset property="jre15Available"/> </condition> <condition property="compile.target" value="1.4"> ! <not><isset property="jre15Available"/></not> </condition> <condition property="compile.source" value="1.4"> ! <not><isset property="jre15Available"/></not> </condition> <condition property="compile.source" value="1.5"> --- 95,115 ---- <available classpathref="classpath.compile" ! classname="org.openide.DialogDisplayer" property="installed.netbeans"/> ! <condition property="compile.target" value="jsr14"> <isset property="jre15Available"/> </condition> <condition property="compile.target" value="1.4"> ! <not> ! <isset property="jre15Available"/> ! </not> </condition> <condition property="compile.source" value="1.4"> ! <not> ! <isset property="jre15Available"/> ! </not> </condition> <condition property="compile.source" value="1.5"> *************** *** 114,126 **** unless="installed.netbeans" message="Could not locate the NetBeans platform in the classpath. Make sure to follow the build instructions at http://mc4j.sourceforge.net/Building.html"/> ! </target> ! <target name="compile" depends="init" description="Compiles the MC4J, generic codebase."> <javac srcdir="src" destdir="classes" debug="true" source="${compile.source}" target="${compile.target}"> <exclude name="**/carbon/**"/> <exclude name="org/mc4j/jre15/**" unless="jre15Available"/> --- 123,137 ---- unless="installed.netbeans" message="Could not locate the NetBeans platform in the classpath. Make sure to follow the build instructions at http://mc4j.sourceforge.net/Building.html"/> ! </target> ! <target name="compile" depends="init, build-modules" description="Compiles the MC4J, generic codebase."> <javac srcdir="src" destdir="classes" debug="true" source="${compile.source}" target="${compile.target}"> + <exclude name="**/carbon/**"/> + <exclude name="**/chires/**"/> <exclude name="org/mc4j/jre15/**" unless="jre15Available"/> *************** *** 133,137 **** </target> ! <target name="jars" depends="compile" description="Builds the MC4J Module JAR Files" > --- 144,148 ---- </target> ! <target name="jars" depends="compile" description="Builds the MC4J Module JAR Files"> *************** *** 139,196 **** <fileset dir="."> <include name="${module.jar}"/> - <include name="mc4j_common.jar"/> </fileset> </delete> ! ! <jar jarfile="${module.jar}" manifest="dist/module_manifest.mf" update="true" compress="false"> <!-- OC4J support: put this into JAR for OC4J ApplicationClient to work--> <fileset dir="src/etc" includes="**/*"/> ! <fileset dir="classes" > ! ! <include name="**/persistence/**/*.class"/> ! <include name="**/install/**/*.class"/> ! ! <include name="**/IConnectionNode.class"/> ! <include name="**/swing/*.class"/> ! <include name="**/swing/html/*.class"/> ! <include name="**/welcome/*"/> ! <include name="**/swing/animate/*.class"/> ! <include name="**/ExtendedExplorerPanel.class"/> ! <include name="**/ManagementNode*.class"/> ! <include name="**/ConnectAction*.class"/> ! ! <include name="org/mc4j/console/DisplayConnectionExplorerAction*"/> ! <include name="org/mc4j/console/CreateConnectionAction*"/> ! <include name="org/mc4j/console/ConnectionExplorer*"/> ! <include name="org/mc4j/console/install/ExplorerUtil*"/> ! ! <include name="org/mc4j/console/util/*"/> ! ! <include name="org/mc4j/console/connection/wizard/*.class"/> ! <include name="org/mc4j/console/connection/wizard/**/*.class"/> ! ! <include name="org/mc4j/console/connection/DisconnectAction*"/> ! <include name="org/mc4j/console/connection/ReconnectAction*"/> ! <include name="org/mc4j/console/connection/RefreshAction*"/> ! ! ! <!--<include name="**/mejb/**/*"/>--> ! <!--<include name="**/mejb/ShowMEJBViewAction*"/>--> ! ! ! <exclude name="org/mc4j/console/connect/*Connection.class"/> ! ! <include name="org/mc4j/console/bean/attribute/watch/MonitorTopComponent*.class"/> ! <include name="org/mc4j/console/bean/attribute/watch/MonitorExplorer*.class"/> ! <include name="org/mc4j/console/bean/attribute/watch/MonitorRootNode*.class"/> ! ! <include name="org/mc4j/console/connection/install/*"/> ! </fileset> ! <fileset dir="dist"> <include name="org/**/*"/> <include name="Windows/**/*"/> --- 150,166 ---- <fileset dir="."> <include name="${module.jar}"/> </fileset> </delete> ! <jar jarfile="${module.jar}" manifest="application/dist/module_manifest.mf" update="true" compress="false"> <!-- OC4J support: put this into JAR for OC4J ApplicationClient to work--> <fileset dir="src/etc" includes="**/*"/> ! <fileset dir="classes"> ! <include name="**/*.class"/> </fileset> ! <fileset dir="application/dist"> <include name="org/**/*"/> <include name="Windows/**/*"/> *************** *** 212,218 **** <fileset dir="application"> <include name="dashboards/*.dtd"/> </fileset> ! <zipfileset src="lib/regexp.jar"><exclude name="META-INF/MANIFEST.MF"/></zipfileset> </jar> --- 182,189 ---- <fileset dir="application"> <include name="dashboards/*.dtd"/> + <include name="dashboards/Standard*.xml"/> </fileset> ! <!--<zipfileset src="lib/regexp.jar"><exclude name="META-INF/MANIFEST.MF"/></zipfileset>--> </jar> *************** *** 221,244 **** <!-- classes only, for delegated classloaders --> ! <jar jarfile="mc4j_common.jar" update="true" compress="false"> <fileset dir="classes"/> ! </jar> </target> - <target name="all" depends="compile, jars, brand, install, run" description="Build the module."> </target> ! <target name="all-debug" depends="compile, jars, brand, install, run-debug" description="Build the module."> </target> ! <target name="install" description="copy the jars."> <!-- install the modules --> ! <copy todir="${application.install}\modules" overwrite="yes"> <fileset dir="."> <include name="${module.jar}"/> --- 192,251 ---- <!-- classes only, for delegated classloaders --> ! <!--<jar jarfile="mc4j_common.jar" update="true" compress="false"> <fileset dir="classes"/> ! </jar>--> </target> + <!--<property name="platform-file" value="netbeans-4_1-platform.zip"/>--> + <property name="platform-file" value="netbeans-5_0-platform.zip"/> + <target name="get-nb-platform"> + <mkdir dir="build"/> + <mkdir dir="build/download"/> + <echo message="Downloading NetBeans Platform (~4.4 MB)"/> + <!--<get dest="build/download/${platform-file}" + src="http://www.netbeans.org/download/4_1/fcs/200505031930/66083d474e5fdfc80a1443fb851bd9d5/${platform-file}" + verbose="true"/>--> + <get dest="build/download/${platform-file}" + src="http://us1.mirror.netbeans.org/download/5_0/fcs/200601251500/netbeans-5_0-platform.zip" + verbose="true"/> </target> ! <target name="prepare-platform"> + <unzip src="build/download/${platform-file}" dest="build"/> + <rename src="build/netbeans" dest="build/mc4j"/> </target> ! <target name="clean-dist"> ! <delete dir="build/mc4j"/> ! </target> ! ! ! <target name="all" depends="get-nb-platform, prepare-platform, build-debug" description="Setup the project and run it"/> ! ! ! ! ! <target name="build" depends="compile, jars, brand, install, run" description="Build the project including preparation of the nb platform."> ! ! </target> ! ! <target name="build-debug" depends="compile, jars, brand, install, run-debug" description="Build the module."> ! ! </target> ! ! ! <target name="build-modules" description="Build the modules MC4J is dependent on"> ! <ant antfile="build.xml" target="dist" dir="modules/ems"/> ! </target> ! ! <target name="install" depends="brand, update-dashboards" description="Create the installation of MC4J over top a platform install."> <!-- install the modules --> ! <copy todir="${application.install}/${platform.dir}/modules" overwrite="yes"> <fileset dir="."> <include name="${module.jar}"/> *************** *** 246,249 **** --- 253,266 ---- </copy> + <copy todir="${application.install}/${platform.dir}/modules/ext" overwrite="yes"> + <fileset dir="lib/common" includes="*.jar"/> + <fileset dir="modules/ems/dist" includes="*.jar"/> + </copy> + + <copy todir="${basedir}/${application.install}/${platform.dir}/lib/" overwrite="yes"> + <fileset dir="lib/boot" includes="*.jar"/> + </copy> + + <!-- <copy todir="${application.install}" overwrite="yes"> *************** *** 262,272 **** <!-- install the external class libraries --> ! <mkdir dir="${application.install}\mc4jlib"/> <copy todir="${application.install}\mc4jlib" overwrite="yes"> <fileset dir="." includes="mc4j_common.jar"/> ! <fileset dir="lib/common"> ! <include name="*.jar"/> ! </fileset> ! </copy> <!-- install the extra mx4j libraries --> --- 279,286 ---- <!-- install the external class libraries --> ! <!--<mkdir dir="${application.install}\mc4jlib"/> <copy todir="${application.install}\mc4jlib" overwrite="yes"> <fileset dir="." includes="mc4j_common.jar"/> ! </copy>--> <!-- install the extra mx4j libraries --> *************** *** 295,328 **** - <copy todir="${application.install}" flatten="no" overwrite="yes"> - <fileset dir="application"> - <include name="dashboards/**/*.xml"/> - <include name="dashboards/**/*.html"/> - <include name="dashboards/**/*.dtd"/> - </fileset> - </copy> ! <copy todir="${application.install}/config/Modules" overwrite="yes"> <fileset dir="application/config" includes="*.xml"/> </copy> <copy todir="${application.install}/bin" overwrite="yes"> ! <fileset dir="dist"> <include name="ide.policy"/> </fileset> </copy> </target> <target name="brand" description="customize the netbeans platform for mc4j"> <copy ! todir="${application.install}/lib/" overwrite="yes" ! file="application/branding/branding" /> ! <mkdir dir="${application.install}/core/patches"/> <jar ! destfile="${application.install}/core/patches/Mc4jBranding.jar" basedir="application/branding/bundle"/> </target> --- 309,350 ---- ! <copy todir="${application.install}/${platform.dir}/config/Modules" overwrite="yes"> <fileset dir="application/config" includes="*.xml"/> </copy> <copy todir="${application.install}/bin" overwrite="yes"> ! <fileset dir="application/dist"> <include name="ide.policy"/> </fileset> </copy> + <copy todir="${application.install}" overwrite="yes"> + <fileset dir="."> + <include name="Readme.txt"/> + </fileset> + </copy> </target> + <target name="update-dashboards" description="Install the dashboard files in the installation directory."> + <copy todir="${application.install}" flatten="no" overwrite="yes"> + <fileset dir="application"> + <include name="dashboards/**/*.xml"/> + <include name="dashboards/**/*.html"/> + <include name="dashboards/**/*.dtd"/> + </fileset> + </copy> + + </target> <target name="brand" description="customize the netbeans platform for mc4j"> <copy ! todir="${application.install}/${platform.dir}/lib/" overwrite="yes" ! file="application/branding/branding"/> ! <mkdir dir="${application.install}/${platform.dir}/core/patches"/> <jar ! destfile="${application.install}/${platform.dir}/core/patches/Mc4jBranding.jar" basedir="application/branding/bundle"/> </target> *************** *** 350,358 **** <exec executable="${application.install}/bin/runide.exe"/> </target> ! ! ! <target name="run" description="Directly starts MC4J with the settings as the installer would use."> ! <echo>Starting MC4J</echo> <java classname="org.netbeans.Main" --- 372,379 ---- <exec executable="${application.install}/bin/runide.exe"/> </target> ! ! <target name="run" description="Directly starts MC4J with the settings as the installer would use."> ! <echo message="Starting MC4J with home of ${basedir}/${application.install}"/> <java classname="org.netbeans.Main" *************** *** 361,365 **** <jvmarg value="-Xms24m"/> ! <jvmarg value="-Xmx96m"/> <arg value="--branding"/> --- 382,386 ---- <jvmarg value="-Xms24m"/> ! <jvmarg value="-Xmx296m"/> <arg value="--branding"/> *************** *** 372,375 **** --- 393,399 ---- --> + <!--<env key="DYLD_LIBRARY_PATH" value="/Applications/YourKit Java Profiler 5.0.1.app/bin/mac"/> + <jvmarg value="-agentlib:yjpagent"/>--> + <!-- Under 1.5 JRE's this will start up the built-in jmxremoting support --> <sysproperty key="com.sun.management.jmxremote.port" value="8999"/> *************** *** 385,389 **** <!-- Define where the persistent files live --> ! <sysproperty key="netbeans.user" value="${user.home}/.mc4j/${application.version}"/> <!-- Provide stacktraces on exceptions --> <sysproperty key="netbeans.debug.exceptions" value="true"/> --- 409,413 ---- <!-- Define where the persistent files live --> ! <!-- <sysproperty key="netbeans.user" value="${user.home}/.mc4j/${application.version}"/>--> <!-- Provide stacktraces on exceptions --> <sysproperty key="netbeans.debug.exceptions" value="true"/> *************** *** 391,400 **** <sysproperty key="netbeans.logger.console" value="true"/> <!-- Set the runtime home dir --> ! <sysproperty key="netbeans.home" value="${application.install}"/> ! <sysproperty key="netbeans.dirs" value="${application.install}"/> <classpath> ! <pathelement path="${application.install}/lib/boot.jar"/> </classpath> --- 415,427 ---- <sysproperty key="netbeans.logger.console" value="true"/> <!-- Set the runtime home dir --> ! <sysproperty key="netbeans.home" value="${basedir}/${application.install}/${platform.dir}"/> ! <sysproperty key="netbeans.dirs" value=""/> <classpath> ! <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/boot.jar"/> ! <!--<fileset dir="${basedir}/${application.install}/${platform.dir}/core"> ! <include name="*.jar"/> ! </fileset>--> </classpath> *************** *** 402,416 **** </target> ! <target name="run-debug" description="Directly starts MC4J with the settings as the installer would use."> <echo>Starting MC4J with debugger</echo> - <java - classname="org.netbeans.Main" - fork="yes" - dir="${application.install}"> ! <jvmarg value="-Xms32m"/> ! <jvmarg value="-Xmx128m"/> ! <!--<jvmarg value="-XX:+UseParallelGC"/>--> ! <!--<jvmarg value="-Xincgc"/> --> <!-- Support for running a debugger --> --- 429,441 ---- </target> ! <target name="run-debug" description="Directly starts MC4J with the settings as the installer would use."> <echo>Starting MC4J with debugger</echo> ! <java classname="org.netbeans.Main" fork="yes" dir="${application.install}"> ! ! <jvmarg value="-Xms96m"/> ! <jvmarg value="-Xmx256m"/> ! ! <sysproperty key="swing.aatext" value="true"/> <!-- Support for running a debugger --> *************** *** 421,445 **** <arg value="--branding"/> <arg value="mc4j"/> - <sysproperty key="com.sun.management.jmxremote.port" value="8999"/> - <sysproperty key="com.sun.management.jmxremote.ssl" value="false"/> - <sysproperty key="com.sun.management.jmxremote.authenticate" value="false"/> ! <!-- JProfiler --> ! <!-- ! <jvmarg value="-Xint"/> ! <jvmarg value="-Xrunjprofiler"/> ! <jvmarg value="-Xbootclasspath/a:C:/Program Files/jprofiler/bin/agent.jar"/> ! --> ! <!-- YourKit profiler --> ! <!-- ! <jvmarg value="-Xint"/> ! <jvmarg value="-Xbootclasspath/a:C:/tools/yjp-3.0-eap-build400/bin/yjpagent.dll"/> ! <jvmarg value="-Xrunyjpagent"/> ! --> --- 446,467 ---- + <!--<jvmarg value="-agentpath:/Users/ghinkle/development/tools/NetBeansIDE5.0Beta2.app/Contents/Resources/NetBeans/profiler1/lib/deployed/jdk15/mac/libprofilerinterface.jnilib=/Users/ghinkle/development/tools/NetBeansIDE5.0Beta2.app/Contents/Resources/NetBeans/profiler1/lib,5140"/>--> + + <arg value="--branding"/> <arg value="mc4j"/> ! <sysproperty key="Plastic.defaultTheme" value="DesertBlue"/> ! <arg value="-ui"/> <arg value="com.jgoodies.looks.plastic.PlasticLookAndFeel"/> ! <!--<arg value="-laf"/> <arg value="com.Trendy.swing.plaf.TrendyLookAndFeel"/>--> ! <sysproperty key="com.sun.management.jmxremote.port" value="8998"/> ! <sysproperty key="com.sun.management.jmxremote.ssl" value="false"/> ! <sysproperty key="com.sun.management.jmxremote.authenticate" value="false"/> + <sysproperty key="apple.laf.useScreenMenuBar" value="true"/> + <!--<sysproperty key="apple.awt.brushMetalLook" value="true"/>--> + <!--<sysproperty key="swing.defaultlaf" value="javax.swing.plaf.metal.MetalLookAndFeel"/>--> *************** *** 453,462 **** <sysproperty key="netbeans.logger.console" value="true"/> <!-- Set the runtime home dir --> ! <sysproperty key="netbeans.home" value="${application.install}"/> <classpath> ! <pathelement path="${application.install}/lib/boot.jar"/> </classpath> </java> --- 475,492 ---- <sysproperty key="netbeans.logger.console" value="true"/> <!-- Set the runtime home dir --> ! <sysproperty key="netbeans.home" value="${basedir}/${application.install}/${platform.dir}"/> ! <sysproperty key="netbeans.dirs" value=""/> <classpath> + <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/boot.jar"/> + <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/org-openide-util.jar"/> + <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/org-openide-modules.jar"/> ! <!-- TODO separate out the deepjar handler and nested classloader into a separate library for the boot classpath --> ! <!--<pathelement path="${basedir}/${application.install}/${platform.dir}/modules/ext/org-mc4j-ems.jar"/>--> + <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/looks-1.3.1.jar"/> + + <pathelement path="${basedir}/${application.install}/${platform.dir}/lib/trendyDemoAndTrial.jar"/> </classpath> </java> *************** *** 465,468 **** --- 495,499 ---- <target name="clear-userdir" description="Cleans out the entire MC4J User Dir"> <deltree dir="${user.home}/.mc4j/${application.version}"/> + <delete file="build/mc4j/ConnectionNodes.db"/> </target> *************** *** 471,479 **** <target name="build-docs" depends="init" description="Generates html documentation tree"> <!-- **** Copy needed resources **** --> ! <copy todir="docs" overwrite="yes" > <fileset dir="${doc.build.dir}"> <include name="*.css"/> </fileset> ! <fileset dir="application/dashboards"> <include name="*.dtd"/> </fileset> --- 502,510 ---- <target name="build-docs" depends="init" description="Generates html documentation tree"> <!-- **** Copy needed resources **** --> ! <copy todir="docs" overwrite="yes"> <fileset dir="${doc.build.dir}"> <include name="*.css"/> </fileset> ! <fileset dir="application/dashboards"> <include name="*.dtd"/> </fileset> *************** *** 499,504 **** includes="**/*.xml"> </style> <mkdir dir="docs/printer"/> - <!-- Top Level Static Files --> <style basedir="${doc.build.dir}" destdir="docs/printer" --- 530,535 ---- includes="**/*.xml"> </style> + <mkdir dir="docs/printer"/> <style basedir="${doc.build.dir}" destdir="docs/printer" *************** *** 507,513 **** excludes="**/build.xml,**/module.xml" includes="**/*.xml"> ! <param name="module-menu" expression="nomenu"/> </style> ! --- 538,544 ---- excludes="**/build.xml,**/module.xml" includes="**/*.xml"> ! <param name="module-menu" expression="nomenu"/> </style> ! *************** *** 543,554 **** --> </target> - - <target - name="clean-docs" - description="Removes built documentation from disk."> ! <delete dir="docs"/> ! </target> </project> --- 574,603 ---- --> </target> ! <target ! name="clean-docs" ! description="Removes built documentation from disk."> ! ! <delete dir="docs"/> ! </target> + + <taskdef resource="simiantask.properties" classpath="lib/simian-2.2.4.jar"/> + + <target name="simian"> + <simian> + <fileset dir="src" includes="**/*.java"/> + <formatter type="xml" toFile="simian-log.xml"/> + </simian> + + <style + destdir="." + extension=".html" + style="simian.xsl" + includes="simian-log.xml"> + </style> + </target> + + </project> Index: MC4JProject.iws =================================================================== RCS file: /cvsroot/mc4j/mc4j/MC4JProject.iws,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MC4JProject.iws 5 Oct 2004 05:17:17 -0000 1.4 --- MC4JProject.iws 12 Apr 2006 19:14:00 -0000 1.5 *************** *** 2,7 **** <project version="4" relativePaths="true"> <component name="AspectsView" /> ! <component name="BookmarkManager"> ! <editor_bookmark url="file://$PROJECT_DIR$/src/org/mc4j/console/bean/attribute/watch/monitor/StartMonitoringAction.java" line="69" number="9" /> </component> <component name="CheckinPanelState" /> --- 2,325 ---- <project version="4" relativePaths="true"> <component name="AspectsView" /> ! <component name="BookmarkManager" /> [...2212 lines suppressed...] </entry> ! <entry file="file://$PROJECT_DIR$/src/org/mc4j/console/connection/proxy/JSR77ManagementMBeanServerProxy.java"> <provider selected="true" editor-type-id="text-editor"> ! <state line="45" column="0" selection-start="1453" selection-end="1453" vertical-scroll-proportion="0.43875685"> <folding /> </state> </provider> </entry> ! <entry file="file://$PROJECT_DIR$/build.xml"> <provider selected="true" editor-type-id="text-editor"> ! <state line="495" column="0" selection-start="18352" selection-end="18419" vertical-scroll-proportion="0.731203"> <folding /> </state> </provider> </entry> ! <entry file="file://$PROJECT_DIR$/ant.developer.properties"> <provider selected="true" editor-type-id="text-editor"> ! <state line="7" column="0" selection-start="182" selection-end="182" vertical-scroll-proportion="0.21755028"> <folding /> </state> Index: Readme.txt =================================================================== RCS file: /cvsroot/mc4j/mc4j/Readme.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Readme.txt 19 Jan 2005 14:11:58 -0000 1.9 --- Readme.txt 12 Apr 2006 19:14:00 -0000 1.10 *************** *** 1,4 **** ! MC4J 1.2 beta 8 Read Me ! Release 1/18/05 http://mc4j.sourceforge.net --- 1,4 ---- ! MC4J 1.2 beta 9 Read Me ! Release 3/14/05 http://mc4j.sourceforge.net *************** *** 19,22 **** --- 19,26 ---- Release Notes + 1.2 beta 9 + * WebLogic 6, 7 and 8.1 support fixed + * WebSphere Studio test environment support added + 1.2 beta 8 * WebSphere 5 support fixed Index: ant.developer.properties =================================================================== RCS file: /cvsroot/mc4j/mc4j/ant.developer.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ant.developer.properties 4 Oct 2004 14:05:01 -0000 1.4 --- ant.developer.properties 12 Apr 2006 19:14:00 -0000 1.5 *************** *** 5,9 **** # a strange location. See the online build instructions at # http://mc4j.sourceforge.net/Building.html - application.install = ${basedir}/../application/mc4j ! application.version = 1.2b7 \ No newline at end of file --- 5,8 ---- # a strange location. See the online build instructions at # http://mc4j.sourceforge.net/Building.html ! application.version = 2.0a1 \ No newline at end of file --- NEW FILE: MC4J.iml --- <?xml version="1.0" encoding="UTF-8"?> <module version="4" relativePaths="false" type="JAVA_MODULE"> <component name="ModuleRootManager" /> <component name="NewModuleRootManager"> <output url="file://$MODULE_DIR$/classes" /> <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <excludeFolder url="file://$MODULE_DIR$/build" /> <excludeFolder url="file://$MODULE_DIR$/mc4j2" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="JBoss" level="project" /> <orderEntry type="library" name="JDMK" level="project" /> <orderEntry type="library" name="JFreeChart" level="project" /> <orderEntry type="library" name="JMX Remoting RI" level="project" /> <orderEntry type="library" name="MX4J" level="project" /> <orderEntry type="library" name="NetBeans" level="project" /> <orderEntry type="library" name="UtilConcurrent" level="project" /> <orderEntry type="library" name="Carbon" level="project" /> <orderEntry type="library" name="JGraph" level="project" /> <orderEntry type="module-library"> <library> <CLASSES> <root url="file://$MODULE_DIR$/src" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/animation-1.1.3.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="module" module-name="ems" /> <orderEntry type="library" name="chires" level="project" /> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/forms-1.0.5.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="library" name="NetBeans" level="application" /> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/swingx.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/ognl-2.6.7.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/jcommon-1.0.0.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/jfreechart-1.0.1.jar!/" /> </CLASSES> <JAVADOC> <root url="http://www.jfree.org/jfreechart/api/gjdoc/" /> </JAVADOC> <SOURCES /> </library> </orderEntry> <orderEntry type="module-library"> <library> <CLASSES> <root url="jar://$MODULE_DIR$/lib/common/zql.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> </library> </orderEntry> <orderEntryProperties /> </component> </module> Index: MC4JProject.ipr =================================================================== RCS file: /cvsroot/mc4j/mc4j/MC4JProject.ipr,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MC4JProject.ipr 5 Oct 2004 05:17:17 -0000 1.4 --- MC4JProject.ipr 12 Apr 2006 19:14:00 -0000 1.5 *************** *** 6,18 **** <additionalClassPath /> <antReference projectDefault="true" /> ! <customJdkName value="java version "1.5.0"" /> <maximumHeapSize value="128" /> <properties /> </buildFile> </component> <component name="CodeStyleManager"> <option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" /> <option name="CODE_STYLE_SCHEME" value="" /> </component> <component name="CodeStyleSettingsManager"> <option name="PER_PROJECT_SETTINGS" /> --- 6,32 ---- <additionalClassPath /> <antReference projectDefault="true" /> ! <customJdkName value="1.5.0_06" /> ! <maximumHeapSize value="128" /> ! <properties /> ! </buildFile> ! <buildFile url="file://$PROJECT_DIR$/modules/ems/build.xml"> ! <additionalClassPath /> ! <antReference projectDefault="true" /> ! <customJdkName value="" /> <maximumHeapSize value="128" /> <properties /> </buildFile> </component> + <component name="BuildJarProjectSettings"> + <option name="BUILD_JARS_ON_MAKE" value="false" /> + </component> <component name="CodeStyleManager"> <option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" /> <option name="CODE_STYLE_SCHEME" value="" /> </component> + <component name="CodeStyleProjectProfileManger"> + <option name="PROJECT_PROFILE" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + </component> <component name="CodeStyleSettingsManager"> <option name="PER_PROJECT_SETTINGS" /> *************** *** 21,25 **** <component name="CompilerConfiguration"> <option name="DEFAULT_COMPILER" value="Javac" /> - <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> <option name="DEPLOY_AFTER_MAKE" value="0" /> <resourceExtensions> --- 35,38 ---- *************** *** 39,43 **** --- 52,73 ---- <component name="DataSourceManager" /> <component name="DataSourceManagerImpl" /> + <component name="DependenciesAnalyzeManager"> + <option name="myForwardDirection" value="false" /> + </component> <component name="DependencyValidationManager" /> + <component name="EclipseCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="EclipseEmbeddedCompilerSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="true" /> + <option name="DEPRECATION" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> <component name="EjbActionsConfiguration"> <option name="NEW_MESSAGE_BEAN_LAST_PACKAGE" value="" /> *************** *** 55,58 **** --- 85,92 ---- </component> <component name="GUI Designer component loader factory" /> + <component name="InspectionProjectProfileManager"> + <option name="PROJECT_PROFILE" value="Project Default" /> + <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> + </component> <component name="JUnitProjectSettings"> <option name="TEST_RUNNER" value="UI" /> *************** *** 64,68 **** <option name="ADDITIONAL_OPTIONS_STRING" value="-O" /> <option name="MAXIMUM_HEAP_SIZE" value="128" /> - <option name="USE_GENERICS_COMPILER" value="false" /> </component> <component name="JavadocGenerationManager"> --- 98,101 ---- *************** *** 92,108 **** <component name="Palette2"> <group name="Swing"> ! <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false"> <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> </item> ! <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> </item> ! <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> </item> ! <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false"> <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> </item> ! <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> <initial-values> --- 125,141 ---- <component name="Palette2"> <group name="Swing"> ! <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> </item> ! <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> </item> ! <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> </item> ! <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> </item> ! <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> <initial-values> *************** *** 110,114 **** </initial-values> </item> ! <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> --- 143,147 ---- </initial-values> </item> ! <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> *************** *** 116,120 **** </initial-values> </item> ! <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> --- 149,153 ---- </initial-values> </item> ! <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> <initial-values> *************** *** 122,126 **** </initial-values> </item> ! <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> <initial-values> --- 155,159 ---- </initial-values> </item> ! <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> <initial-values> *************** *** 128,195 **** </initial-values> </item> ! <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> </item> ! <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> ! <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> ! <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> ! <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> </group> </component> --- 161,245 ---- </initial-values> </item> ! <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> <preferred-size width="150" height="-1" /> </default-constraints> </item> ! <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> </item> ! <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> <preferred-size width="150" height="50" /> </default-constraints> </item> ! <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> ! <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> <preferred-size width="200" height="200" /> </default-constraints> </item> ! <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> ! <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> </item> + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> + <preferred-size width="-1" height="20" /> + </default-constraints> + </item> + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> + </item> </group> </component> *************** *** 197,203 **** <modules> <module fileurl="file://$PROJECT_DIR$/MC4J.iml" filepath="$PROJECT_DIR$/MC4J.iml" /> </modules> </component> ! <component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="java version "1.5.0"" /> <component name="RmicSettings"> <option name="IS_EANABLED" value="false" /> --- 247,254 ---- <modules> <module fileurl="file://$PROJECT_DIR$/MC4J.iml" filepath="$PROJECT_DIR$/MC4J.iml" /> + <module fileurl="file://$PROJECT_DIR$/modules/ems/ems.iml" filepath="$PROJECT_DIR$/modules/ems/ems.iml" /> </modules> </component> ! <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5.0_06" /> <component name="RmicSettings"> <option name="IS_EANABLED" value="false" /> *************** *** 381,385 **** --- 432,439 ---- <option name="INSTRUMENT_CLASSES" value="false" /> <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="false" /> + <option name="IRIDA_LAYOUT_MODE" value="false" /> + <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" /> </component> + <UsedPathMacros /> </project> |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/create Modified Files: CreateWizardDescriptor.java CreateMBeanAction.java CreateVisualPanel.java CreateWizardIterator.java CallCreateVisualPanel.java Log Message: Merging EMS into head for the 2.0 release work Index: CallCreateVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create/CallCreateVisualPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CallCreateVisualPanel.java 5 Oct 2004 05:15:57 -0000 1.2 --- CallCreateVisualPanel.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 21,33 **** import javax.swing.*; - import javax.swing.border.Border; import javax.swing.event.ChangeListener; - import javax.management.ObjectName; - import javax.management.NotCompliantMBeanException; - import javax.management.MBeanRegistrationException; - import javax.management.ReflectionException; - import javax.management.MBeanException; - import javax.management.MalformedObjectNameException; - import javax.management.InstanceAlreadyExistsException; import java.awt.*; --- 21,25 ---- *************** *** 55,60 **** public void executeCreate() { try { ! ObjectName objectName = new ObjectName(this.data.getObjectName()); ! this.descriptor.getServer().createMBean(this.data.getClassName(), objectName); this.textArea.setText( --- 47,51 ---- public void executeCreate() { try { ! this.descriptor.getConnection().createMBean(this.data.getClassName(), this.data.getObjectName()); this.textArea.setText( Index: CreateMBeanAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create/CreateMBeanAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateMBeanAction.java 5 Oct 2004 05:15:57 -0000 1.2 --- CreateMBeanAction.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,37 **** package org.mc4j.console.connection.create; ! import java.awt.Dialog; ! ! import javax.swing.SwingUtilities; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; - import org.openide.WizardDescriptor; import org.openide.nodes.Node; import org.openide.util.HelpCtx; 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; ! import org.mc4j.console.connection.ConnectionNode; ! import org.mc4j.console.ManagementNode; ! import org.mc4j.console.IConnectionNode; /** --- 17,29 ---- package org.mc4j.console.connection.create; ! import org.mc4j.console.connection.ConnectionNode; import org.openide.DialogDisplayer; import org.openide.ErrorManager; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.actions.NodeAction; ! import javax.swing.*; ! import java.awt.*; /** *************** *** 50,54 **** ConnectionNode node = (ConnectionNode) nodes[0]; ! final CreateWizardDescriptor desc = new CreateWizardDescriptor(node.getMBeanServer()); --- 42,46 ---- ConnectionNode node = (ConnectionNode) nodes[0]; ! final CreateWizardDescriptor desc = new CreateWizardDescriptor(node.getEmsConnection()); Index: CreateWizardIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create/CreateWizardIterator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateWizardIterator.java 5 Oct 2004 05:15:57 -0000 1.2 --- CreateWizardIterator.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,20 **** --- 17,25 ---- package org.mc4j.console.connection.create; + import org.openide.WizardDescriptor; + import org.openide.util.NbBundle; + + import javax.swing.event.ChangeEvent; + import javax.swing.event.ChangeListener; import java.io.IOException; import java.io.ObjectInputStream; *************** *** 24,41 **** import java.util.Set; - import javax.swing.event.ChangeEvent; - import javax.swing.event.ChangeListener; - import javax.management.MBeanServer; - - import org.openide.WizardDescriptor; - import org.openide.util.NbBundle; - - import org.mc4j.console.ManagementNode; - import org.mc4j.console.connection.wizard.ConnectionDescriptor; - import org.mc4j.console.connection.wizard.ConnectionVisualPanel; - import org.mc4j.console.connection.wizard.ServerInstallPanel; - import org.mc4j.console.connection.wizard.ClassPathListPanel; - import org.mc4j.console.connection.wizard.JBossConnectorChoicePanel; - /** * --- 29,32 ---- *************** *** 47,54 **** private CreateWizardDescriptor descriptor; - private MBeanServer server; // You should define what panels you want to use here: ! public CreateWizardIterator(MBeanServer server) { } --- 38,44 ---- private CreateWizardDescriptor descriptor; // You should define what panels you want to use here: ! public CreateWizardIterator() { } *************** *** 79,83 **** private transient int index = 0; ! protected final int getIndex() { return index; --- 69,73 ---- private transient int index = 0; ! protected final int getIndex() { return index; Index: CreateVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create/CreateVisualPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateVisualPanel.java 5 Oct 2004 05:15:57 -0000 1.2 --- CreateVisualPanel.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,26 **** package org.mc4j.console.connection.create; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import javax.swing.event.ChangeListener; - import javax.management.ObjectName; - import javax.management.MalformedObjectNameException; import java.awt.*; --- 17,25 ---- package org.mc4j.console.connection.create; + import org.mc4j.ems.connection.EmsMalformedObjectNameException; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import javax.swing.event.ChangeListener; import java.awt.*; *************** *** 126,132 **** private void objectNameTextLabelKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_objectNameTextLabelKeyTyped try { ! ObjectName name = ! new ObjectName(this.objectNameTextLabel.getText()); ! } catch (MalformedObjectNameException e) { this.objectNameTextLabel.setForeground(Color.red); } --- 125,132 ---- private void objectNameTextLabelKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_objectNameTextLabelKeyTyped try { ! ! this.descriptor.getConnection().buildObjectName( ! this.objectNameTextLabel.getText()); ! } catch (EmsMalformedObjectNameException e) { this.objectNameTextLabel.setForeground(Color.red); } Index: CreateWizardDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/create/CreateWizardDescriptor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateWizardDescriptor.java 5 Oct 2004 05:15:57 -0000 1.2 --- CreateWizardDescriptor.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,32 **** package org.mc4j.console.connection.create; ! import java.awt.Dimension; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import org.mc4j.console.connection.persistence.ConnectionSettings; ! import org.mc4j.console.connection.wizard.ConnectionIterator; ! ! import javax.management.MBeanServer; /** --- 17,27 ---- package org.mc4j.console.connection.create; ! import org.mc4j.ems.connection.EmsConnection; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import java.awt.*; ! import java.net.MalformedURLException; ! import java.net.URL; /** *************** *** 40,44 **** private CreateMBeanData data; ! private MBeanServer server; /** Make a descriptor suited to use ConnectionIterator. --- 35,39 ---- private CreateMBeanData data; ! private EmsConnection connection; /** Make a descriptor suited to use ConnectionIterator. *************** *** 46,52 **** * style guidelines. */ ! public CreateWizardDescriptor(MBeanServer server) { ! this(new CreateWizardIterator(server)); ! this.server = server; this.data = new CreateMBeanData(); --- 41,47 ---- * style guidelines. */ ! public CreateWizardDescriptor(EmsConnection connection) { ! this(new CreateWizardIterator()); ! this.connection = connection; this.data = new CreateMBeanData(); *************** *** 58,63 **** } ! public MBeanServer getServer() { ! return server; } --- 53,58 ---- } ! public EmsConnection getConnection() { ! return connection; } |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:38
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/mejb/view Modified Files: StatisticNode.java StatsNode.java CompositeStatisticsView.java MEJBView.java StatisticsView.java Log Message: Merging EMS into head for the 2.0 release work Index: MEJBView.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view/MEJBView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MEJBView.java 15 Jan 2005 03:52:15 -0000 1.6 --- MEJBView.java 12 Apr 2006 19:13:59 -0000 1.7 *************** *** 19,34 **** import org.mc4j.console.ConnectionExplorer; import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.dashboard.components.AttributeTreeTableExplorer; import org.mc4j.console.dashboard.components.OperationListComponent; import org.mc4j.console.install.ExplorerUtil; import org.mc4j.console.mejb.MBeanFilterNode; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; - import org.openide.windows.IOProvider; import org.openide.windows.TopComponent; import javax.swing.*; ! import java.awt.*; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; --- 19,33 ---- import org.mc4j.console.ConnectionExplorer; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.components.AttributeTreeTableExplorer; import org.mc4j.console.dashboard.components.OperationListComponent; import org.mc4j.console.install.ExplorerUtil; import org.mc4j.console.mejb.MBeanFilterNode; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.FilterNode; import org.openide.nodes.Node; import org.openide.windows.TopComponent; import javax.swing.*; ! import java.awt.BorderLayout; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; *************** *** 122,126 **** private void updateOperationsPanel() { OperationListComponent operationsComponent = new OperationListComponent(); ! operationsComponent.setBeanNode(this.currentNode); operationsComponent.setContext(null); this.operationsPanel.removeAll(); --- 121,125 ---- private void updateOperationsPanel() { OperationListComponent operationsComponent = new OperationListComponent(); ! operationsComponent.setBean(this.currentNode.getEmsBean()); operationsComponent.setContext(null); this.operationsPanel.removeAll(); *************** *** 130,134 **** private void updateDescriptorPanel() { ! AttributeNode descriptorAttribute = (AttributeNode) currentNode.getAttributeNodeMap().get("deploymentDescriptor"); if (descriptorAttribute != null) { descriptorTextArea.setText((String) descriptorAttribute.getValue()); --- 129,133 ---- private void updateDescriptorPanel() { ! EmsAttribute descriptorAttribute = currentNode.getAttributeNodeMap().get("deploymentDescriptor"); if (descriptorAttribute != null) { descriptorTextArea.setText((String) descriptorAttribute.getValue()); *************** *** 142,146 **** private void updateAttributesPanel() { AttributeTreeTableExplorer attributeExplorer = new AttributeTreeTableExplorer(); ! attributeExplorer.setBeanNode(currentNode); attributeExplorer.setContext(null); attributesPanel.removeAll(); --- 141,145 ---- private void updateAttributesPanel() { AttributeTreeTableExplorer attributeExplorer = new AttributeTreeTableExplorer(); ! attributeExplorer.setBean(currentNode.getEmsBean()); attributeExplorer.setContext(null); attributesPanel.removeAll(); *************** *** 166,174 **** boolean isStatisticsProvider; protected void updateFeatureSupport() { ! AttributeNode isStateManageableAttr = (AttributeNode) currentNode.getAttributeNodeMap().get("stateManageable"); isStateManageable = ((Boolean)isStateManageableAttr.getValue()).booleanValue(); ! AttributeNode isEventProviderAttr = (AttributeNode) currentNode.getAttributeNodeMap().get("eventProvider"); isEventProvider = ((Boolean)isEventProviderAttr.getValue()).booleanValue(); ! AttributeNode isStatisticsProviderAttr = (AttributeNode) currentNode.getAttributeNodeMap().get("statisticsProvider"); isStatisticsProvider = ((Boolean)isStatisticsProviderAttr.getValue()).booleanValue(); } --- 165,173 ---- boolean isStatisticsProvider; protected void updateFeatureSupport() { ! EmsAttribute isStateManageableAttr = currentNode.getAttributeNodeMap().get("stateManageable"); isStateManageable = ((Boolean)isStateManageableAttr.getValue()).booleanValue(); ! EmsAttribute isEventProviderAttr = currentNode.getAttributeNodeMap().get("eventProvider"); isEventProvider = ((Boolean)isEventProviderAttr.getValue()).booleanValue(); ! EmsAttribute isStatisticsProviderAttr = currentNode.getAttributeNodeMap().get("statisticsProvider"); isStatisticsProvider = ((Boolean)isStatisticsProviderAttr.getValue()).booleanValue(); } *************** *** 176,189 **** protected void updateHeader() { ! this.nameLabel.setText(currentNode.getObjectName().getCanonicalName()); ! descriptionTextArea.setText(currentNode.getObjectName().getKeyProperty("j2eeType")); String iconThread = "/images/ThreadTerminated.gif"; String stateString = "Unknown"; if (isStateManageable) { ! AttributeNode stateAttribute = (AttributeNode) this.currentNode.getAttributeNodeMap().get("state"); if (stateAttribute == null) ! stateAttribute = (AttributeNode) this.currentNode.getAttributeNodeMap().get("State"); if (stateAttribute != null) { --- 175,188 ---- protected void updateHeader() { ! this.nameLabel.setText(currentNode.getEmsBean().getBeanName().getCanonicalName()); ! descriptionTextArea.setText(currentNode.getEmsBean().getBeanName().getKeyProperty("j2eeType")); String iconThread = "/images/ThreadTerminated.gif"; String stateString = "Unknown"; if (isStateManageable) { ! EmsAttribute stateAttribute = this.currentNode.getAttributeNodeMap().get("state"); if (stateAttribute == null) ! stateAttribute = this.currentNode.getAttributeNodeMap().get("State"); if (stateAttribute != null) { Index: StatisticsView.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view/StatisticsView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StatisticsView.java 19 Jan 2005 14:09:40 -0000 1.6 --- StatisticsView.java 12 Apr 2006 19:13:59 -0000 1.7 *************** *** 18,41 **** import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.dashboard.DashboardComponent; ! import org.mc4j.console.ConnectionExplorer; ! import org.mc4j.console.mejb.MBeanFilterNode; ! import org.openide.explorer.view.BeanTreeView; ! import org.openide.explorer.ExplorerPanel; ! import org.openide.nodes.NodeOperation; import org.openide.nodes.Node; - import org.openide.nodes.FilterNode; - import org.openide.windows.TopComponent; import org.openide.windows.IOProvider; import javax.management.j2ee.statistics.Statistic; import javax.management.j2ee.statistics.Stats; import javax.swing.*; ! import java.awt.*; ! import java.util.Date; ! import java.util.Map; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; /** --- 18,36 ---- import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.DashboardComponent; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import org.openide.windows.IOProvider; + import org.openide.windows.TopComponent; import javax.management.j2ee.statistics.Statistic; import javax.management.j2ee.statistics.Stats; import javax.swing.*; ! import java.awt.GridBagConstraints; ! import java.awt.Insets; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; + import java.util.Date; + import java.util.Map; /** *************** *** 47,51 **** protected MBeanNode beanNode; ! protected AttributeNode attributeNode; protected Stats stats; --- 42,46 ---- protected MBeanNode beanNode; ! protected EmsAttribute attribute; protected Stats stats; *************** *** 55,63 **** beanNode = node; ! attributeNode = (AttributeNode) node.getAttributeNodeMap().get("stats"); ! if (attributeNode == null) ! attributeNode = (AttributeNode) node.getAttributeNodeMap().get("Stats"); ! System.out.println("The stat node is: " + attributeNode); --- 50,58 ---- beanNode = node; ! attribute = node.getAttributeNodeMap().get("stats"); ! if (attribute == null) ! attribute = node.getAttributeNodeMap().get("Stats"); ! System.out.println("The stat node is: " + attribute); *************** *** 143,148 **** public void refresh() { ! attributeNode.refresh(); ! Stats stat = (Stats) attributeNode.getValue(); setStat(stat); // if (this.statistic != stat) { --- 138,143 ---- public void refresh() { ! attribute.refresh(); ! Stats stat = (Stats) attribute.getValue(); setStat(stat); // if (this.statistic != stat) { Index: StatisticNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view/StatisticNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StatisticNode.java 15 Jan 2005 03:52:15 -0000 1.2 --- StatisticNode.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 18,32 **** import org.mc4j.console.Refreshable; - import org.mc4j.console.bean.attribute.AttributeNode; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; - import org.openide.nodes.Node; - import org.openide.nodes.Sheet; import org.openide.nodes.PropertySupport; import org.openide.util.Utilities; import javax.management.j2ee.statistics.Statistic; ! import javax.management.j2ee.statistics.Stats; ! import java.awt.*; import java.beans.BeanInfo; import java.beans.IndexedPropertyDescriptor; --- 18,29 ---- import org.mc4j.console.Refreshable; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.PropertySupport; + import org.openide.nodes.Sheet; import org.openide.util.Utilities; import javax.management.j2ee.statistics.Statistic; ! import java.awt.Image; import java.beans.BeanInfo; import java.beans.IndexedPropertyDescriptor; *************** *** 35,40 **** import java.beans.PropertyDescriptor; import java.lang.reflect.InvocationTargetException; - import java.util.HashSet; - import java.util.Set; /** --- 32,35 ---- *************** *** 47,51 **** private Statistic statistic; - private AttributeNode statsAttributeNode; private Image icon; --- 42,45 ---- *************** *** 136,140 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! Object val = property.getReadMethod().invoke(getStatistic(), null); return val; } --- 130,134 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! Object val = property.getReadMethod().invoke(getStatistic()); return val; } Index: StatsNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view/StatsNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StatsNode.java 15 Jan 2005 03:52:15 -0000 1.4 --- StatsNode.java 12 Apr 2006 19:13:59 -0000 1.5 *************** *** 17,42 **** package org.mc4j.console.mejb.view; - import org.openide.nodes.AbstractNode; - import org.openide.nodes.Children; - import org.openide.nodes.Node; - import org.openide.nodes.Sheet; - import org.openide.nodes.PropertySupport; - import org.openide.util.Utilities; - import org.mc4j.console.util.NodeUtil; import org.mc4j.console.Refreshable; ! import org.mc4j.console.bean.attribute.AttributeNode; - import javax.management.j2ee.statistics.Stats; import javax.management.j2ee.statistics.Statistic; ! import java.beans.BeanInfo; ! import java.beans.Introspector; ! import java.beans.IntrospectionException; ! import java.beans.PropertyDescriptor; ! import java.beans.IndexedPropertyDescriptor; ! import java.lang.reflect.InvocationTargetException; ! import java.lang.reflect.Method; import java.awt.*; ! import java.util.Set; import java.util.HashSet; /** --- 17,32 ---- package org.mc4j.console.mejb.view; import org.mc4j.console.Refreshable; ! import org.mc4j.console.util.NodeUtil; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; ! import org.openide.nodes.*; import javax.management.j2ee.statistics.Statistic; ! import javax.management.j2ee.statistics.Stats; import java.awt.*; ! import java.beans.*; ! import java.lang.reflect.InvocationTargetException; import java.util.HashSet; + import java.util.Set; /** *************** *** 51,59 **** private Stats stats; private Statistic statistic; ! private AttributeNode statsAttributeNode; private Image icon; ! public StatsNode(AttributeNode attributeNode) { super(new StatsNodeChildren(attributeNode.getValue())); this.statsAttributeNode = attributeNode; --- 41,49 ---- private Stats stats; private Statistic statistic; ! private EmsAttribute statsAttributeNode; private Image icon; ! public StatsNode(EmsAttribute attributeNode) { super(new StatsNodeChildren(attributeNode.getValue())); this.statsAttributeNode = attributeNode; *************** *** 167,171 **** public Object getValue() throws IllegalAccessException, InvocationTargetException { ! Object val = property.getReadMethod().invoke(getStats(), null); return val; } --- 157,161 ---- public Object getValue() throws IllegalAccessException, InvocationTargetException { ! Object val = property.getReadMethod().invoke(getStats()); return val; } *************** *** 211,218 **** if (Stats.class.isAssignableFrom(prop.getPropertyType())) { ! Stats childStats = (Stats) prop.getReadMethod().invoke(stats,null); newChildren.add(new StatsNode(childStats)); } else if (Statistic.class.isAssignableFrom(prop.getPropertyType())) { ! Statistic childStatistic = (Statistic) prop.getReadMethod().invoke(stats,null); newChildren.add(new StatisticNode(childStatistic)); } else if (prop.getPropertyType().isArray() && --- 201,208 ---- if (Stats.class.isAssignableFrom(prop.getPropertyType())) { ! Stats childStats = (Stats) prop.getReadMethod().invoke(stats); newChildren.add(new StatsNode(childStats)); } else if (Statistic.class.isAssignableFrom(prop.getPropertyType())) { ! Statistic childStatistic = (Statistic) prop.getReadMethod().invoke(stats); newChildren.add(new StatisticNode(childStatistic)); } else if (prop.getPropertyType().isArray() && *************** *** 220,224 **** // Array of stats objects ! Stats[] childStats = (Stats[]) prop.getReadMethod().invoke(stats,null); for (int j = 0; j < childStats.length; j++) { --- 210,214 ---- // Array of stats objects ! Stats[] childStats = (Stats[]) prop.getReadMethod().invoke(stats); for (int j = 0; j < childStats.length; j++) { *************** *** 231,235 **** // Array of stats objects ! Statistic[] childStats = (Statistic[]) prop.getReadMethod().invoke(stats,null); for (int j = 0; j < childStats.length; j++) { --- 221,225 ---- // Array of stats objects ! Statistic[] childStats = (Statistic[]) prop.getReadMethod().invoke(stats); for (int j = 0; j < childStats.length; j++) { Index: CompositeStatisticsView.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/mejb/view/CompositeStatisticsView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CompositeStatisticsView.java 5 Oct 2004 05:16:02 -0000 1.2 --- CompositeStatisticsView.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 18,31 **** import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.bean.attribute.AttributeNode; import org.mc4j.console.dashboard.DashboardComponent; - import javax.management.j2ee.statistics.Stats; import javax.management.j2ee.statistics.Statistic; import javax.management.j2ee.statistics.TimeStatistic; import javax.swing.*; - import java.util.Map; import java.util.ArrayList; import java.util.List; /** --- 18,31 ---- import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.DashboardComponent; + import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import javax.management.j2ee.statistics.Statistic; + import javax.management.j2ee.statistics.Stats; import javax.management.j2ee.statistics.TimeStatistic; import javax.swing.*; import java.util.ArrayList; import java.util.List; + import java.util.Map; /** *************** *** 36,40 **** protected MBeanNode beanNode; ! protected AttributeNode attributeNode; protected Stats statistics; --- 36,40 ---- protected MBeanNode beanNode; ! protected EmsAttribute attribute; protected Stats statistics; *************** *** 45,49 **** init(); this.beanNode = node; ! this.attributeNode = (AttributeNode) beanNode.getAttributeNodeMap().get("stats"); } --- 45,49 ---- init(); this.beanNode = node; ! this.attribute = beanNode.getAttributeNodeMap().get("stats"); } *************** *** 56,65 **** setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); ! this.statistics = (Stats) attributeNode.getValue(); ! ! Statistic[] statArray = this.statistics.getStatistics(); ! for (int i = 0; i < statArray.length; i++) { ! Statistic statistic = statArray[i]; if (statistic instanceof TimeStatistic) { StatisticsView view = new TimeStatisticsView(beanNode); --- 56,62 ---- setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); ! this.statistics = (Stats) attribute.getValue(); + for (Statistic statistic : this.statistics.getStatistics()) { if (statistic instanceof TimeStatistic) { StatisticsView view = new TimeStatisticsView(beanNode); |
Update of /cvsroot/mc4j/mc4j/application/dashboards/weblogic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/application/dashboards/weblogic Modified Files: Weblogic_EJBTransactionRuntime.xml Weblogic_ServletTable.xml Weblogic_EJBPoolRuntimeTable.xml Weblogic_ExecuteQueue_Stats.xml Added Files: Weblogic_Applications.xml Log Message: Merging EMS into head for the 2.0 release work --- NEW FILE: Weblogic_Applications.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="Applications"> <Description>Shows installed applications.</Description> <DashboardMatch type="Global" location="/Weblogic/"> <BeanMatch id="ApplicationList" type="Multiple"> <Condition type="BeanObjectNameRegexCondition" filter="Type=Application"/> </BeanMatch> </DashboardMatch> <LayoutManager type="java.awt.BorderLayout"/> <Content> <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> <Attribute name="beanList" value="ApplicationList"/> <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="'FullPath'"/> <Attribute name="AttributeName" value="'deploy'"/> <Attribute name="AttributeName" value="'undeploy'"/> </Component> </Content> </Dashboard> Index: Weblogic_EJBTransactionRuntime.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_EJBTransactionRuntime.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Weblogic_EJBTransactionRuntime.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_EJBTransactionRuntime.xml 12 Apr 2006 19:13:58 -0000 1.4 *************** *** 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="EJB Transaction Statistics"> <Description>EJB transaction statistics.</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="EJB Transaction Statistics"> <Description>EJB transaction statistics.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBTransactionRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=EJBTransactionRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBTransactionRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=EJBTransactionRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <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)30000"/> ! </Component> ! </Content> ! </Component> --- 15,19 ---- <Content> ! *************** *** 52,64 **** <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)Location"/> ! <Attribute name="AttributeName" value="(Literal)Name"/> ! <Attribute name="AttributeName" value="(Literal)TransactionsCommittedTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)TransactionsRolledBackTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)TransactionsTimedOutTotalCount"/> </Component> --- 22,34 ---- <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'Location'"/> ! <Attribute name="AttributeName" value="'Name'"/> ! <Attribute name="AttributeName" value="'TransactionsCommittedTotalCount'"/> ! <Attribute name="AttributeName" value="'TransactionsRolledBackTotalCount'"/> ! <Attribute name="AttributeName" value="'TransactionsTimedOutTotalCount'"/> </Component> Index: Weblogic_EJBPoolRuntimeTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_EJBPoolRuntimeTable.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Weblogic_EJBPoolRuntimeTable.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_EJBPoolRuntimeTable.xml 12 Apr 2006 19:13:58 -0000 1.4 *************** *** 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="EJB Pool Runtime Statistics"> <Description>EJB pool object runtime statistics.</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="EJB Pool Runtime Statistics"> <Description>EJB pool object runtime statistics.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBPoolRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=EJBPoolRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/EJB"> <BeanMatch id="EJBPoolRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=EJBPoolRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,49 **** <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)30000"/> - </Component> - </Content> - </Component> --- 15,18 ---- *************** *** 52,72 **** <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)Location"/> ! <Attribute name="AttributeName" value="(Literal)Name"/> ! <Attribute name="AttributeName" value="(Literal)AccessTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)BeansInUseCount"/> ! <Attribute name="AttributeName" value="(Literal)BeansInUseCurrentCount"/> ! <Attribute name="AttributeName" value="(Literal)CachingDisabled"/> ! <Attribute name="AttributeName" value="(Literal)DestroyedTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)IdleBeansCount"/> ! <Attribute name="AttributeName" value="(Literal)MissTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)PooledBeansCurrentCount"/> ! <Attribute name="AttributeName" value="(Literal)TimeoutTotalCount"/> ! <Attribute name="AttributeName" value="(Literal)WaiterCurrentCount"/> ! <Attribute name="AttributeName" value="(Literal)WaiterTotalCount"/> --- 21,41 ---- <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'Location'"/> ! <Attribute name="AttributeName" value="'Name'"/> ! <Attribute name="AttributeName" value="'AccessTotalCount'"/> ! <Attribute name="AttributeName" value="'BeansInUseCount'"/> ! <Attribute name="AttributeName" value="'BeansInUseCurrentCount'"/> ! <Attribute name="AttributeName" value="'CachingDisabled'"/> ! <Attribute name="AttributeName" value="'DestroyedTotalCount'"/> ! <Attribute name="AttributeName" value="'IdleBeansCount'"/> ! <Attribute name="AttributeName" value="'MissTotalCount'"/> ! <Attribute name="AttributeName" value="'PooledBeansCurrentCount'"/> ! <Attribute name="AttributeName" value="'TimeoutTotalCount'"/> ! <Attribute name="AttributeName" value="'WaiterCurrentCount'"/> ! <Attribute name="AttributeName" value="'WaiterTotalCount'"/> Index: Weblogic_ServletTable.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_ServletTable.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Weblogic_ServletTable.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_ServletTable.xml 12 Apr 2006 19:13:58 -0000 1.4 *************** *** 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="Servlet Statistics"> <Description>This dashboard shows the statistics of Weblogic Servlets.</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="Servlet Statistics"> <Description>This dashboard shows the statistics of Weblogic Servlets.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ServletRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameCondition" filter="Type=ServletRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ServletRuntimeList" type="Multiple"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=ServletRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,67 **** <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)30000"/> ! </Component> ! </Content> ! </Component> ! ! ! <Component type="org.mc4j.console.dashboard.components.AttributeTableComponent"> <Attribute name="beanList" value="ServletRuntimeList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="(Literal)ServerRuntime"/> ! <Attribute name="AttributeName" value="(Literal)Name"/> ! <Attribute name="AttributeName" value="(Literal)ServletName"/> ! <Attribute name="AttributeName" value="(Literal)ExecutionTimeAverage"/> ! <Attribute name="AttributeName" value="(Literal)ExecutionTimeHigh"/> ! <Attribute name="AttributeName" value="(Literal)ExecutionTimeLow"/> ! <Attribute name="AttributeName" value="(Literal)ExecutionTimeTotal"/> ! <Attribute name="AttributeName" value="(Literal)InvocationTotalCount"/> </Component> --- 15,34 ---- <Content> ! <Component type="org.mc4j.console.dashboard.components.AttributeTablePopupComponent"> <Attribute name="beanList" value="ServletRuntimeList"/> <Constraint type="BorderConstraints" direction="CENTER"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <Attribute name="preferredSize" value="100,100"/> ! <Attribute name="AttributeName" value="'ServerRuntime'"/> ! <Attribute name="AttributeName" value="'Name'"/> ! <Attribute name="AttributeName" value="'ServletName'"/> ! <Attribute name="AttributeName" value="'ExecutionTimeAverage'"/> ! <Attribute name="AttributeName" value="'h'"/> ! <Attribute name="AttributeName" value="'ExecutionTimeLow'"/> ! <Attribute name="AttributeName" value="'ExecutionTimeTotal'"/> ! <Attribute name="AttributeName" value="'InvocationTotalCount'"/> </Component> Index: Weblogic_ExecuteQueue_Stats.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/weblogic/Weblogic_ExecuteQueue_Stats.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Weblogic_ExecuteQueue_Stats.xml 8 Apr 2004 21:38:27 -0000 1.3 --- Weblogic_ExecuteQueue_Stats.xml 12 Apr 2006 19:13:58 -0000 1.4 *************** *** 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="Execute Queue 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="Execute Queue Statistics" standardHeader="true" refreshControl="true"> <Description>This dashboard shows the statistics of a WebLogic Execute Queue.</Description> *************** *** 8,12 **** <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ExecuteQueueRuntimeBean" type="Single"> ! <Condition type="BeanObjectNameCondition" filter="Type=ExecuteQueueRuntime"/> </BeanMatch> </DashboardMatch> --- 8,12 ---- <DashboardMatch type="Global" location="/Weblogic/Web"> <BeanMatch id="ExecuteQueueRuntimeBean" type="Single"> ! <Condition type="BeanObjectNameRegexCondition" filter="Type=ExecuteQueueRuntime"/> </BeanMatch> </DashboardMatch> *************** *** 15,54 **** <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> ! <!-- *** 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"/> --- 15,26 ---- <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <!-- *** 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"/> *************** *** 59,99 **** <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="(Literal)Pending Requests"/> ! <Attribute name="background" value="(Literal)0xFFFFFF"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)PendingRequestCurrentCount"/> </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="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)ServicedRequestTotalCount"/> </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="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="beanNode" value="ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="(Literal)400,150"/> ! <Attribute name="attributeName" value="(Literal)ExecuteThreadCurrentIdleCount"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="(Literal)VERTICAL_GLUE_SHAPE"/> </Component> </Content> --- 31,71 ---- <Content> <Component type="org.mc4j.console.swing.SectionHolder"> ! <Attribute name="title" value="'Pending Requests'"/> ! <Attribute name="background" value="'0xFFFFFF'"/> <LayoutManager type="java.awt.GridLayout" rows="1" cols="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'PendingRequestCurrentCount'"/> </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="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'ServicedRequestTotalCount'"/> </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="1"/> <Content> <Component type="org.mc4j.console.dashboard.components.NumericAttributeGraph"> ! <Attribute name="bean" value="#ExecuteQueueRuntimeBean"/> ! <Attribute name="preferredSize" value="'400,150'"/> ! <Attribute name="attributeName" value="'ExecuteThreadCurrentIdleCount'"/> </Component> </Content> </Component> <Component type="org.mc4j.console.dashboard.components.FillerComponent"> ! <Attribute name="type" value="'VERTICAL_GLUE_SHAPE'"/> </Component> </Content> |
From: Greg H. <gh...@us...> - 2006-04-12 19:14:38
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection Modified Files: StatsIntrospectorAction.java ConnectionNode.java NumericIntrospectorAction.java Removed Files: WebsphereConnectionNode.java PramatiConnectionNode.java WeblogicConnectionNode.java Oc4jConnectionNode.java Mx4jConnectionNode.java JDMKConnectionNode.java JBossConnectionNode.java JSR160ConnectionNode.java Log Message: Merging EMS into head for the 2.0 release work --- WebsphereConnectionNode.java DELETED --- Index: ConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/ConnectionNode.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ConnectionNode.java 15 Jan 2005 03:43:54 -0000 1.43 --- ConnectionNode.java 12 Apr 2006 19:13:59 -0000 1.44 *************** *** 20,26 **** import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.connection.create.CreateMBeanAction; - import org.mc4j.console.connection.install.WeblogicConnectionTypeDescriptor; import org.mc4j.console.connection.persistence.ConnectionSetDatabase; - import org.mc4j.console.connection.persistence.ConnectionSettings; import org.mc4j.console.dashboard.global.GlobalDashboardSetNode; import org.mc4j.console.domain.DomainNode; --- 20,24 ---- *************** *** 29,35 **** import org.mc4j.console.query.NewQueryAction; import org.mc4j.console.util.NodeUtil; ! import org.openide.DialogDisplayer; import org.openide.ErrorManager; - import org.openide.NotifyDescriptor; import org.openide.actions.OpenLocalExplorerAction; import org.openide.actions.PropertiesAction; --- 27,40 ---- import org.mc4j.console.query.NewQueryAction; import org.mc4j.console.util.NodeUtil; ! import org.mc4j.console.util.ConnectionInfoAction; ! import org.mc4j.ems.connection.ConnectionFactory; ! import org.mc4j.ems.connection.EmsConnection; ! import org.mc4j.ems.connection.MBeanRegistrationEvent; ! import org.mc4j.ems.connection.MBeanRegistrationListener; ! import org.mc4j.ems.connection.EmsConnectException; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.ErrorManager; import org.openide.actions.OpenLocalExplorerAction; import org.openide.actions.PropertiesAction; *************** *** 47,53 **** import org.openide.windows.TopComponent; - import javax.management.MBeanServer; - import javax.management.ObjectInstance; - import javax.management.ObjectName; import javax.swing.*; import java.awt.*; --- 52,55 ---- *************** *** 56,62 **** import java.beans.PropertyChangeListener; import java.io.IOException; - import java.lang.reflect.InvocationTargetException; - import java.lang.reflect.UndeclaredThrowableException; - import java.rmi.ConnectException; import java.util.ArrayList; import java.util.Collections; --- 58,61 ---- *************** *** 67,74 **** import java.util.Map; import java.util.Set; - import java.util.SortedSet; import java.util.Timer; - import java.util.TimerTask; - import java.util.TreeSet; /** --- 66,70 ---- *************** *** 78,82 **** * @version $Revision$($Author$ / $Date$) */ ! public abstract class ConnectionNode extends AbstractNode implements IConnectionNode, PropertyChangeListener, Comparable { --- 74,78 ---- * @version $Revision$($Author$ / $Date$) */ ! public class ConnectionNode extends AbstractNode implements IConnectionNode, PropertyChangeListener, Comparable, MBeanRegistrationListener { *************** *** 89,94 **** protected boolean connectionFailure = false; ! /** Holds a map of ObjectNames.getCannonicalName() to MBeanNodes */ ! protected volatile Map mbeans = new HashMap(); protected Node.PropertySet[] settingsPropertySets; --- 85,90 ---- protected boolean connectionFailure = false; ! /** Holds a map of cannonical object names to MBeanNodes */ ! protected volatile Map<String, MBeanNode> mbeans = new HashMap<String, MBeanNode>(); protected Node.PropertySet[] settingsPropertySets; *************** *** 102,107 **** private Set openDashboards = new HashSet(); ! public ConnectionNode() { super(new ConnectionNodeChildren()); // Setup a working pool of up to 5 threads to process remote calls --- 98,108 ---- private Set openDashboards = new HashSet(); ! ! private EmsConnection emsConnection; ! ! ! public ConnectionNode(ConnectionSettings connectionSettings) { super(new ConnectionNodeChildren()); + this.connectionSettings = connectionSettings; // Setup a working pool of up to 5 threads to process remote calls *************** *** 114,120 **** updateIcon(); // Set FeatureDescriptor stuff: - setName("loading"); ! //addPropertyChangeListener(this); } --- 115,126 ---- updateIcon(); // Set FeatureDescriptor stuff: ! setName(connectionSettings.getConnectionName()); ! ! addPropertyChangeListener(this); ! } ! ! public EmsConnection getEmsConnection() { ! return emsConnection; } *************** *** 135,142 **** } - public ConnectionNode(Children children) { - super(children); - - } public int compareTo(Object o) { --- 141,144 ---- *************** *** 153,158 **** - public abstract MBeanServer getMBeanServer(); - // Create the popup menu: protected SystemAction[] createActions() { --- 155,158 ---- *************** *** 189,325 **** protected void loadConnectionNodeChildren(boolean showProgress) throws Exception { ! //String currentText = StatusDisplayer.getDefault().getStatusText(); ProgressDialog progressDialog = null; ! try { ! StatusDisplayer.getDefault().setStatusText("Loading nodes [" + connectionSettings.getConnectionName() + "]"); ! ! MBeanServer server = getMBeanServer(); ! Set objectNames; ! if (connectionSettings.getConnectionType() instanceof WeblogicConnectionTypeDescriptor) { ! Set objectInstances = server.queryMBeans(null,null); ! objectNames = new HashSet(); ! for (Iterator iterator = objectInstances.iterator(); iterator.hasNext();) { ! ObjectInstance objectInstance = (ObjectInstance) iterator.next(); ! objectNames.add(objectInstance.getObjectName()); ! } ! } else { ! objectNames = server.queryNames(null,null); ! } ! StatusDisplayer.getDefault().setStatusText("Loading nodes [" + connectionSettings.getConnectionName() ! + "] 0 of " + objectNames.size()); ! ! if (showProgress) ! progressDialog = new ProgressDialog(objectNames.size()); ! ! ! SortedSet sortedObjectNames = new TreeSet( new MBeanNameComparator()); ! if (objectNames != null) { ! sortedObjectNames.addAll(objectNames); ! } ! ! // Create a secondary set that will be winowed with beans ! // that are still registered. Beans left in this set at the end ! // have been deregistered. ! HashSet oldMBeans = new HashSet(mbeans.keySet()); ! ! int i = 0; ! for (Iterator iter = sortedObjectNames.iterator(); iter.hasNext();) { ! ObjectName objectName = (ObjectName) iter.next(); ! ! synchronized(this) { ! if ((this.mbeans == null) || (!this.mbeans.containsKey(objectName.getCanonicalName()))) { ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("Mount MBean: " + objectInstance.getObjectName().getCanonicalName()); ! addMBean(objectName); ! } else { ! oldMBeans.remove(objectName.getCanonicalName()); ! } ! } ! ! i++; ! if (i % 20 == 0) { ! StatusDisplayer.getDefault().setStatusText("Loading nodes [" + connectionSettings.getConnectionName() ! + "] " + i + " of " + objectNames.size()); ! if (showProgress) ! progressDialog.setValue(i); ! } ! } ! ! Node parent = null; ! // Clean out beans that have been unregistered ! for (Iterator it = oldMBeans.iterator(); it.hasNext();) { ! String mbeansKey = (String) it.next(); ! ! MBeanNode node = (MBeanNode) this.mbeans.get(mbeansKey); ! parent = node.getParentNode(); ! parent.getChildren().remove(new Node[] { node }); ! ! ! mbeans.remove(mbeansKey); ! } ! if(parent != null){ //have we removed any nodes? ! //we need to get to the super parent to clean up the empty domains ! Node superParent = parent; ! while(superParent.getParentNode() != null && !(superParent instanceof ConnectionNode)) { ! superParent = superParent.getParentNode(); ! } ! ! removeEmptyDomainNodes(superParent); ! } ! ! // Reset in case there was a prior failure ! connectionFailure = false; - } catch (Exception e) { - StatusDisplayer.getDefault().setStatusText("Problem contacting server: " + - this.connectionSettings.getConnectionName()); ! Throwable probableConnectException = e; ! ! // the possible ConnectExcpetion is most likely wrapped in an UndeclaredThrowableException ! // depending on the MBeanServerProxy it may be further wrapped in an InvocationTargetException ! if (!(e instanceof ConnectException)){ ! if (e instanceof UndeclaredThrowableException) { ! probableConnectException = ((UndeclaredThrowableException)e).getUndeclaredThrowable(); ! if (probableConnectException instanceof InvocationTargetException) { ! probableConnectException = probableConnectException.getCause(); ! } ! } else { ! probableConnectException = e.getCause(); ! } ! } ! if (probableConnectException instanceof ConnectException) { ! if (connectionFailure) { ! // we know that we have a connection failure -> don't bother the user! ! ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); ! } else { ! // first connection failure -> notify with default severity ! NotifyDescriptor d = ! new NotifyDescriptor.Message("Lost connection to server at \"" + ! this.connectionSettings.getConnectionName() + ! "\". \nPlease disconnect and connect after the server is restarted.", ! NotifyDescriptor.ERROR_MESSAGE); ! DialogDisplayer.getDefault().notify(d); ! // TODO CSC: should we disconnect here?! (and remove the if-then-case!) ! // GH: I wasn't going to disconnect in case its a temporary network issue. ! // The app doesn't really deal well with this right now though. ! } ! connectionFailure = true; ! } else { ! ErrorManager.getDefault().notify(e); ! } ! throw e; ! } finally { ! StatusDisplayer.getDefault().setStatusText(""); ! if (showProgress && progressDialog != null) ! progressDialog.close(); } } ! /** * Recursively removes empty domain nodes. --- 189,228 ---- protected void loadConnectionNodeChildren(boolean showProgress) throws Exception { ! String currentText = StatusDisplayer.getDefault().getStatusText(); ProgressDialog progressDialog = null; ! StatusDisplayer.getDefault().setStatusText("Loading nodes [" + connectionSettings.getConnectionName() + "]"); ! Set<EmsBean> emsBeans = emsConnection.getBeans(); ! StatusDisplayer.getDefault().setStatusText("Loading nodes [" + connectionSettings.getConnectionName() ! + "] 0 of " + emsBeans.size()); ! if (showProgress) ! progressDialog = new ProgressDialog(emsBeans.size()); ! } + public void registrationChanged(MBeanRegistrationEvent event) { + Set<EmsBean> registered = event.getRegistered(); + Set<EmsBean> deregistered = event.getDeregistered(); ! for (EmsBean bean : registered) { ! addMBean(bean); ! } ! Node[] oldNodes = new Node[deregistered.size()]; ! int i = 0; ! for (EmsBean bean : deregistered) { ! MBeanNode currentNode = this.mbeans.remove(bean.getBeanName().getCanonicalName()); ! oldNodes[i++] = currentNode; ! } ! getChildren().remove(oldNodes); ! if (deregistered.size() > 0) { ! // TODO removeEmptyDomainNodes() } } ! ! /** * Recursively removes empty domain nodes. *************** *** 359,375 **** } - /** - * @deprecated - * @param objectInstance - */ - protected void addMBean(ObjectInstance objectInstance) { - synchronized(this) { - this.addMBean(objectInstance.getObjectName()); - } - } ! protected void addMBean(ObjectName objectName) { synchronized(this) { ! String domain = objectName.getDomain(); DomainNode domainNode = (DomainNode) this.mbeanNode.getChildren().findChild(domain); --- 262,270 ---- } ! ! protected void addMBean(EmsBean emsBean) { synchronized(this) { ! String domain = emsBean.getBeanName().getDomain(); DomainNode domainNode = (DomainNode) this.mbeanNode.getChildren().findChild(domain); *************** *** 379,384 **** } ! MBeanNode mbeanNode = new MBeanNode(objectName, this); ! this.mbeans.put(objectName.getCanonicalName(), mbeanNode); if(domainNode.isGroupTypes()) { --- 274,279 ---- } ! MBeanNode mbeanNode = new MBeanNode(this, emsBean); ! this.mbeans.put(emsBean.getBeanName().getCanonicalName(), mbeanNode); if(domainNode.isGroupTypes()) { *************** *** 493,496 **** --- 388,411 ---- public void connect() throws Exception { + ConnectionFactory connectionFactory = new ConnectionFactory(); + + try { + emsConnection = connectionFactory.connect(connectionSettings); + } catch(EmsConnectException e) { + connectionFailure = true; + updateIcon(); + JOptionPane.showMessageDialog(null,"Unable to open connection to server: " + e.getCause().getMessage(), + "Connection Error", JOptionPane.ERROR_MESSAGE); + return; + } + // Store the last 100 values for numeric attributes + connectionSettings.getControlProperties().setProperty(EmsAttribute.CONTROL_ATTRIBUTE_HISTORY_DEPTH,"100"); + + ConnectionInfoAction.addStats(emsConnection); + + this.emsConnection.addRegistrationListener(this); + + + this.connected = true; this.connectionFailure = false; *************** *** 515,519 **** getChildren().add(new Node[] { mbeanNode }); ! loadConnectionNodeChildren(true); // Turn on domain hierarchy grouping by default --- 430,434 ---- getChildren().add(new Node[] { mbeanNode }); ! emsConnection.loadSynchronous(false); // Turn on domain hierarchy grouping by default *************** *** 529,540 **** refreshTimer = new Timer(); ! refreshTimer.schedule( ! new TimerTask() { ! public void run() { ! refresh(); ! } ! }, ! 20000, ! 10000); } --- 444,455 ---- refreshTimer = new Timer(); ! // refreshTimer.schedule( ! // new TimerTask() { ! // public void run() { ! // refresh(); ! // } ! // }, ! // 20000, ! // 10000); } *************** *** 673,677 **** ! public void browseToMBean(final ObjectName objectName) { final MBeanNode node = getMBeanNode(objectName); if (node != null) { --- 588,592 ---- ! public void browseToMBean(final String objectName) { final MBeanNode node = getMBeanNode(objectName); if (node != null) { *************** *** 680,685 **** } ! public MBeanNode getMBeanNode(ObjectName objectName) { ! return (MBeanNode) this.mbeans.get(objectName.getCanonicalName()); } --- 595,600 ---- } ! public MBeanNode getMBeanNode(String objectName) { ! return this.mbeans.get(objectName); } --- JBossConnectionNode.java DELETED --- Index: NumericIntrospectorAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/NumericIntrospectorAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NumericIntrospectorAction.java 5 Oct 2004 05:15:59 -0000 1.2 --- NumericIntrospectorAction.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,21 **** package org.mc4j.console.connection; ! import org.mc4j.console.bean.MBeanNode; import org.openide.nodes.Node; import org.openide.util.HelpCtx; --- 17,22 ---- package org.mc4j.console.connection; ! import org.mc4j.ems.connection.bean.EmsBean; ! import org.mc4j.ems.connection.bean.attribute.EmsAttribute; import org.openide.nodes.Node; import org.openide.util.HelpCtx; *************** *** 24,32 **** import org.openide.windows.OutputWriter; - import javax.management.MBeanAttributeInfo; import java.math.BigDecimal; import java.math.BigInteger; import java.util.HashSet; - import java.util.List; import java.util.Set; --- 25,31 ---- *************** *** 43,64 **** OutputWriter w = IOProvider.getDefault().getIO("Stats Output", true).getOut(); ! List mbeanNodes = node.getMBeanList(); ! for (int i = 0; i < mbeanNodes.size(); i++) { ! MBeanNode beanNode = (MBeanNode) mbeanNodes.get(i); boolean beanOutput = false; ! MBeanAttributeInfo[] infos = beanNode.getMBeanInfo().getAttributes(); ! for (int j = 0; j < infos.length; j++) { ! MBeanAttributeInfo info = infos[j]; - if (STATS_TYPES.contains(info.getType()) && - !info.isWritable()) { if (!beanOutput) { ! w.println(beanNode.getObjectName().getCanonicalName()); beanOutput = true; } ! w.println("\t" + info.getName() + "[" + info.getType() + "]"); } } } --- 42,60 ---- OutputWriter w = IOProvider.getDefault().getIO("Stats Output", true).getOut(); ! for (EmsBean emsBean : node.getEmsConnection().getBeans()) { boolean beanOutput = false; ! for (EmsAttribute attribute : emsBean.getAttributes()) { ! ! if (!attribute.isWritable() && STATS_TYPES.contains(attribute.getType())) { if (!beanOutput) { ! w.println(emsBean.getBeanName().getCanonicalName()); beanOutput = true; } ! w.println("\t" + attribute.getName() + "[" + attribute.getType() + "]"); } + } } --- WeblogicConnectionNode.java DELETED --- --- JDMKConnectionNode.java DELETED --- Index: StatsIntrospectorAction.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/StatsIntrospectorAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StatsIntrospectorAction.java 5 Oct 2004 05:15:59 -0000 1.2 --- StatsIntrospectorAction.java 12 Apr 2006 19:13:59 -0000 1.3 *************** *** 17,22 **** package org.mc4j.console.connection; ! import org.mc4j.console.bean.MBeanNode; ! import org.mc4j.console.bean.attribute.AttributeNode; import org.openide.nodes.Node; import org.openide.util.HelpCtx; --- 17,21 ---- package org.mc4j.console.connection; ! import org.mc4j.ems.connection.bean.EmsBean; import org.openide.nodes.Node; import org.openide.util.HelpCtx; *************** *** 25,29 **** import org.openide.windows.OutputWriter; ! import java.util.List; /** --- 24,28 ---- import org.openide.windows.OutputWriter; ! import java.util.SortedSet; /** *************** *** 39,63 **** OutputWriter w = IOProvider.getDefault().getIO("Stats Output", true).getOut(); ! List mbeanNodes = node.getMBeanList(); ! for (int i = 0; i < mbeanNodes.size(); i++) { ! MBeanNode beanNode = (MBeanNode) mbeanNodes.get(i); ! boolean beanOutput = false; ! ! AttributeNode attrNode = (AttributeNode) beanNode.getAttributeNodeMap().get("Stats"); ! if (attrNode != null) { ! if (!beanOutput) { ! w.println(beanNode.getObjectName().getCanonicalName()); ! beanOutput = true; ! } ! w.println("\t" + beanNode.getName() + "[" + "]"); } - } ! } protected boolean enable(Node[] nodes) { ! return ((nodes.length == 1) && (nodes[0] instanceof ConnectionNode) && (((ConnectionNode)nodes[0]).isConnected())); --- 38,53 ---- OutputWriter w = IOProvider.getDefault().getIO("Stats Output", true).getOut(); ! SortedSet<EmsBean> beans = node.getEmsConnection().getBeans(); ! for (EmsBean bean : beans) { ! if (bean.getAttribute("Stats") != null) { ! w.println("\t" + bean.getBeanName().getCanonicalName()); } } ! } protected boolean enable(Node[] nodes) { ! return ((nodes.length == 1) && (nodes[0] instanceof ConnectionNode) && (((ConnectionNode)nodes[0]).isConnected())); --- Mx4jConnectionNode.java DELETED --- --- JSR160ConnectionNode.java DELETED --- --- PramatiConnectionNode.java DELETED --- --- Oc4jConnectionNode.java DELETED --- |