-
1. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 21, 2007 8:35 AM (in response to genman)"genman" wrote:
Basically what I want to do is intercept the various start/stop MBean operation calls and have these translate into calls to the Microcontainer service controller.
Intercept in what way?
This is already handled by the 'legacy' ServiceControllerContext."genman" wrote:
I think it would be useful to have a similar class available (perhaps as an standardized example) for those moving into the Microcontainer world. But I want to ask, is there something like this out there or in the works? If not, could somebody hash out how this might be written?
I don't understand your need for such class.
It's all POJO, don't limit yourself. -
2. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 21, 2007 11:00 AM (in response to genman)
Basically, I want to have the JMX "stop" and "start" operations to stop the Bean and its dependencies. Perhaps it doesn't require writing such a base class because you use AOP. Is this the case? -
3. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 21, 2007 11:33 AM (in response to genman)"genman" wrote:
Basically, I want to have the JMX "stop" and "start" operations to stop the Bean and its dependencies.
That is there by default.
Have a look at LifecycleMetaData."genman" wrote:
Perhaps it doesn't require writing such a base class because you use AOP. Is this the case?
Yes, you don't need it. Ok, maybe for your internal 'type safe' lifecycle. But we certenly don't want to impose such interface on pojos.
AOP is not the reason. ;-) -
4. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 21, 2007 5:54 PM (in response to genman)
How do I deploy my Bean to the MBeanServer in MC 1.0? Is this a 2.0 feature? I don't see any examples or docs for this ...
I'm taking a look at 2.0, which has no distribution, but I'm not sure how to build the package as a distribution. It creates stuff under output/build but does not include the various JBoss dependencies. -
5. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 21, 2007 6:11 PM (in response to genman)"genman" wrote:
How do I deploy my Bean to the MBeanServer in MC 1.0? Is this a 2.0 feature?
See previous posts."genman" wrote:
I don't see any examples or docs for this ...
There are none yet. We are working on it.
But there are plenty of TestCases in the project."genman" wrote:
I'm taking a look at 2.0, which has no distribution, but I'm not sure how to build the package as a distribution. It creates stuff under output/build but does not include the various JBoss dependencies.
Which dependencies?
If you are able to build, then you get those dependant libs in thirdparty directory. -
6. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 21, 2007 7:50 PM (in response to genman)alesj -
Thanks for answering my asinine questions.
I'll fish out some examples, but it'd be nice (especially within my team) if I had some official documentation to work from.
I can build 2.0, which builds the jars in but I don't have a distribution to copy and share with my team. I can certainly copy stuff out of thirdparty that is runtime required, but there's stuff like Junit that I don't need. -
7. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 22, 2007 3:09 AM (in response to genman)Docs are on their way.
They will be there for 2.0.0.GA. -
8. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 22, 2007 6:51 PM (in response to genman)Having referred to the examples, there doesn't seem to be a very straightforward way to install MBeans, ala Spring's framework, which isn't very easy to read.
<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss:bean-deployer:2.0"> <bean name="MBeanServer" class="java.lang.Object"> <constructor factoryClass="javax.management.MBeanServerFactory" factoryMethod="createMBeanServer"/> </bean> <bean name="Repository" class="org.jboss.metadata.plugins.repository.basic.BasicMetaDataRepository"/> <bean name="AspectManager" class="org.jboss.aop.AspectManager"> <constructor factoryClass="org.jboss.aop.AspectManager" factoryMethod="instance"/> </bean> <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0" name="DependencyAdvice" class="org.jboss.aop.microcontainer.aspects.jmx.JMXLifecycleCallback" classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"> <property name="mbeanServer"><inject bean="MBeanServer"/></property> </aop:lifecycle-configure> <bean name="Bean" class="org.jboss.test.microcontainer.support.SimpleBeanImpl"> <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="", exposedInterface=org.jboss.test.microcontainer.support.SimpleBean.class)</annotation> </bean> </deployment>
The problem with this XML is it has quite a lot of low-level "commands" which are somewhat a separate concern from the bean deployment.
I want to make my deployment file easier to edit and read, perhaps more modular ... Is there a notion of<import>
in the bean deployer?
I have SVN access, would you support this sort of feature? -
9. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 23, 2007 4:19 AM (in response to genman)No need for this.
Just have a separate -beans.xml with your 'low-level "commands"'.
But be sure to include proper dependencies. -
10. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 23, 2007 11:56 AM (in response to genman)One more question, regarding the new on demand feature ..
Does a call to ControllerContext.getTarget() demand-load the bean? -
11. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 23, 2007 12:30 PM (in response to genman)"genman" wrote:
Does a call to ControllerContext.getTarget() demand-load the bean?
No.
OnDemand has other usage. -
12. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 23, 2007 4:16 PM (in response to genman)How do you demand a service load then? I checked out the tests and it wasn't immediately clear.
-
13. Re: ServiceMBeanSupport in the Microcontainer world
alesj Mar 23, 2007 8:20 PM (in response to genman)Service load?
-
14. Re: ServiceMBeanSupport in the Microcontainer world
genman Mar 27, 2007 12:37 AM (in response to genman)I mean service start ...