Hi 

I looked at an example of MBean, which deploys an EJB and the main () function from 
the MBean class registers the MBean. Ofcourse hence u first need to run that program 
from command prompt. Then the MBean is available. 

Taking inspiration from the example, I copied the code to register the MBean inside my 
InitServlet (the servlet which loads on start-up) 
Its a test MBean, only one getter in it. 

  | public int getNumber () {
  | return 100;
  | }
  | 
  |   | 
  |   | This is the code written in initServlet. 
  |   | 
  |   |   | MBeanServer server = MBeanServerFactory.createMBeanServer();
  |   |   | ObjectName on = new ObjectName ("NovaDomain", "Name", 
"TerminalChangeMgrMBean");
  |   |   | TerminalChangeManager mgr = new TerminalChangeManager ();
  |   |   | server.registerMBean(mgr, on);
  |   |   | 
  |   | 
  |   | The code runs without exception but I still do not see this MBean listed on 
jmx-console. I am trying it for the first time, so may be that is not what shud be 
expected. 
  |   | 
  |   | Anything I am missing?
  |   | Thanx in advance for the answer. 
  |   | --- Pooja. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837745#3837745

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837745


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to