2 Replies Latest reply on Apr 12, 2013 9:31 AM by ivandasilva

    BeanManger is null

    rahul22

      hi,

       

      i have a .launch file type "org.eclipse.jdt.launching.localJavaApplication"

       

      when i run my launch file it calls a java file.

       

      in my java file I'm using BeanManagerto get the class object .

       

      but

      (BeanManager) jndiCtx.lookup("java:comp/BeanManager")  ===  null

       

      Tried

      ((ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext())

                                 .getAttribute("javax.enterprise.inject.spi.BeanManager") ========================  null .

       

      Any Explaination for this bahaviour will be appreciated.

      or how i can achieve this .

       

      Normally when i run my project in that case I'm able to get BeanManager Object.

       

      Thanks