if ( objectViewerClassname != null )
{
try
{
JMXObjectViewer viewerPanel = (JMXObjectViewer)Thread.currentThread().getContextClassLoader().loadClass( objectViewerClassname ).newInstance();
/** Call framework level initialisation routine **/
viewerPanel.initialiseViewer(JMXBrowserPlugin.getDesktopPane());
/** Now call the JMXObjectViewer's initialisation routine **/
viewerPanel.initialise(result);
new ObjectViewerDialog( (Frame)this.getParent(), viewerPanel, result );
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(this, "Failed to create object viewer to display exception information", "Object Viewer Error", JOptionPane.ERROR_MESSAGE);
ex.printStackTrace();
}
}
else
{
JOptionPane.showMessageDialog(this, "No viewer registered for the return type: "+result+" ("+result.getClass().getName()+")", "Warning", JOptionPane.WARNING_MESSAGE);
}
}
else
{
JOptionPane.showMessageDialog(this, "The method returned: null");
}
}
catch (javax.management.RuntimeMBeanException e)
{
/** Try to show exception information in object viewer dialog **/
String objectViewerClassname = JMXBrowserPlugin.getObjectViewer("java.lang.Exception");
if ( objectViewerClassname != null )
{
try
{
JMXObjectViewer viewerPanel = (JMXObjectViewer)Thread.currentThread().getContextClassLoader().loadClass( objectViewerClassname ).newInstance();
/** Call framework level initialisation routine **/
viewerPanel.initialiseViewer(JMXBrowserPlugin.getDesktopPane());
/** Now call the JMXObjectViewer's initialisation routine **/
viewerPanel.initialise(e.getTargetException());
new ObjectViewerDialog( (Frame)this.getParent(), viewerPanel, e.getTargetException() );
}
catch (Exception ex)
{