-
1. Re: <mbean> optionally <depends> on another <mbean>
alesj Feb 14, 2012 7:57 PM (in response to jaabax)This looks like you don't need that depends at all then. :-)
You just need to make sure MyBootstrap has proper logic.
As this one is hard to impl; e.g. what if OPTBean is actually present, but just happens to be deployed after MyB.
Is this still OK? Or how can I tell OPTBean is actually gonna be deployed? etc ...
-
2. Re: <mbean> optionally <depends> on another <mbean>
jaabax Feb 14, 2012 8:06 PM (in response to alesj)you're right ales
actually, I need that if
MyBootstrap
is present, it runs first thanOPTIONALMBean
I have the following scenarios:
MyBootstrap
can be present WITHOUT OPTIONALMBeanOPTIONALMBean can be present WITHOUT
MyBootstrap
OPTIONALMBean can be present WITH MyBootstrap, BUT, in this case, OPTIONALMBean NEEDs to run first
thanks
-
3. Re: <mbean> optionally <depends> on another <mbean>
alesj Feb 14, 2012 8:07 PM (in response to jaabax)I can only see a solution with diff descriptors for diff configs.
e.g. the last one having proper <depends>, where other have none
-
4. Re: <mbean> optionally <depends> on another <mbean>
jaabax Feb 14, 2012 8:10 PM (in response to alesj)I thinks this should be optional
I can implement this and try a commit, what do you think?.. something like
<depends optional="true">service.server.monitor:service=OPTIONALMBean</depends>
-
5. Re: <mbean> optionally <depends> on another <mbean>
alesj Feb 14, 2012 8:10 PM (in response to alesj)You could probably add custom Deployers / DUPs,
which would register all beans in 1st phase -- collect the names,
where it would then add proper deps in 2nd phase, only if the deployment fits your scenario.
If the mbeans come from 2 diff deployments (sars), then this gets even harder, if not impossible.
-
6. Re: <mbean> optionally <depends> on another <mbean>
alesj Feb 14, 2012 8:12 PM (in response to jaabax)<depends optional="true">service.server.monitor:service=OPTIONALMBean</depends>
This depends on the (random) order of your dep check == making it useless.
-
7. Re: <mbean> optionally <depends> on another <mbean>
jaabax Feb 14, 2012 8:33 PM (in response to alesj)I didn't got it 100% but i understand a little
i'm using the <depends> just to be sure that OPTIONALMBean runs first when it is on the class path
i dont know implementation details of how jboss do this mbean dependency management.. but, looking to the big picture, it looks possible
changing the question so
how can I set the order of the mbeans? just the order : OPTIONALMBean and MyBootstrap afterwards?
-
8. Re: <mbean> optionally <depends> on another <mbean>
jaabax Feb 14, 2012 9:36 PM (in response to jaabax)according to jboss-app_5_0.dtd on https://community.jboss.org/wiki/JBossDTDs
"The value of the module-order could be implicit or strict
<module-order>strict</module-order>
or
<module-order>implicit</module-order>
The strict value indicates that the deployments of the modules will
be done in the order that would be specified in the application.xml
and jboss-app.xml file .
The implicit value indicates the deployment would follow the order
which would be specified in the DeploymentSorter.
The default order will be implicit to support backward compatibility"
so, a jboss-app with:
<jboss-app>
<module-order>strict</module-order>
<module>
<service>OPTIONALMBean.sar</service>
</module>
<module>
<service>MyBootstrap.sar</service>
</module>
</jboss-app>
guarantees the deploy order of my sars
but this is not happening.. sometimes MyBootstrap is still deployed first than OPTIONALMBean
-
9. Re: <mbean> optionally <depends> on another <mbean>
jaikiran Feb 14, 2012 10:18 PM (in response to jaabax)That jboss-app DTD does not apply to AS7. The module ordering elements are ignored in AS7. The jboss-app_7_0.xsd for AS7 will soon be available in JBOSS_HOME/docs/schema folder (it's already in the nightly builds if you are using it).