[jboss-user] [Management, JMX/JBoss] - Re: How to access MBean from SessionBean
drwschneider
do-not-reply at jboss.com
Mon Jun 23 10:52:24 EDT 2008
You can annotate your MBean implementation class with something like that:
@Service(objectName = "my.domain:service=MyService")
| @Local(MyServiceLocal.class)
| @LocalBinding(jndiBinding="/my/domain/MyService")
| @Management(MyServiceManagement.class)
|
where you have to implement the local and management interfaces. Then let the container inject the reference to the MBean simply by using an EJB annotation:
@EJB MyServiceLocal myService; in your session bean.
Another approach would be to use the @Depends annotation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159967#4159967
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159967
More information about the jboss-user
mailing list