This content has been marked as final.
Show 3 replies
-
1. Re: how to make MBean dependent from EAR application?
louis_ja Jun 29, 2004 10:32 AM (in response to cigno5e5)Hello,
I'm not sure this is the 'correct' way of doing it, neither do I know if it works for an EAR, however, it worked to make MBeans dependant from an EJB:
If you look into the jmx-console, your ear should appear somwhere like that, under "jboss.management.local":J2EEServer=Local,j2eeType=J2EEApplication,name=myapp.ear
You then use in your MBean declaration a depends like the following:<depends>jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=myapp.ear</depends>
And it 'should' work.
Otherwise, I guess I just showed my ignorance :-)
Louis -
2. Re: how to make MBean dependent from EAR application?
cigno5e5 Jun 29, 2004 11:31 AM (in response to cigno5e5)sigh sigh...
"louis_ja" wrote:
Hello,
I'm not sure this is the 'correct' way of doing it, neither do I know if it works for an EAR, however, it worked to make MBeans dependant from an EJB:
(...)
Otherwise, I guess I just showed my ignorance :-)
my ignorance is greater than yours!!!! And any suggestions are welcome!!!
:-) :-)
If you look into the jmx-console, your ear should appear somwhere like that, under "jboss.management.local":J2EEServer=Local,j2eeType=J2EEApplication,name=myapp.ear
You then use in your MBean declaration a depends like the following:<depends>jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=myapp.ear</depends>
And it 'should' work.
Ok, your suggestion is right but...
I've specified the dependency and it seem works fine...but at end of startup process jboss tells me:17:16:38,514 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: <none> Incompletely deployed packages: <none> MBeans waiting for classes: <none> MBeans waiting for other MBeans: [ObjectName: it.cigno5e5.myapp.tools.jboss:service=EMailPoller state: CONFIGURED I Depend On: jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=myapp.ear Depends On Me: ]
in fact, my MBean was deployed but methods "createService()" and "startService()" was not invoked. I tried to invoke them from jmx console and does it works!! ...but i can't ask to user to start the service from jmx console!!!! ;-) :-)
had you the same problem? Now I would try to make my mbean dependant from my ejb application (contained into my ear application)
anyway...thank you thank you thank you a lot!!
Luca -
3. Re: how to make MBean dependent from EAR application?
cigno5e5 Jun 30, 2004 6:10 AM (in response to cigno5e5)thank you, louis, i'v found the final solutions.
Browsing the web i learnt that only some of deployers has relations on ServiceController service.
I first tried what's you suggested me, after, browsing the jmx console, i've finally found the correct service to link over.
at least, my dependencies declaration is:<?xml version="1.0" encoding="UTF-8"?> <server> <classpath codebase="lib" archives="*"/> <mbean code="it.cigno5e5.myapp.tools.jboss.emailpoller.EMailPollerService" name="DefaultDomain:service=EMailPoller"> <attribute name="Pop3Server">myserver.cigno5e5.net</attribute> <attribute name="Pop3AccountUserName">pop3user</attribute> <attribute name="Pop3AccountPassword">pop3password</attribute> <attribute name="CheckInterval">60000</attribute> <depends>jboss.j2ee:module=myapp-ejb-jar.jar,service=EjbModule</depends> </mbean> </server>
does it works fine!
thanks for your support!
Luca