2 Replies Latest reply on Feb 9, 2016 1:17 AM by Marco Strauch

    Lookup for BeanManager fails within Wildfly 10 CR03

    Marco Strauch Newbie

      Hi,

       

      when I try to lookup for the BeanManager within an own created thread this fails with the Exception: javax.naming.NameNotFoundException: java:comp/BeanManager.


      I used follow Code for lookup:


      BeanManager bm;

      try{

      bm = InitialContext.doLookup("java:comp/BeanManager");

      } catch (NamingException e) {

      logger.fatal("Couldn't get BeanManager through JNDI Lookup", e);

       

      }

       

      When I do the lookup in the context of a managed bean it worked. So isn't it allowed to lookup for the bean manager within an own thread?

       

      Kind regards,

       

      Marco