1 Reply Latest reply on Aug 3, 2011 1:13 AM by jaikiran pai

    Injecting resources

    Rich Midwinter Newbie

      I'm trying to inject a resource, which as I understand it should work, even outside of an EJB. As a manual JNDI lookup via an InitialContext everything works. Doing the same via a mappedName leaves my injected resource as null, with no indication in the server log as to why... any ideas would be appreciated. Thanks in advance.




                AssessmentFieldManager<AssessmentField> assessmentFieldManager;


        @SuppressWarnings({ "unchecked", "rawtypes" })


                public Object getAsObject(FacesContext ctx, UIComponent component, String value) {

      //          assessmentFieldManager = (AssessmentFieldManager) JNDI.lookup("java:app/ejb-jar/AssessmentmentFieldManagerImpl");


                          return assessmentFieldManager.find(Long.valueOf(value));