-
1. Re: Using an MBean with jBoss 7
mjdinsmore Oct 20, 2011 1:40 PM (in response to mylos78)Not sure if this helps, but I converted all my MBeans into singletons. I wasn't utilizing the extra facilities the MBean gave me too often, so it was an easy change. For all my MBeans, I bascially made a few changes --
- Got rid of any extends ServiceMBeanSupport
- Added @Startup and @Singleton to the class definition:
@Startup @Singleton public class Foobar {
- Added a @PostConstruct on the method I wanted to have called upon deployment and creation of the singleton
@PostConstruct public void start() { ... }
Not exactly porting the MBeans, but a strategy that you can use (if it fits) nonetheless!
-
2. Re: Using an MBean with jBoss 7
rhanus Oct 24, 2011 6:09 AM (in response to mylos78)There is a corresponding issue: https://issues.jboss.org/browse/AS7-887 and a forum thread: http://community.jboss.org/thread/167037.
As Mat Drees suggests you may work around this issue by not implementing ServiceMBean, and directly implementing start() and stop() instead of extending ServiceMBeanSupport.
Unless you closely dependens on ServiceMBeanSupport logic it pretty straightforward to adjust your service mbean code.
It works fine for me.
-
3. Re: Using an MBean with jBoss 7
gajendra083 May 11, 2012 6:32 AM (in response to mjdinsmore)Hi ,
I am migrating my project from Jboss 4 to Jboss 7
One of the class is extending HAServiceMBeanSupport for sending the notification, but now org.jboss.ha.jmx.HAServiceMBeanSupport is not available, how can I solve this ?
-
4. Re: Using an MBean with jBoss 7
marilenc Jul 20, 2012 10:18 AM (in response to mylos78)The simplest solution I could find is to dump the MBean all together and link the events to a servlet listener. Here is an example which does that for Quartz MBean.
-
5. Re: Using an MBean with jBoss 7
xin.zhang.song Aug 14, 2012 4:24 AM (in response to gajendra083)Did you find the way to resolve this problem?
-
6. Re: Using an MBean with jBoss 7
ochaloup Aug 15, 2012 3:41 AM (in response to xin.zhang.song)Maybe this?
-
7. Re: Using an MBean with jBoss 7
xin.zhang.song Aug 20, 2012 11:05 PM (in response to ochaloup)@Chaloupka
I can't open this page. could you give the detail of this page?
-
8. Re: Using an MBean with jBoss 7
mjdinsmore Aug 20, 2012 11:49 PM (in response to xin.zhang.song)Try the link again @Xin Zhang, it opened fine for me.
-
9. Re: Using an MBean with jBoss 7
xin.zhang.song Aug 21, 2012 1:52 AM (in response to mjdinsmore)But I can't, I try open this page all day, it show " Unable to connect to middlewaremagic.com",
I'm not sure if the speed is too slow, or has blocked this site。
Could you send it to my mail? Thanks a lot
-
10. Re: Using an MBean with jBoss 7
f_marchioni Aug 22, 2012 2:23 AM (in response to xin.zhang.song)Basically you can use the MXBean specification and mark your interface as @MXBean.
Have a look also here http://docs.oracle.com/javase/6/docs/api/javax/management/MXBean.html
Regards
Francesco
-
11. Re: Using an MBean with jBoss 7
xin.zhang.song Aug 24, 2012 3:46 AM (in response to f_marchioni)Thanks @Francesco