Hi
The following line in my code just prints a null array.
" Set hostsON = mBeanServer.queryNames(queryHosts, null);"
Is mbeanserver not having anything. am new to this. help me on this
try
{
String msg="\n";
String msg2="null";
int flag=0;
String onStr = "JMImplementation:type=MBeanServerDelegate";
ObjectName objectName = new ObjectName(onStr);
mBeanServer.addNotificationListener(objectName, this, null, null);
//QUERIES THE JSR MANAGED OBJECT FOR RETRIEVING THE LIST OF WEB APPLICATIONS
LAUNCHED ON TOMACT SERVER
ObjectName queryHosts = new ObjectName("*:j2eeType=WebModule,*");
Set hostsON = mBeanServer.queryNames(queryHosts, null);
int count = 1;
Iterator iterator = hostsON.iterator();
while (iterator.hasNext())
{
ObjectName contextON = (ObjectName) iterator.next();
String webModuleName = contextON.getKeyProperty("name");
if (webModuleName.startsWith("//"))
{
webModuleName = webModuleName.substring(2);
}
int slash = webModuleName.indexOf("/");
if (slash == -1)
{
count++;
continue;
}
calc(contextON,mBeanServer,webModuleName);
}
msg=msg+get();
op.writeUTF(msg);
String status=checkStatus();
op.writeUTF(status);
}
catch (Exception e)
{
Object o=e.toString();
try
{
JOptionPane.showMessageDialog(null,e,"SessionBean Error!",1);
op.writeUTF(o.toString());
}
catch(Exception e1)
{
;
}
}
--
View this message in context:
http://www.nabble.com/MbeanServer-Problem-tp15852122p15852122.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]