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

    BeanManger is null

    Rahul Razdan Newbie



      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 .



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



      ((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.