mc4j-cvs Mailing List for MC4J JMX Console (Page 36)
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...> - 2004-04-06 14:06:29
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/weblogic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22674/application/dashboards/weblogic Log Message: Directory /cvsroot/mc4j/mc4j/application/dashboards/weblogic added to the repository |
From: Greg H. <gh...@us...> - 2004-04-06 14:05:46
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/carbon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22455/application/dashboards/carbon Log Message: Directory /cvsroot/mc4j/mc4j/application/dashboards/carbon added to the repository |
From: Greg H. <gh...@us...> - 2004-04-06 14:04:40
|
Update of /cvsroot/mc4j/mc4j/application/dashboards/jre15 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22215/application/dashboards/jre15 Log Message: Directory /cvsroot/mc4j/mc4j/application/dashboards/jre15 added to the repository |
From: Greg H. <gh...@us...> - 2004-04-04 17:16:08
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3818/src/org/mc4j/console/dashboard/match Log Message: Directory /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/match added to the repository |
Update of /cvsroot/mc4j/mc4j/src/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19297/src/images Added Files: AnimatedLogo64.gif StackElement.gif Thread.gif ThreadBlocked.gif ThreadRunning.gif ThreadTerminated.gif ThreadWaiting.gif Log Message: Images for the new JRE15 Thread info viewer --- NEW FILE: ThreadRunning.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: AnimatedLogo64.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ThreadBlocked.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Thread.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ThreadTerminated.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ThreadWaiting.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: StackElement.gif --- (This appears to be a binary file; contents omitted.) |
From: Greg H. <gh...@us...> - 2004-04-02 03:54:12
|
Update of /cvsroot/mc4j/mc4j/lib/jdmk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18861/lib/jdmk Added Files: jmxri.jar sun_jmx_remoting.jar Log Message: The JDMK jars --- NEW FILE: jmxri.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sun_jmx_remoting.jar --- (This appears to be a binary file; contents omitted.) |
From: Greg H. <gh...@us...> - 2004-04-02 03:53:25
|
Update of /cvsroot/mc4j/mc4j/lib/jdmk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18737/lib/jdmk Log Message: Directory /cvsroot/mc4j/mc4j/lib/jdmk added to the repository |
From: Greg H. <gh...@us...> - 2004-04-02 03:50:16
|
Update of /cvsroot/mc4j/mc4j/src/etc/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18223/src/etc/META-INF Added Files: application-client.xml Log Message: Initial support for OC4J Also properly installing the JDMK libaries. --- NEW FILE: application-client.xml --- <?xml version="1.0"?> <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd"> <application-client> <display-name>A Blank Application Client</display-name> <description>This is to let OC4J lookup the MEJB as an ApplicationClient</description> </application-client> |
From: Greg H. <gh...@us...> - 2004-04-02 03:50:15
|
Update of /cvsroot/mc4j/mc4j In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18223 Modified Files: build.xml Log Message: Initial support for OC4J Also properly installing the JDMK libaries. Index: build.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/build.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** build.xml 21 Mar 2004 21:31:05 -0000 1.29 --- build.xml 2 Apr 2004 03:38:11 -0000 1.30 *************** *** 117,120 **** --- 117,123 ---- <jar jarfile="mc4j_core.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" > *************** *** 218,221 **** --- 221,232 ---- </copy> + <!-- install the additional JDMK remoting libraries --> + <mkdir dir="${application.install}\mc4jlib\JDMK"/> + <copy todir="${application.install}\mc4jlib\JDMK" overwrite="yes"> + <fileset dir="lib/jdmk"> + <include name="*.jar"/> + </fileset> + </copy> + <copy todir="${application.install}" flatten="no" overwrite="yes"> *************** *** 241,244 **** --- 252,256 ---- file="application/branding/branding" /> + <mkdir dir="${application.install}/lib/patches"/> <jar destfile="${application.install}/lib/patches/Mc4jBranding.jar" *************** *** 391,395 **** <sysproperty key="com.sun.management.jmxremote.ssl" value="false"/> <sysproperty key="com.sun.management.jmxremote.password" value="false"/> ! <sysproperty key="java.security.policy" value="${application.install}/bin/ide.policy"/> --- 403,411 ---- <sysproperty key="com.sun.management.jmxremote.ssl" value="false"/> <sysproperty key="com.sun.management.jmxremote.password" value="false"/> ! ! <!-- This currently causes rendering problems ! <sysproperty key="netbeans.winsys.imageSource" value="images/EditorBackground.gif"/> ! --> ! <sysproperty key="java.security.policy" value="${application.install}/bin/ide.policy"/> *************** *** 442,446 **** <!-- Define where the persistent files live --> ! <sysproperty key="netbeans.user" value="${user.home}/.mc4j/1.2b4"/> <!-- Provide stacktraces on exceptions --> <sysproperty key="netbeans.debug.exceptions" value="true"/> --- 458,462 ---- <!-- Define where the persistent files live --> ! <sysproperty key="netbeans.user" value="${user.home}/.mc4j/1.2b5"/> <!-- Provide stacktraces on exceptions --> <sysproperty key="netbeans.debug.exceptions" value="true"/> |
From: Greg H. <gh...@us...> - 2004-04-02 03:46:37
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17719/src/org/mc4j/console/dashboard Modified Files: BorderFactory.java Log Message: Added support for Line borders Index: BorderFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/BorderFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BorderFactory.java 7 Feb 2004 16:10:41 -0000 1.5 --- BorderFactory.java 2 Apr 2004 03:34:33 -0000 1.6 *************** *** 21,28 **** --- 21,37 ---- import java.awt.Color; + import java.beans.PropertyEditor; + import java.beans.PropertyEditorManager; + import java.util.Map; import javax.swing.border.Border; import javax.swing.border.TitledBorder; + import org.openide.ErrorManager; + import org.openide.windows.IOProvider; + + import org.mc4j.console.dashboard.context.ContextHelper; + import org.mc4j.console.util.BeanUtil; + import org.w3c.dom.Element; *************** *** 40,44 **** public static final String TYPE = "type"; ! public Border buildBorder(Element element) { String type = element.getAttribute(TYPE); --- 49,53 ---- public static final String TYPE = "type"; ! public Border buildBorder(Element element, Map context) { String type = element.getAttribute(TYPE); *************** *** 47,75 **** TitledBorder border = new TitledBorder("Initial"); return border; ! /* ! GridBagConstraints c = new GridBagConstraints(); ! ! if (element.getAttribute("gridx") != null) { ! c.gridx = Integer.parseInt(element.getAttribute("gridx")); ! } ! ! if (element.getAttribute("gridy") != null) { ! c.gridx = Integer.parseInt(element.getAttribute("gridy")); ! } ! ! if (element.getAttribute("weightx") != null) { ! c.gridx = Integer.parseInt(element.getAttribute("weightx")); ! } ! if (element.getAttribute("weighty") != null) { ! c.gridx = Integer.parseInt(element.getAttribute("weighty")); } - - //gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - //gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - //gridBagConstraints.insets = new java.awt.Insets(9, 0, 9, 10); - - return c;*/ } ! return javax.swing.BorderFactory.createLineBorder(Color.green); } } --- 56,119 ---- TitledBorder border = new TitledBorder("Initial"); return border; ! ! } else if (type.equals("javax.swing.border.LineBorder")) { ! Class borderType = javax.swing.border.LineBorder.class; ! // Attributes: color, thickness, *roundedCorners ! ! ! String colorString = element.getAttribute("color"); ! Color color = (Color) getAttributeValue(colorString,context, Color.class, borderType); ! ! String thicknessString = element.getAttribute("thickness"); ! Integer thickness = (Integer) getAttributeValue(thicknessString, context, Integer.class, borderType); ! ! //String roundedCornersString = element.getAttribute("roundedCornersString"); ! //Boolean roundedCorners = (Boolean) getAttributeValue(roundedCornersString, context, Boolean.class, borderType); ! ! if (color == null) ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut(). ! println("You must provide a color attribute for a LineBorder declaration."); ! if (thickness == null) ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut(). ! println("You must provide a thickness attribute for a LineBorder declaration."); ! //if (roundedCorners == null) ! // IOProvider.getDefault().getIO("Dashboard debugging",false).getOut(). ! // println("You must provide a roundedCorners attribute for a LineBorder declaration."); ! ! return javax.swing.BorderFactory.createLineBorder(color, thickness.intValue()); ! } ! return javax.swing.BorderFactory.createLineBorder(Color.green, 5); ! } ! ! private Object getAttributeValue(String attributeString, Map context, Class attributeType, Class borderType) { ! Object value = null; ! ! try { ! value = ContextHelper.getValue(attributeString, context); ! } catch (RuntimeException re) { ! ErrorManager.getDefault().notify(re); ! } ! ! if (value instanceof String) { ! String valueString = (String) value; ! try { ! PropertyEditor editor = PropertyEditorManager.findEditor(attributeType); ! editor.setAsText(valueString); ! value = editor.getValue(); ! } catch (IllegalArgumentException iae) { ! // Perhaps its a constant? ! Object constValue = null; ! try { ! constValue = BeanUtil.getStaticFieldValue(borderType, valueString); ! } catch(NoSuchFieldException nsfe) { ! ! } catch(IllegalAccessException iae2) { ! ! } ! if (constValue != null) ! value = constValue; } } ! return value; } } |
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17678/src/org/mc4j/console/dashboard Modified Files: AttributeFactory.java ConstraintFactory.java Dashboard.java DashboardComponentFactory.java DashboardFactory.java DashboardTopComponent.java Log Message: Removed a bunch of extra printouts and such. Index: DashboardFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DashboardFactory.java 4 Mar 2004 18:04:43 -0000 1.9 --- DashboardFactory.java 2 Apr 2004 03:34:05 -0000 1.10 *************** *** 240,247 **** if (borderElement != null) { BorderFactory borderFactory = new BorderFactory(); ! Border border = borderFactory.buildBorder(borderElement); AttributeFactory.loadAttributes(borderElement, border, context); ! ! ((JPanel)component).setBorder(border); } --- 240,247 ---- if (borderElement != null) { BorderFactory borderFactory = new BorderFactory(); ! Border border = borderFactory.buildBorder(borderElement, context); AttributeFactory.loadAttributes(borderElement, border, context); ! ! ((JComponent)component).setBorder(border); } Index: AttributeFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/AttributeFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AttributeFactory.java 7 Feb 2004 16:10:41 -0000 1.6 --- AttributeFactory.java 2 Apr 2004 03:34:05 -0000 1.7 *************** *** 28,31 **** --- 28,32 ---- import org.openide.ErrorManager; + import org.openide.windows.IOProvider; import org.mc4j.console.dashboard.context.ContextHelper; *************** *** 62,66 **** Object value = null; ! org.openide.windows.IOProvider.getDefault().getStdOut().println("Introspecting: " + object.getClass().getName() + ", name = " + name + ", value = " + valueString); PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, object.getClass()); --- 63,67 ---- Object value = null; ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Introspecting: " + object.getClass().getName() + ", name = " + name + ", value = " + valueString); PropertyDescriptor desc = BeanUtil.getPropertyDescriptor(name, object.getClass()); *************** *** 76,82 **** } else { try { ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("Checking context for value: " + valueString); value = ContextHelper.getValue(valueString, context); ! //org.openide.windows.IOProvider.getDefault().getStdOut().println("Got back: " + value); } catch (RuntimeException re) { ErrorManager.getDefault().notify(re); --- 77,83 ---- } else { try { ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Checking context for value: " + valueString); value = ContextHelper.getValue(valueString, context); ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Got back: " + value); } catch (RuntimeException re) { ErrorManager.getDefault().notify(re); *************** *** 98,106 **** } ! org.openide.windows.IOProvider.getDefault().getStdOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + object); BeanUtil.setObjectAttribute(object, name, value); } catch (Exception e) { ! org.openide.windows.IOProvider.getDefault().getStdOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + object); ErrorManager.getDefault().notify(e); --- 99,107 ---- } ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Setting attribute [" + name + "] = [" + value + "] on object: " + object); BeanUtil.setObjectAttribute(object, name, value); } catch (Exception e) { ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("*** Exception while setting attribute [" + name + "] = [" + valueString + "] on object: " + object); ErrorManager.getDefault().notify(e); Index: DashboardComponentFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardComponentFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DashboardComponentFactory.java 4 Mar 2004 17:56:30 -0000 1.7 --- DashboardComponentFactory.java 2 Apr 2004 03:34:05 -0000 1.8 *************** *** 27,30 **** --- 27,32 ---- import javax.swing.JScrollPane; + import org.openide.windows.IOProvider; + import org.mc4j.console.util.ExceptionUtility; *************** *** 45,49 **** public JComponent build(Element node, Map context) { String type = node.getAttribute("type"); ! org.openide.windows.IOProvider.getDefault().getStdOut().println("Instantiating new component: " + type); try { Class componentType = Class.forName(type); --- 47,51 ---- public JComponent build(Element node, Map context) { String type = node.getAttribute("type"); ! IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println("Instantiating new component: " + type); try { Class componentType = Class.forName(type); Index: ConstraintFactory.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/ConstraintFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConstraintFactory.java 7 Feb 2004 16:10:41 -0000 1.5 --- ConstraintFactory.java 2 Apr 2004 03:34:05 -0000 1.6 *************** *** 46,50 **** String type = element.getAttribute(TYPE); if (type.equals("java.awt.GridBagConstraints")) { ! System.out.println("Build grid bag constraint: " + element); GridBagConstraints c = new GridBagConstraints(); --- 46,50 ---- String type = element.getAttribute(TYPE); if (type.equals("java.awt.GridBagConstraints")) { ! //System.out.println("Build grid bag constraint: " + element); GridBagConstraints c = new GridBagConstraints(); *************** *** 114,118 **** try { String value = element.getAttribute("direction"); ! System.out.println("\tConstraint string is: " + value); return BeanUtil.getStaticFieldValue(BorderLayout.class, value); } catch (Exception e) { --- 114,118 ---- try { String value = element.getAttribute("direction"); ! //System.out.println("\tConstraint string is: " + value); return BeanUtil.getStaticFieldValue(BorderLayout.class, value); } catch (Exception e) { Index: Dashboard.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/Dashboard.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Dashboard.java 17 Feb 2004 02:08:05 -0000 1.11 --- Dashboard.java 2 Apr 2004 03:34:05 -0000 1.12 *************** *** 193,197 **** public boolean matches(ObjectName name) { String cName = name.getCanonicalName(); ! //org.openide.windows.IOProvider.getDefault().getStdOut().println( // "Comparing [" + this.nameFilterString + "] - [" + cName + "]"); --- 193,197 ---- public boolean matches(ObjectName name) { String cName = name.getCanonicalName(); ! //IOProvider.getDefault().getIO("Dashboard debugging",false).getOut().println( // "Comparing [" + this.nameFilterString + "] - [" + cName + "]"); Index: DashboardTopComponent.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/DashboardTopComponent.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DashboardTopComponent.java 19 Feb 2004 19:31:42 -0000 1.12 --- DashboardTopComponent.java 2 Apr 2004 03:34:05 -0000 1.13 *************** *** 30,37 **** import org.openide.util.actions.SystemAction; - import org.openide.windows.Mode; import org.openide.windows.TopComponent; - import org.openide.windows.WindowManager; - import org.openide.windows.Workspace; --- 30,34 ---- *************** *** 47,50 **** --- 44,48 ---- // For serialization putClientProperty("PersistenceType","Never"); + } |
From: Greg H. <gh...@us...> - 2004-04-02 03:44:42
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/dashboard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17437/src/org/mc4j/console/dashboard/components Added Files: AttributeTreeTableExplorer.java Log Message: A new dashboard component to display mbean attributes in a table with their descriptions, types and values. --- NEW FILE: AttributeTreeTableExplorer.java --- /* * Author: Greg Hinkle * * The contents of this file are subject to the Sapient Public License Version 1.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://mc4j.sf.net/License-SPL.html. * * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, * either express or implied. See the License for the specific language governing rights and limitations * under the License. * * The Original Code is The MC4J Management Console * The Initial Developer of the Original Code is Greg Hinkle (gh...@us...) * Copyright (C) 2004 Greg Hinkle. All Rights Reserved. * * Redistributions of code or binary files using or based on this code must reproduce the * above copyright and disclaimer. For more information see <http://mc4j.sourceforge.net>. */ package org.mc4j.console.dashboard.components; import java.awt.BorderLayout; import java.awt.Dimension; import java.util.Map; import javax.swing.ActionMap; import javax.swing.SwingUtilities; import javax.swing.text.DefaultEditorKit; import org.openide.explorer.ExplorerManager; import org.openide.explorer.ExplorerUtils; import org.openide.explorer.view.TreeTableView; import org.openide.nodes.Node; import org.openide.nodes.PropertySupport; import org.openide.util.Lookup; import org.openide.windows.TopComponent; import org.mc4j.console.Refreshable; import org.mc4j.console.bean.MBeanNode; import org.mc4j.console.dashboard.Dashboard; import org.mc4j.console.dashboard.DashboardComponent; /** * * * @author Greg Hinkle (gh...@us...), February 2004 * @version $Revision: 1.1 $($Author: ghinkl $ / $Date: 2004/04/02 03:32:38 $) */ public class AttributeTreeTableExplorer extends TopComponent implements DashboardComponent, Refreshable, ExplorerManager.Provider, Lookup.Provider { private ExplorerManager manager; private Lookup lookup; private MBeanNode beanNode; private TreeTableView treeView; private static AttributeTreeTableExplorer instance; public static final String COMPONENT_NAME = "attribute_tree_table_component"; public AttributeTreeTableExplorer() { // same as before... manager = new ExplorerManager(); ActionMap map = getActionMap(); map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(manager)); map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager)); map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager)); map.put("delete", ExplorerUtils.actionDelete(manager, true)); // or false /* // ...but add e.g.: InputMap keys = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); keys.put(KeyStroke.getKeyStroke("control c"), DefaultEditorKit.copyAction); keys.put(KeyStroke.getKeyStroke("control x"), DefaultEditorKit.cutAction); keys.put(KeyStroke.getKeyStroke("control v"), DefaultEditorKit.pasteAction); keys.put(KeyStroke.getKeyStroke("DELETE"), "delete"); // ...and initialization of lookup variable lookup = ExplorerUtils.createLookup (manager, map); */ associateLookup (ExplorerUtils.createLookup (manager, map)); //open(); //requestActive(); } public int getPersistenceType() { return TopComponent.PERSISTENCE_NEVER; } public String getName() { return COMPONENT_NAME; } private void createComponents() { setLayout(new BorderLayout()); this.treeView = new TreeTableView(); /* treeView.getAccessibleContext().setAccessibleName( FormUtils.getBundleString("ACS_ComponentTree")); // NOI18N treeView.getAccessibleContext().setAccessibleDescription( FormUtils.getBundleString("ACSD_ComponentTree")); // NOI18N */ add(BorderLayout.CENTER, this.treeView); //setPreferredSize(new Dimension(Integer.MAX_VALUE, (int) this.treeView.getPreferredSize().getHeight())); //setMaximumSize(new Dimension(Integer.MAX_VALUE, (int) this.treeView.getMaximumSize().getHeight())); } public TreeTableView getBeanTreeView() { return this.treeView; } // ...method as before and getLookup public ExplorerManager getExplorerManager() { return manager; } public void setContext(Map context) { this.beanNode = (MBeanNode) context.get(Dashboard.CONTEXT_MBEAN_NODE); createComponents(); this.treeView.setPreferredSize(new Dimension(400, 150)); this.treeView.setProperties( new Node.Property[]{ /*new PropertySupport.ReadOnly( "attributeName", // NOI18N String.class, "bar", "foo") { public Object getValue () { return null; } },*/ new PropertySupport.ReadOnly ( "description", // NOI18N String.class, "Description", "The description as provided in the MBeanInfo") { public Object getValue () { return null; } }, new PropertySupport.ReadOnly ( "className", // NOI18N String.class, "Type", "The type as provided in the MBeanInfo") { public Object getValue () { return null; } }, new PropertySupport.ReadOnly ( "valueAsText", // NOI18N String.class, "Value", "The value of the attribute") { public Object getValue () { return null; } //public void setValue(Object val) { } } } ); this.treeView.setTreePreferredWidth(200); this.treeView.setTableColumnPreferredWidth(0, 230); this.treeView.setTableColumnPreferredWidth(1, 80); this.treeView.setTableColumnPreferredWidth(2, 150); this.manager.setRootContext(this.beanNode.getAttributesNode()); SwingUtilities.invokeLater(new Runnable() { public void run() { setDisplayName(AttributeTreeTableExplorer.this.beanNode.getName()); } }); // TODO GH: This is just a rough guestimate... can we determine font-heights or maximum node-line heights? int heightNeeded = (18 * this.beanNode.getAttributesNode().getChildren().getNodes().length) + 50; setPreferredSize(new Dimension(getWidth(), heightNeeded)); setMaximumSize(new Dimension(Integer.MAX_VALUE, heightNeeded)); } public void refresh() { this.beanNode.retrieveData(); } //public Lookup getLookup() { // return lookup; //} // ...methods as before, but replace componentActivated and // componentDeactivated with e.g.: public void addNotify() { super.addNotify(); ExplorerUtils.activateActions(manager, true); } public void removeNotify() { ExplorerUtils.activateActions(manager, false); super.removeNotify(); } } |
From: Greg H. <gh...@us...> - 2004-04-02 03:39:59
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16558/src/org/mc4j/console/bean/attribute Modified Files: AttributeNode.java AttributeSetNode.java Added Files: AttributePropertyFactory.java Log Message: Moving to a single attribute property sheet supported by the attribute node. Index: AttributeNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AttributeNode.java 7 Feb 2004 16:10:40 -0000 1.8 --- AttributeNode.java 2 Apr 2004 03:27:55 -0000 1.9 *************** *** 20,24 **** package org.mc4j.console.bean.attribute; ! import java.beans.PropertyEditorManager; import java.lang.reflect.InvocationTargetException; --- 20,24 ---- package org.mc4j.console.bean.attribute; ! import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; *************** *** 40,45 **** import org.mc4j.console.Refreshable; - import org.mc4j.console.bean.MBeanNode; - import org.mc4j.console.swing.editor.ObjectNameEditor; /** --- 40,43 ---- *************** *** 55,59 **** protected ObjectName objectName; protected MBeanAttributeInfo attributeInfo; ! protected Object currentValue; --- 53,59 ---- protected ObjectName objectName; protected MBeanAttributeInfo attributeInfo; ! ! protected Node.Property valuePropertyNode; ! protected Object currentValue; *************** *** 89,100 **** refresh(); ! setDisplayName(this.attributeInfo.getName() + " = " + this.currentValue); setShortDescription(this.attributeInfo.getDescription()); } ! public void setValue(Object newValue) { this.currentValue = newValue; ! setDisplayName(this.attributeInfo.getName() + " = " + this.currentValue); } --- 89,115 ---- refresh(); ! setDisplayName(this.attributeInfo.getName()); setShortDescription(this.attributeInfo.getDescription()); } ! public void updateValue(Object newValue) { ! Object oldValue = this.currentValue; this.currentValue = newValue; ! //setDisplayName(this.attributeInfo.getName() + " = " + this.currentValue); ! // TODO GH: How to refresh the property view? ! firePropertyChange("value", oldValue, newValue); ! } ! ! ! public void setValue(Object newValue) throws Exception { ! ! try { ! server.setAttribute(objectName, ! new Attribute(attributeInfo.getName(), newValue)); ! } catch (Exception e) { ! throw new InvocationTargetException(e); ! } ! refresh(); } *************** *** 108,117 **** newValue = server.getAttribute(this.objectName, this.attributeInfo.getName()); } catch (Exception e) { newValue = "unknown type"; } ! if ((this.currentValue == null) || (!this.currentValue.equals(newValue))) { ! setDisplayName(this.attributeInfo.getName() + " = " + newValue); ! } } --- 123,138 ---- newValue = server.getAttribute(this.objectName, this.attributeInfo.getName()); } catch (Exception e) { + //e.printStackTrace(); newValue = "unknown type"; } ! //if ((this.currentValue == null) || (!this.currentValue.equals(newValue))) { ! // setDisplayName(this.attributeInfo.getName() + " = " + newValue); ! //} ! Object oldValue = this.currentValue; ! this.currentValue = newValue; ! ! // TODO GH: How to refresh the property view? ! firePropertyChange(getValueProperty().getName(), oldValue, newValue); } *************** *** 203,216 **** }); ! Node.Property attributeValueProperty = buildAttributeValueProperty(); if (attributeValueProperty != null) props.put(attributeValueProperty); return sheet; } ! private Node.Property buildAttributeValueProperty() { Node.Property property = null; ! PropertyEditorManager.registerEditor( ObjectName.class, --- 224,303 ---- }); ! Node.Property attributeValueProperty = getValueProperty(); if (attributeValueProperty != null) props.put(attributeValueProperty); + props.put(buildAttributeValueAsStringProperty()); return sheet; } ! ! private Node.Property buildAttributeValueAsStringProperty() { ! Node.Property property = null; ! property = new AttributeNodeStringProperty(this); ! ! /* ! new PropertySupport.ReadOnly( ! "valueAsText", ! String.class, ! "String Value", ! attributeInfo.getDescription()) { ! ! public Object getValue() ! throws IllegalAccessException, ! InvocationTargetException { ! try { ! Object val = getValue(); ! if (val == null) { ! return "null"; ! } if (val.getClass().isArray()) { ! int length = Array.getLength(val); ! ! StringBuffer value = new StringBuffer(); ! value.append("{ "); ! ! for (int i = 0; i < length; i++) { ! Object o = Array.get(val,i); ! if (i >0) ! value.append(", "); ! value.append(o); ! } ! value.append(" }"); ! return value.toString(); ! } else { ! return val.toString(); ! } ! } catch (Exception e) { ! return null; ! //throw new InvocationTargetException(e); ! } ! } ! }; ! */ ! ! return property; ! } ! ! /** ! * ! * @since MC4J 1.2b5 ! * @return ! */ ! public synchronized Node.Property getValueProperty() { ! if (this.valuePropertyNode == null) { ! this.valuePropertyNode = buildAttributeValueProperty(); ! } ! return this.valuePropertyNode; ! } ! private Node.Property buildAttributeValueProperty() { + return AttributePropertyFactory.getInstance().buildProperty(this); + } + + + /* + private Node.Property buildAttributeValuePropertyOld() { Node.Property property = null; ! ! PropertyEditorManager.registerEditor( ObjectName.class, *************** *** 220,227 **** MBeanNode.findType(attributeInfo.getType()); ! if (attributeInfo.isReadable() && attributeInfo.isWritable()) { property = new PropertySupport.ReadWrite( ! attributeInfo.getName(), MBeanNode.findType(attributeInfo.getType()), "Value", --- 307,314 ---- MBeanNode.findType(attributeInfo.getType()); ! if (true) { //attributeInfo.isReadable() && attributeInfo.isWritable()) { property = new PropertySupport.ReadWrite( ! "value", MBeanNode.findType(attributeInfo.getType()), "Value", *************** *** 239,246 **** --- 326,342 ---- } + public Object getValue(String attributeName) { + if ("inplaceEditor".equals(attributeName)) { + return new DateEditor(); + } else { + return super.getValue(attributeName); + } + } public Object getValue() throws IllegalAccessException, InvocationTargetException { try { + //if (getValueType().equals(Date.class)) + // return new DateEditor(); return server.getAttribute(objectName, attributeInfo.getName()); } catch (Exception e) { *************** *** 249,260 **** } } }; } else { ! property = ! new PropertySupport.ReadOnly( ! attributeInfo.getName(), MBeanNode.findType(attributeInfo.getType()), "Value", attributeInfo.getDescription()) { public Object getValue() --- 345,375 ---- } } + + public PropertyEditor getPropertyEditor() { + + return new PropertyEditorSupport() { + public String getAsText() { + return "hello"; + } + + }; + + } + }; } else { ! property = ! new PropertySupport.ReadOnly ( ! "value", MBeanNode.findType(attributeInfo.getType()), "Value", attributeInfo.getDescription()) { + public Object getValue(String attributeName) { + if ("inplaceEditor".equals(attributeName)) { + return new DateEditor(); + } else { + return super.getValue(attributeName); + } + } public Object getValue() *************** *** 262,265 **** --- 377,381 ---- InvocationTargetException { try { + return server.getAttribute(objectName, attributeInfo.getName()); } catch (Exception e) { *************** *** 268,271 **** --- 384,410 ---- } } + public PropertyEditor getPropertyEditor() { + return new ExPropertyEditorSupport() { + protected void attachEnvImpl(PropertyEnv env) { + env.registerInplaceEditorFactory(new InplaceEditor.Factory() { + public InplaceEditor getInplaceEditor() { + return new DateEditor(); + } + }); + } + + protected void validateEnv(PropertyEnv env) { + env.registerInplaceEditorFactory(new InplaceEditor.Factory() { + public InplaceEditor getInplaceEditor() { + return new DateEditor(); + } + }); + } + + public String getAsText() { + return "Bah"; + } + }; + } }; } *************** *** 275,278 **** --- 414,476 ---- return property; } + */ + + + public static class AttributeNodeStringProperty extends Node.Property { + + private AttributeNode attributeNode; + + public AttributeNodeStringProperty(AttributeNode attributeNode) { + super(String.class); + + this.attributeNode = attributeNode; + setName("valueAsText"); + setDisplayName("Value as String"); + } + + public boolean canRead() { + return true; + } + + public Object getValue() throws IllegalAccessException, InvocationTargetException { + + try { + Object val = this.attributeNode.getValue(); + if (val == null) { + return "null"; + } if (val.getClass().isArray()) { + int length = Array.getLength(val); + + StringBuffer value = new StringBuffer(); + value.append("{ "); + + for (int i = 0; i < length; i++) { + Object o = Array.get(val,i); + if (i >0) + value.append(", "); + value.append(o); + } + value.append(" }"); + return value.toString(); + } else { + return val.toString(); + } + } catch (Exception e) { + return null; + //throw new InvocationTargetException(e); + } + } + + public boolean canWrite() { + return false; + } + + public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { + + } + } + + + } --- NEW FILE: AttributePropertyFactory.java --- /* * Author: Greg Hinkle * * The contents of this file are subject to the Sapient Public License Version 1.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://mc4j.sf.net/License-SPL.html. * * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, * either express or implied. See the License for the specific language governing rights and limitations * under the License. * * The Original Code is The MC4J Management Console * The Initial Developer of the Original Code is Greg Hinkle (gh...@us...) * Copyright (C) 2004 Greg Hinkle. All Rights Reserved. * * Redistributions of code or binary files using or based on this code must reproduce the * above copyright and disclaimer. For more information see <http://mc4j.sourceforge.net>. */ package org.mc4j.console.bean.attribute; import java.lang.reflect.InvocationTargetException; import javax.management.MBeanAttributeInfo; import org.openide.nodes.Node; import org.mc4j.console.bean.MBeanNode; /** * @author Greg Hinkle (gh...@us...), Mar 23, 2004 * @version $Revision: 1.1 $($Author: ghinkl $ / $Date: 2004/04/02 03:27:55 $) */ public class AttributePropertyFactory { private static AttributePropertyFactory factory; public static AttributePropertyFactory getInstance() { if (factory == null) { factory = new AttributePropertyFactory(); } return factory; } public Node.Property buildProperty(AttributeNode node) { MBeanAttributeInfo attributeInfo = node.getAttributeInfo(); Node.Property property = null; try { Class type = MBeanNode.findType(attributeInfo.getType()); property = new AttributeProperty(type, node); } catch (ClassNotFoundException cnfe) { } return property; } public static class AttributeProperty extends Node.Property { protected AttributeNode attributeNode; public AttributeProperty(Class type, AttributeNode attributeNode) { super(type); this.attributeNode = attributeNode; setName(this.attributeNode.getDisplayName()); } /** * Can read the value of the property. * Returns the value passed into constructor. * @return <CODE>true</CODE> if the read of the value is supported */ public boolean canRead() { return this.attributeNode.getAttributeInfo().isReadable(); } /** * Can write the value of the property. * Returns the value passed into constructor. * @return <CODE>true</CODE> if the read of the value is supported */ public boolean canWrite() { return this.attributeNode.getAttributeInfo().isWritable(); } public Object getValue() throws IllegalAccessException, InvocationTargetException { return this.attributeNode.getValue(); } public void setValue(Object val) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try { this.attributeNode.setValue(val); } catch(Exception e) { throw new InvocationTargetException(e); } } } } Index: AttributeSetNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AttributeSetNode.java 24 Feb 2004 04:01:17 -0000 1.8 --- AttributeSetNode.java 2 Apr 2004 03:27:55 -0000 1.9 *************** *** 73,79 **** public void refresh() { if (ExplorerUtil.isExpanded(this)) { - retrieveData(); - } } --- 73,77 ---- *************** *** 106,123 **** this.mbeanNode.getObjectName(), names); ! ! Map values = new HashMap(); ! Iterator iter = attributeList.iterator(); ! while (iter.hasNext()) { ! Attribute attr = (Attribute)iter.next(); ! values.put(attr.getName(),attr.getValue()); ! } ! for (int i = 0; i < children.length; i++) { ! AttributeNode node = (AttributeNode)children[i]; ! Object value = values.get(node.getName()); ! if (value != null) { ! node.setValue(value); ! } else { ! node.setValue("unknown type"); } } --- 104,128 ---- this.mbeanNode.getObjectName(), names); ! if (attributeList.size() == names.length) { ! Map values = new HashMap(); ! Iterator iter = attributeList.iterator(); ! while (iter.hasNext()) { ! Attribute attr = (Attribute)iter.next(); ! values.put(attr.getName(),attr.getValue()); ! } ! for (int i = 0; i < children.length; i++) { ! AttributeNode node = (AttributeNode)children[i]; ! Object value = values.get(node.getName()); ! if (value != null) { ! node.updateValue(value); ! } else { ! node.updateValue("unknown type"); ! } ! } ! } else { ! // If we still we're unable to load all the attributes at once ! // lets load as many as we can, one at a time. ! for (int i = 0; i < children.length; i++ ) { ! ((Refreshable)children[i]).refresh(); } } |
From: Greg H. <gh...@us...> - 2004-04-02 03:39:58
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16558/src/org/mc4j/console/bean Modified Files: MBeanNode.java Log Message: Moving to a single attribute property sheet supported by the attribute node. Index: MBeanNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/MBeanNode.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MBeanNode.java 24 Feb 2004 03:59:24 -0000 1.22 --- MBeanNode.java 2 Apr 2004 03:27:55 -0000 1.23 *************** *** 23,26 **** --- 23,28 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import java.beans.PropertyChangeEvent; + import java.beans.PropertyChangeListener; import java.beans.PropertyEditor; import java.beans.PropertyEditorManager; *************** *** 76,79 **** --- 78,82 ---- import org.mc4j.console.bean.operation.OperationSetNode; import org.mc4j.console.connection.ConnectionNode; + import org.mc4j.console.install.ExplorerUtil; import org.mc4j.console.swing.editor.ObjectNameEditor; import org.mc4j.console.swing.editor.calendar.CalendarDateEditor; *************** *** 353,357 **** // Refresh them all in one connection if (this.attributesNode != null) { ! this.attributesNode.refresh(); } --- 356,365 ---- // Refresh them all in one connection if (this.attributesNode != null) { ! if (ExplorerUtil.isSelected(this)) { ! retrieveData(); ! } else if (ExplorerUtil.isExpanded(this)) { ! // The child attribute node may be selected ! this.attributesNode.refresh(); ! } } *************** *** 377,381 **** protected SystemAction[] createActions() { return new SystemAction[] { - null, NodeAction.get(RefreshAction.class), --- 385,388 ---- *************** *** 495,499 **** } ! protected org.openide.nodes.Sheet.Set buildAttributes() { org.openide.nodes.Sheet.Set props = Sheet.createPropertiesSet(); props.setName("Attributes"); --- 502,537 ---- } ! ! protected Sheet.Set buildAttributes() { ! org.openide.nodes.Sheet.Set props = Sheet.createPropertiesSet(); ! props.setName("Attributes"); ! props.setDisplayName("Attributes"); ! props.setShortDescription("These properties are the attributes of the Management Bean"); ! ! Map attributeNodeMap = getAttributeNodeMap(); ! ! ! for(Iterator iter = attributeNodeMap.entrySet().iterator(); iter.hasNext(); ) { ! Map.Entry entry = (Map.Entry) iter.next(); ! ! String key = (String)entry.getKey(); ! final AttributeNode attributeNode = (AttributeNode)entry.getValue(); ! ! Property attributeProperty = attributeNode.getValueProperty(); ! ! // Forward changes on the AttributeNode to the parent MBeanNode since the parent also uses the child ! // attribute in the property display ! attributeNode.addPropertyChangeListener(new PropertyChangeListener() { ! public void propertyChange(PropertyChangeEvent evt) { ! MBeanNode.this.firePropertyChange(attributeNode.getName(), evt.getOldValue(), evt.getNewValue()); ! } ! }); ! props.put(attributeProperty); ! } ! ! return props; ! } ! ! protected org.openide.nodes.Sheet.Set buildAttributes2() { org.openide.nodes.Sheet.Set props = Sheet.createPropertiesSet(); props.setName("Attributes"); *************** *** 518,521 **** --- 556,561 ---- // findType(attributeInfo.getType())+ ")"); + + if (attributeInfo.isReadable() && attributeInfo.isWritable()) { props.put( *************** *** 654,660 **** } ! /** Getter for property attributeNodeMap. * @return Value of property attributeNodeMap. - * */ public Map getAttributeNodeMap() { --- 694,700 ---- } ! /** ! * Gets a map of the attribute names to their respective nodes. * @return Value of property attributeNodeMap. */ public Map getAttributeNodeMap() { *************** *** 719,721 **** --- 759,765 ---- */ + public AttributeSetNode getAttributesNode() { + return attributesNode; + } + } |
From: Greg H. <gh...@us...> - 2004-04-02 03:38:17
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16229/src/org/mc4j/console Modified Files: IConnectionNode.java Log Message: Centralizing connection specifics in the connection nodes Index: IConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/IConnectionNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IConnectionNode.java 7 Feb 2004 16:10:41 -0000 1.2 --- IConnectionNode.java 2 Apr 2004 03:26:14 -0000 1.3 *************** *** 30,35 **** public interface IConnectionNode { ! public void initialize(ConnectionSettings settings); ! public void connect() throws Exception; } --- 30,45 ---- public interface IConnectionNode { ! void initialize(ConnectionSettings settings); ! void connect() throws Exception; ! ! String getDefaultServerUrl(); ! ! String getDefaultJndiName(); ! ! String getDefaultInitialContext(); ! ! String getDefaultPrinciple(); ! ! String getDefaultCredentials(); } |
From: Greg H. <gh...@us...> - 2004-04-02 03:37:54
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16150/src/org/mc4j/console/connection Added Files: Oc4jConnectionNode.java Log Message: Initial OC4J 10.0.3 support. --- NEW FILE: Oc4jConnectionNode.java --- /* * Author: Steve Button * * The contents of this file are subject to the Sapient Public License Version 1.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://mc4j.sf.net/License-SPL.html. * * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, * either express or implied. See the License for the specific language governing rights and limitations * under the License. * * The Original Code is The MC4J Management Console * The Initial Developer of the Original Code is Greg Hinkle (gh...@us...) * Copyright (C) 2004 Greg Hinkle. All Rights Reserved. * * Redistributions of code or binary files using or based on this code must reproduce the * above copyright and disclaimer. For more information see <http://mc4j.sourceforge.net>. */ package org.mc4j.console.connection; import java.lang.reflect.Field; import java.util.Hashtable; import javax.management.MBeanServer; import javax.management.j2ee.Management; import javax.management.j2ee.ManagementHome; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.mc4j.console.connection.proxy.GenericMBeanServerProxy; /** * This Node acts as a connection to an OC4J MBean Server via a MEJB. * The MEJB connection is ontained using a J2EE ApplicationClient. This * involves a workaround which requires a META-INF/application-client.xml to be * present in one of the JAR files which the client is loading. The application-client.xml * file can be completely empty, it just needs to be present. * <p/> * Accordingly, an empty application-client.xml has been added to the src/etc directory * and is included in the mc4j_core.jar file when it is created. * * @author Steve Button(sb...@us...), March 2004 * @version 1.0 */ public class Oc4jConnectionNode extends ConnectionNode { private static final boolean M_DEBUG = true; protected MBeanServer mbeanServer; /** * Connect to the OC4J ManagementEJB. This should only be used while the JSR160 * interface is not available. * * @throws Exception */ public void connect() throws Exception { log("Oc4jConnectionNode"); log(connectionSettings.toString()); logMessage("ConnectionSettings: " + connectionSettings.toString()); Context ctx = null; ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); try { //The OC4J connection type Hashtable env = new Hashtable(); env.put(Context.PROVIDER_URL, connectionSettings.getServerUrl()); env.put(Context.SECURITY_PRINCIPAL, connectionSettings.getPrinciple()); env.put(Context.SECURITY_CREDENTIALS, connectionSettings.getCredentials()); env.put(Context.INITIAL_CONTEXT_FACTORY, connectionSettings.getInitialContextName()); Context oc4jctx = new InitialContext(env); Object obj = (ManagementHome) oc4jctx.lookup(connectionSettings.getJndiName()); ManagementHome mgmtHome = (ManagementHome) PortableRemoteObject.narrow(obj, ManagementHome.class); Management oc4jmbs = mgmtHome.create(); this.mbeanServer = (MBeanServer) GenericMBeanServerProxy.buildServerProxy(oc4jmbs); super.connect(); } catch (Exception e) { e.printStackTrace(); NotifyDescriptor d = new NotifyDescriptor.Message("Unable to connect to OC4J server at [" + this.connectionSettings.getServerUrl() + "]. \nCheck to make sure the OC4J server is running on the specified host and port.", NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(d); } finally { Thread.currentThread().setContextClassLoader(contextClassLoader); } } public String getConstant(Class clazz, String name) throws Exception { Field field = clazz.getField(name); return (String) field.get(null); } public void disconnect() throws Exception { super.disconnect(); //this.connector.close(); super.connected = false; } public MBeanServer getMBeanServer() { return this.mbeanServer; } private void logMessage(String msg) { if (!M_DEBUG) return; NotifyDescriptor d = new NotifyDescriptor.Message(msg, NotifyDescriptor.INFORMATION_MESSAGE); DialogDisplayer.getDefault().notify(d); } private void log(String msg) { if (!M_DEBUG) return; System.out.println(msg); } public String getDefaultServerUrl() { return "ormi://localhost:23791/default"; } public String getDefaultJndiName() { return "java:comp/env/ejb/mgmt/MEJB"; } public String getDefaultInitialContext() { return "com.evermind.server.ApplicationClientInitialContextFactory"; } public String getDefaultPrinciple() { return "admin"; } public String getDefaultCredentials() { return ""; } } |
From: Greg H. <gh...@us...> - 2004-04-02 03:37:30
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16054/src/org/mc4j/console/connection Modified Files: ConnectionNode.java JBossConnectionNode.java JDMKConnectionNode.java JSR160ConnectionNode.java Mx4jConnectionNode.java WeblogicConnectionNode.java WebsphereConnectionNode.java Log Message: Centralizing connection specifics in the connection node. Index: WebsphereConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/WebsphereConnectionNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WebsphereConnectionNode.java 1 Apr 2004 03:42:05 -0000 1.4 --- WebsphereConnectionNode.java 2 Apr 2004 03:25:26 -0000 1.5 *************** *** 153,155 **** --- 153,168 ---- } + + public String getDefaultServerUrl() { + return "http://localhost:8880"; + } + + public String getDefaultPrinciple() { + return "admin"; + } + + public String getDefaultCredentials() { + return ""; + } + } Index: WeblogicConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/WeblogicConnectionNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** WeblogicConnectionNode.java 17 Feb 2004 02:03:36 -0000 1.10 --- WeblogicConnectionNode.java 2 Apr 2004 03:25:26 -0000 1.11 *************** *** 109,111 **** --- 109,131 ---- } + + public String getDefaultServerUrl() { + return "t3://localhost:7001"; + } + + public String getDefaultJndiName() { + return "weblogic.management.adminhome"; + } + + public String getDefaultInitialContext() { + return "weblogic.jndi.WLInitialContextFactory"; + } + + public String getDefaultPrinciple() { + return "admin"; + } + + public String getDefaultCredentials() { + return ""; + } } Index: JDMKConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/JDMKConnectionNode.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JDMKConnectionNode.java 17 Feb 2004 02:03:36 -0000 1.7 --- JDMKConnectionNode.java 2 Apr 2004 03:25:26 -0000 1.8 *************** *** 93,95 **** --- 93,104 ---- } + + public String getDefaultServerUrl() { + return "localhost:8086"; + } + + public String getDefaultJndiName() { + return "name=RmiConnectorServer"; + } + } Index: JBossConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/JBossConnectionNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** JBossConnectionNode.java 17 Feb 2004 02:03:35 -0000 1.11 --- JBossConnectionNode.java 2 Apr 2004 03:25:25 -0000 1.12 *************** *** 33,36 **** --- 33,39 ---- import org.jboss.jmx.adaptor.rmi.RMIAdaptor; + import org.jboss.jmx.connector.notification.RMINotificationListener; + import org.jboss.jmx.connector.notification.RMINotificationListenerMBean; + import org.jboss.jmx.connector.rmi.RMIConnectorImpl; /** *************** *** 70,75 **** RMIAdaptor rmiAdaptor = (RMIAdaptor) context.lookup(connectionSettings.getJndiName()); ! this.mbeanServer = GenericMBeanServerProxy.buildServerProxy(rmiAdaptor); super.connect(); --- 73,85 ---- RMIAdaptor rmiAdaptor = (RMIAdaptor) context.lookup(connectionSettings.getJndiName()); ! // GH: Works around a real strange "LinkageError: Duplicate class found" ! // by loading these classes in the main connection classloader ! Class foo = RMINotificationListener.class; ! foo = RMINotificationListenerMBean.class; + // TODO GH!: I think this fixes notifications, but breaks compatibility with at least 3.0.8 + RMIConnectorImpl connector = new RMIConnectorImpl(rmiAdaptor); + + this.mbeanServer = GenericMBeanServerProxy.buildServerProxy(connector); super.connect(); *************** *** 88,92 **** } ! public void disconnect() throws Exception { super.disconnect(); --- 98,118 ---- } ! /* GH: an aborted attempt at manually changing the polling type ! public class RMIAdaptorExtension extends RMIConnectorImpl { ! public RMIAdaptorExtension(RMIAdaptor rmiAdaptor) { ! super(rmiAdaptor); ! ! try { ! Field field = RMIConnectorImpl.class.getField("mEventType"); ! if (!Modifier.isPrivate(field.getModifiers())) { ! field.set(this, new Integer(RMIConnectorImpl.NOTIFICATION_TYPE_POLLING)); ! } ! } catch (NoSuchFieldException nsfe) { ! } catch (IllegalAccessException iae) { ! } ! } ! } ! */ ! public void disconnect() throws Exception { super.disconnect(); *************** *** 99,101 **** --- 125,138 ---- } + public String getDefaultServerUrl() { + return "jnp://localhost:1099"; + } + + public String getDefaultJndiName() { + return "jmx/rmi/RMIAdaptor"; + } + + public String getDefaultInitialContext() { + return "org.jnp.interfaces.NamingContextFactory"; + } } Index: Mx4jConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/Mx4jConnectionNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Mx4jConnectionNode.java 17 Feb 2004 02:03:36 -0000 1.9 --- Mx4jConnectionNode.java 2 Apr 2004 03:25:26 -0000 1.10 *************** *** 102,104 **** --- 102,117 ---- } + + public String getDefaultServerUrl() { + return "rmi://localhost:1099"; + } + + public String getDefaultJndiName() { + return "jrmp"; + } + + public String getDefaultInitialContext() { + return "com.sun.jndi.rmi.registry.RegistryContextFactory"; + } + } Index: ConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/ConnectionNode.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ConnectionNode.java 7 Feb 2004 16:10:41 -0000 1.23 --- ConnectionNode.java 2 Apr 2004 03:25:25 -0000 1.24 *************** *** 479,482 **** --- 479,502 ---- + public String getDefaultServerUrl() { + return null; + } + + public String getDefaultJndiName() { + return null; + } + + public String getDefaultInitialContext() { + return null; + } + + public String getDefaultPrinciple() { + return null; + } + + public String getDefaultCredentials() { + return null; + } + } Index: JSR160ConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/JSR160ConnectionNode.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JSR160ConnectionNode.java 1 Mar 2004 18:23:44 -0000 1.5 --- JSR160ConnectionNode.java 2 Apr 2004 03:25:26 -0000 1.6 *************** *** 94,97 **** --- 94,111 ---- return this.mbeanServer; } + + + public String getDefaultServerUrl() { + return "service:jmx:rmi:///jndi/rmi://localhost:9999/server"; + } + + public String getDefaultPrinciple() { + return ""; + } + + public String getDefaultCredentials() { + return ""; + } + } |
From: Greg H. <gh...@us...> - 2004-04-02 03:37:29
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16054/src/org/mc4j/console Modified Files: ManagementNode.java Log Message: Centralizing connection specifics in the connection node. Index: ManagementNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/ManagementNode.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ManagementNode.java 19 Feb 2004 19:31:42 -0000 1.14 --- ManagementNode.java 2 Apr 2004 03:25:26 -0000 1.15 *************** *** 42,46 **** import org.openide.util.NbBundle; import org.openide.util.actions.NodeAction; - import org.openide.windows.IOProvider; import org.mc4j.console.connection.persistence.ConnectionSetDatabase; --- 42,45 ---- *************** *** 139,142 **** --- 138,142 ---- public static final String JDMK_CONNECTION = "JDMK"; public static final String WEBSPHERE_CONNECTION = "Websphere"; + public static final String OC4J_CONNECTION = "OC4J"; public static final String OTHER_CONNECTION = "Other"; *************** *** 144,148 **** new String[] { JBOSS_CONNECTION, MX4J_CONNECTION, WEBLOGIC_CONNECTION, ! JSR160_CONNECTION, JDMK_CONNECTION, WEBSPHERE_CONNECTION, OTHER_CONNECTION }; public static Map CONNECTION_IMPL = new HashMap(); --- 144,148 ---- new String[] { JBOSS_CONNECTION, MX4J_CONNECTION, WEBLOGIC_CONNECTION, ! JSR160_CONNECTION, JDMK_CONNECTION, WEBSPHERE_CONNECTION, OC4J_CONNECTION}; public static Map CONNECTION_IMPL = new HashMap(); *************** *** 154,157 **** --- 154,158 ---- CONNECTION_IMPL.put(JDMK_CONNECTION, "org.mc4j.console.connection.JDMKConnectionNode"); CONNECTION_IMPL.put(WEBSPHERE_CONNECTION, "org.mc4j.console.connection.WebsphereConnectionNode"); + CONNECTION_IMPL.put(OC4J_CONNECTION, "org.mc4j.console.connection.Oc4jConnectionNode"); } *************** *** 188,191 **** --- 189,216 ---- } + public static IConnectionNode buildTestConnection(String connectionType) { + IConnectionNode node = null; + + String className = (String) CONNECTION_IMPL.get(connectionType); + + try { + ConnectionSettings settings = new ConnectionSettings(); + settings.setConnectionType(connectionType); + ClassLoader loader = buildClassLoader(settings); + + Class clazz = Class.forName(className, true, loader); + node = + (IConnectionNode) clazz.newInstance(); + + } catch (ClassNotFoundException cnfe) { + ErrorManager.getDefault().notify(cnfe); + } catch (InstantiationException ie) { + ErrorManager.getDefault().notify(ie); + } catch (IllegalAccessException iae) { + ErrorManager.getDefault().notify(iae); + } + return node; + } + public static IConnectionNode buildConnection(ConnectionSettings settings) { |
From: Greg H. <gh...@us...> - 2004-04-02 03:37:29
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16054/src/org/mc4j/console/connection/wizard Modified Files: ConnectionIterator.java ConnectionVisualPanel.java ServerInstallPanel.java Log Message: Centralizing connection specifics in the connection node. Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ServerInstallPanel.java 1 Apr 2004 03:40:37 -0000 1.6 --- ServerInstallPanel.java 2 Apr 2004 03:25:25 -0000 1.7 *************** *** 131,134 **** --- 131,143 ---- }; + private static final String[] OC4J_SERVER_FILES = + new String[] { + "adminclient.jar", + "ejb.jar", + "oc4j-internal.jar", + "admin_client.jar" + }; + + // You can use a settings object to keep track of state. // Normally the settings object will be the WizardDescriptor, *************** *** 153,158 **** --- 162,174 ---- } else if (ManagementNode.WEBSPHERE_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { serverFiles = null; + } else if (ManagementNode.OC4J_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { + serverFiles = OC4J_SERVER_FILES; } + //todo sab -- a quick hack to make the JSR support work easily for OC4J + //else if (ManagementNode.JSR160_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { + // serverFiles = OC4J_SERVER_FILES; + //} + if (serverFiles != null) { for (int i = 0; i < serverFiles.length; i++) { Index: ConnectionIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionIterator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ConnectionIterator.java 7 Feb 2004 16:10:41 -0000 1.8 --- ConnectionIterator.java 2 Apr 2004 03:25:25 -0000 1.9 *************** *** 116,120 **** return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ManagementNode.WEBLOGIC_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.WEBSPHERE_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); case 2: return true; --- 116,121 ---- return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ManagementNode.WEBLOGIC_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.WEBSPHERE_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.OC4J_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); case 2: return true; Index: ConnectionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionVisualPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ConnectionVisualPanel.java 1 Mar 2004 18:23:44 -0000 1.12 --- ConnectionVisualPanel.java 2 Apr 2004 03:25:25 -0000 1.13 *************** *** 39,42 **** --- 39,43 ---- import org.openide.util.NbBundle; + import org.mc4j.console.IConnectionNode; import org.mc4j.console.ManagementNode; import org.mc4j.console.swing.ComponentBorder; *************** *** 98,104 **** protected void prefill(String type) { ! String dName = null, dJndiName = null, dInitialContext = null, dServerUrl = null, dPrinciple = null, dCredentials = null; dName = ""; // Everyone needs a name if ("JBoss".equals(type)) { dJndiName = "jmx/rmi/RMIAdaptor"; --- 99,122 ---- protected void prefill(String type) { ! String dName = null, ! dJndiName = null, ! dInitialContext = null, ! dServerUrl = null, ! dPrinciple = null, ! dCredentials = null; dName = ""; // Everyone needs a name + + if (type != null) { + IConnectionNode connectionNode = (IConnectionNode) ManagementNode.buildTestConnection(type); + + + dJndiName = connectionNode.getDefaultJndiName(); + dInitialContext = connectionNode.getDefaultInitialContext(); + dServerUrl = connectionNode.getDefaultServerUrl(); + dPrinciple = connectionNode.getDefaultPrinciple(); + dCredentials = connectionNode.getDefaultCredentials(); + } + /* if ("JBoss".equals(type)) { dJndiName = "jmx/rmi/RMIAdaptor"; *************** *** 126,129 **** --- 144,153 ---- dServerUrl = "http://localhost:8880"; dJndiName = null; + } else if("OC4J".equals(type)) { + dServerUrl="ormi://localhost:23791/default"; + dJndiName = "java:comp/env/ejb/mgmt/MEJB"; + dInitialContext="com.evermind.server.ApplicationClientInitialContextFactory"; + dPrinciple="admin"; + dCredentials=""; } else { *************** *** 134,138 **** dPrinciple = ""; dCredentials = ""; ! } this.jndiNameField.setEnabled(dJndiName != null); --- 158,162 ---- dPrinciple = ""; dCredentials = ""; ! }*/ this.jndiNameField.setEnabled(dJndiName != null); |
From: Greg H. <gh...@us...> - 2004-04-02 03:08:09
|
Update of /cvsroot/mc4j/mc4j/src/etc/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11974/src/etc/META-INF Log Message: Directory /cvsroot/mc4j/mc4j/src/etc/META-INF added to the repository |
From: Greg H. <gh...@us...> - 2004-04-02 03:08:06
|
Update of /cvsroot/mc4j/mc4j/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11912/src/etc Log Message: Directory /cvsroot/mc4j/mc4j/src/etc added to the repository |
From: Greg H. <gh...@us...> - 2004-04-02 03:07:08
|
Update of /cvsroot/mc4j/mc4j/application/dashboards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11783/application/dashboards Modified Files: BasicMBean.xml Log Message: A new look using the tree table attribute view. Index: BasicMBean.xml =================================================================== RCS file: /cvsroot/mc4j/mc4j/application/dashboards/BasicMBean.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BasicMBean.xml 25 Feb 2004 19:47:31 -0000 1.4 --- BasicMBean.xml 2 Apr 2004 02:55:04 -0000 1.5 *************** *** 22,41 **** <Component type="javax.swing.JPanel"> <Constraint type="BorderConstraints" direction="NORTH"/> ! <!--LayoutManager type="java.awt.GridBagLayout"/--> ! <LayoutManager type="java.awt.GridLayout" rows="2" cols="1"/> <Content> <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)Generic Managed Bean Dashboard 2"/> <Attribute name="font" value="(Literal)Dialog bold 24"/> <Attribute name="foreground" value="(Literal)0xFF2222"/> </Component> <Component type="javax.swing.JTextArea"> ! <!--Constraint type="java.awt.GridBagConstraints" anchor="NORTH" gridx="1" gridy="2"/--> ! <Attribute name="text" value="(Literal)This Dashboard displays basic information about any managed bean."/> <Attribute name="opaque" value="(Literal)false"/> <Attribute name="editable" value="(Literal)false"/> --- 22,46 ---- + <!-- *** Header *** --> <Component type="javax.swing.JPanel"> <Constraint type="BorderConstraints" direction="NORTH"/> ! <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)Dialog bold 24"/> <Attribute name="foreground" value="(Literal)0xFF2222"/> + </Component> + <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> + <Constraint type="BorderConstraints" direction="EAST"/> + <Attribute name="refreshDelay" value="(Literal)30000"/> </Component> <Component type="javax.swing.JTextArea"> ! <Constraint type="BorderConstraints" direction="SOUTH"/> ! <Attribute name="text" value="DashboardDescription"/> ! <Attribute name="font" value="(Literal)Dialog bold 16"/> <Attribute name="opaque" value="(Literal)false"/> <Attribute name="editable" value="(Literal)false"/> *************** *** 44,47 **** --- 49,53 ---- </Content> </Component> + <!-- *************** *** 68,80 **** <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"/> - <LayoutManager type="java.awt.BoxLayout" axis="Y_AXIS"/> <Content> --- 74,84 ---- <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> *************** *** 82,89 **** <Attribute name="title" value="(Literal)MBean Attributes"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <Content> ! <Component type="org.mc4j.console.dashboard.components.AttributeListComponent"> <Attribute name="background" value="(Literal)0xFFFFFF"/> - <Attribute name="Label" value="(Literal)Server Information"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> <!--<Border type="javax.swing.border.TitledBorder"> --- 86,95 ---- <Attribute name="title" value="(Literal)MBean Attributes"/> <Attribute name="background" value="(Literal)0xFFFFFF"/> + <LayoutManager type="java.awt.BorderLayout"/> <Content> ! <Component type="org.mc4j.console.dashboard.components.AttributeTreeTableExplorer"> ! <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"/> <!--<Border type="javax.swing.border.TitledBorder"> |
From: Greg H. <gh...@us...> - 2004-04-01 03:53:59
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9023/src/org/mc4j/console/connection Modified Files: WebsphereConnectionNode.java Log Message: Output the exception instead of just guessing that the server isn't there. (Need to determine which exceptions are caused by what) Index: WebsphereConnectionNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/WebsphereConnectionNode.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WebsphereConnectionNode.java 17 Feb 2004 02:03:36 -0000 1.3 --- WebsphereConnectionNode.java 1 Apr 2004 03:42:05 -0000 1.4 *************** *** 29,34 **** import javax.naming.Context; ! import org.openide.DialogDisplayer; ! import org.openide.NotifyDescriptor; import org.mc4j.console.connection.proxy.GenericMBeanServerProxy; --- 29,33 ---- import javax.naming.Context; ! import org.openide.ErrorManager; import org.mc4j.console.connection.proxy.GenericMBeanServerProxy; *************** *** 123,128 **** super.connect(); } catch (Exception e) { ! NotifyDescriptor d = new NotifyDescriptor.Message("Unable to connect to server at [" + this.connectionSettings.getServerUrl() + --- 122,130 ---- super.connect(); + // TODO GH: Customize exception and error messages to help + // with typical problems (jsse jars missing, passwords, etc.) } catch (Exception e) { ! ErrorManager.getDefault().notify(e); ! /*NotifyDescriptor d = new NotifyDescriptor.Message("Unable to connect to server at [" + this.connectionSettings.getServerUrl() + *************** *** 130,134 **** NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(d); ! } finally { Thread.currentThread().setContextClassLoader(contextClassLoader); --- 132,136 ---- NotifyDescriptor.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(d); ! */ } finally { Thread.currentThread().setContextClassLoader(contextClassLoader); |
From: Greg H. <gh...@us...> - 2004-04-01 03:52:35
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8816/src/org/mc4j/console/connection/wizard Modified Files: ServerInstallPanel.java Log Message: Added JBoss-J2ee.jar for jboss 4.0 server types. Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ServerInstallPanel.java 7 Feb 2004 16:10:41 -0000 1.5 --- ServerInstallPanel.java 1 Apr 2004 03:40:37 -0000 1.6 *************** *** 122,126 **** "dom4j.jar", "jnp-client.jar", ! "jmx-rmi-connector-client.jar" }; --- 122,127 ---- "dom4j.jar", "jnp-client.jar", ! "jmx-rmi-connector-client.jar", ! "jboss-j2ee.jar" }; |
From: Greg H. <gh...@us...> - 2004-03-31 20:15:32
|
Update of /cvsroot/mc4j/mc4j/application/dashboards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22715/application/dashboards Added Files: JRE15_ThreadTree.xml Log Message: Supports browsing live Thread information from the jre15 ThreadMBean. --- NEW FILE: JRE15_ThreadTree.xml --- <?xml version="1.0" encoding="UTF-8"?> <DashBoard version="1.0" name="Threading" nameFilter="type=Threading" isGlobal="true" isMultiBean="false"> <Description>Live thread states and stacks.</Description> <LayoutManager type="java.awt.BorderLayout"/> <Content> <!-- *** Header *** --> <Component type="javax.swing.JPanel"> <Constraint type="BorderConstraints" direction="NORTH"/> <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)Dialog bold 24"/> <Attribute name="foreground" value="(Literal)0xFF2222"/> </Component> <Component type="org.mc4j.console.dashboard.components.RefreshControlComponent"> <Constraint type="BorderConstraints" direction="EAST"/> <Attribute name="refreshDelay" value="(Literal)2000"/> </Component> <Component type="javax.swing.JTextArea"> <Constraint type="BorderConstraints" direction="SOUTH"/> <Attribute name="text" value="DashboardDescription"/> <Attribute name="font" value="(Literal)Dialog bold 16"/> <Attribute name="opaque" value="(Literal)false"/> <Attribute name="editable" value="(Literal)false"/> </Component> </Content> </Component> <Component type="org.mc4j.jre15.components.ThreadMBeanThreadBrowserComponent"> </Component> </Content> </DashBoard> |