1 2 Previous Next 16 Replies Latest reply on Jan 7, 2010 8:45 AM by nickarls

    Clarification on what can be injected and where it can be?

    hirowla.ian.rowlands.three.com.au

      Hi, I'm just after some clarification on things I can inject and where I can inject them.


      I'm trying to inject a Logger object like the example in the document (except I'm injecting a log4j one). I know this works at least in part, because I can inject this object into a JSF Named bean. However I can't inject this into two other objects:



      • A class that implements a ServletContextListener. The member variable is null when I go into it.

      • An object class that I'm using as an EJB interceptor (as an exception fault barrier). Same thing, the member variable is null.



      I'm also having trouble injecting a POJO into my ServletContextListener. This is a basic class, just one method and no explicit constructors.


      Am I barking up the wrong tree in terms of what I am trying to do, or am I doing something wrong? I can give more info, but I'm not sure what would be useful.


      Thanks,


      Ian


        1 2 Previous Next