Hi All,

I was just learning 'bt Mbeans. To begin with, I was learning to use and
test the Mbeans that are already existing in tomcat so I get to know how
Mbeans work.  I have written my own Agent called UserManager to call the
Mbeans to list users (Tomcat Admin functionality : based on classes
ApplicationServlet, UserUtils and ListUserServlet of tomcat source). I'm
just not able to get a handle to the correct Mbean server. Can I get a
handle to tomcat mbean server at all if I have to use it else where?? I'm
getting the below exception. Kindly let me know how do I get a handle to the
Mbean server from outside the Admin Application. I've used the same
parameters as used by the Admin application classes.  I'm using tomcat
5.0.25. Please tell me how to get a reference / handle to the Mbean server. 

 Application DUMP is okey  [EMAIL PROTECTED]
log4j:WARN No appenders could be found for logger
(org.apache.commons.modeler.Re
gistry).
log4j:WARN Please initialize the log4j system properly.
listUsers :  UserUtil.getUsersForm(mserver,databaseName);
listUsers has Server ===> [EMAIL PROTECTED]
listUsers has databaseName ===>
Users:type=UserDatabase,database=UserDatabase
In MBeanServer mserver = [EMAIL PROTECTED]
   The obj is Users:type=UserDatabase,database=UserDatabase


javax.management.InstanceNotFoundException: MBeanServer cannot find MBean
with O
bjectName Users:type=UserDatabase,database=UserDatabase
        at
mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:52
8)
        at
mx4j.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:1235)
        at
org.apache.webapp.admin.users.UserUtil.getUsersForm(UserUtil.java:106
)
        at
org.apache.webapp.admin.users.UserManager.listUsers(UserManager.java:
198)
        at org.apache.webapp.admin.users.Jyo.main(Jyo.java:26)
List is Null
Press any key to continue . . .

Thanks,

Jyothi


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of 
Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or 
its affiliates (which may be known outside the United States as Merck Frosst, Merck 
Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary 
copyrighted and/or legally privileged. It is intended solely for the use of the 
individual or entity named on this message.  If you are not the intended recipient, 
and have received this message in error, please notify us immediately by reply e-mail 
and then delete it from your system.
------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to