2 Replies Latest reply on Oct 29, 2006 12:23 AM by bsheward

    Injection not happening?


      I have a POJO JavaBean and JSF page which sets a property in that POJO. I have Log4J output which shows the property of the POJO being set to reasonable values.

      I have a SessionBean which contains a method which should act upon that POJO. I can see the method being executed, but the @In'd property is always null.

      public class FileCabinetSession implements FileCabinetSessionLocal, FileCabinetSessionRemote {
       private FileCabinetEntry fileCabinetEntry;
       public void importFile() throws Exception {
       if ( fileCabinetEntry == null ) {
       System.out.println( "FCE IS NULL" );
       } else {
       System.out.println( "FCE IS: " + fileCabinetEntry.toString() );
       fileCabinetService.importFile( fileCabinetEntry );

      The JSF file is:

       <h:form enctype="multipart/form-data">
       <t:inputFileUpload value="#{fileCabinetEntry.file}"/>
       <h:commandButton type="submit" value="Import New"
       action="#{fileCabinetSession.importFile}" />
       <h:messages />

      I can see in the debug.seam page that both fileCabinetEntry and fileCabinetSession objects exist in the application context.

      Can anyone tell me why the fileCabinetEntry isn't being injected?


        • 1. Re: Injection not happening?


          Can anyone tell me why the fileCabinetEntry isn't being injected?

          Have your declared the interceptor?



          • 2. Re: Injection not happening?


            That was exactly the problem! Thanks for your help.

            We had tried to break our application into multiple JAR files within an EAR, and of course, every JAR file needs its own ejb-jar.xml with the interceptor declaration!!