1 Reply Latest reply on Apr 27, 2007 5:07 AM by jaikiran pai

    MBean startService & EJB binding

    Erwan Baynaud Newbie


      I try to call a local EJB from the startService method of my MBean :

      home = (InitBeansBeanLocalHome) ctx.lookup(InitBeansBeanLocalHome.JNDI_NAME);

      Unfortunately, startService method is called before the EJB is bound. In the log this line is after the error :

      2007-04-26 11:12:01,381 INFO [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] Bound EJB LocalHome 'InitBeansBean' to jndi 'ejb/InitBeansBean'

      How can I bound the EJB before to call it in the startService method ? If it is not possible to change the sequence, how can I call an EJB at jboss startup ?