2 Replies Latest reply on Aug 21, 2007 9:19 PM by Ferry Tanu

    Using EJB injection in JMX / MBean

    Ferry Tanu Newbie

      Hi,
      Is it possible to use @EJB in JMX / MBean service?

      public class HelloService implements HelloServiceMBean{

      @EJB
      private static Hello hello;

      public void start() {
      hello.sayHello()
      }
      }
      I have check in JNDI view, and HelloBean is already registered.
      And I have set the dependency of the HelloService to HelloBean in jboss-service.xml.
      somehow, the injection is not working. hello is always return null
      Does anyone know the cause, I try to search in this forum regarding the issue, and found nothing.
      Thanks
      Regards,
      Ferry