-
1. Re: how to get mbean to deploy after ejb is bound
mazz May 1, 2007 8:23 AM (in response to lost_traveller)I've had to do this very thing in my app. The easist thing to do is:
1) In your MBean, do not do anything that requires the EJBs in your start() method (that is, do not expect the EJBs to be deployed when your MBean is deployed).
2) Create a "reallyStartNow" method in your MBean - this is when it can perform its startup routines that require the EJBs to be deployed
3) if you don't already have a war in your ear, create one
4) create a StartupServlet and make sure it is loaded at startup (defined in web.xml appropriately)
5) in your StartupServlet's init() method, use JMX to find your MBean and invoke the "reallyStartNow" method.
MBeans are deployed first, then EJBs within your EAR, then Webapps within your EAR are started last. So, your init() method is called at a point in time when you know everything else is ready.
This works perfectly for me. -
2. Re: how to get mbean to deploy after ejb is bound
dimitris May 1, 2007 12:25 PM (in response to lost_traveller)I suppose there are simpler ways:
http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanAnMBeanDependOnASessionBean