I'm trying to manage an ejb by ModelMBean.
But in HTMLAdapterView of the ModelMBean,
where should shown the manageable attribute ("number") of the ejb is always the exception:
javax.management.MBeanException wraps [javax.management.ReflectionException: The method null.getNumber could not be found]
Maybe something is wrong by setting the ejbHandle:
Here is my source code
InitialContext jndiContext = new InitialContext();
Object ref = jndiContext.lookup("demo/Demo");
DemoHome home = (DemoHome)
Demo demo = home.create();
javax.ejb.Handle handle = demo.getHandle();
RequiredModelMBean model = new RequiredModelMBean();
Any help is welcome! Thank you very much...
Thanks for your reply!
Yes, I forgot to tell, that I'm using the jmxri.jar (SUN RI), which includes the class RequiredModelMBean.
I read, that it is possible to manage EJBs or other applications with the requiredModelMBean.
But I didnt found a way how to set ManagedResource.
I looked in the source code of the methode "setManagedResource" from RequiredModelMBean (JMX RI 1.0), but there is only the type "objectReference" allowed .
Is it now really possible to manage an ejb or application with modelmbeans? Or would it be a feature for the future?
Thanks in advance