-
1. Re: Accessing MBeans via JSP
dimitris Jan 26, 2005 11:36 AM (in response to osterday)It should be the same code, as long the Web container and JBoss are colocated (same JVM).
see http://www.jboss.org/wiki/Wiki.jsp?page=HowCanAnEJBCallAnMBean -
2. Re: Accessing MBeans via JSP
osterday Jan 26, 2005 11:53 AM (in response to osterday)Thanks for the quick response!
Yeah, that's what I thought, but couldn't get anything to work. I started to implement it in a JSP using the EJB code example, but on my import statements, I get a strange error: cannot access javax.management.MBeanServer: bad class file: C:\Program Files\Java\jdk1.5.0\jre\lib\rt.jar (javax/management/MBeanServer.class) I'm not sure what I'm doing wrong. Could it be one of the libs that MyExclipse is including?
-Pat -
3. Re: Accessing MBeans via JSP
dimitris Jan 26, 2005 1:40 PM (in response to osterday)This is because jdk5 has it's own JMX implementation classes.
Either use jdk4, or try to setup this JVM property:
javax.management.builder.initial
to
org.jboss.mx.server.MBeanServerBuilderImpl -
4. Re: Accessing MBeans via JSP
osterday Jan 26, 2005 2:58 PM (in response to osterday)Thanks Dimitris!
In MyEclipse I changed the webapp to use JDK 1.4 and that did the trick! My JSP is working fine now.