3 Replies Latest reply on May 10, 2006 11:28 AM by scottdawson

    Seam messages example

    scottdawson

      I'm trying to run the Seam messages example app and so far I'm not able to get it to work. The registration example runs correctly so my environment seems to be more-or-less correct. I'm running Seam 1.0.0.CR2 on app server 4.0.4.CR2 installed with the EJB3 profile. I'm using the default Hypersonic datasource.

      What I see is that the MessageManagerBean.findMessages method, which is annotated with @Factory("messageList"), works correctly, in other words, it pulls two rows from the database. But the messageList variable in the JSP is never initialized. In fact, for every occurrence of messageList in the JSP, the @Factory method is called. So, the connection between the data in the MessageManagerBean and the JSP is not happening.

      Does anyone know what the problem might be? If I figure it out, I'll post back the solution.

      Thanks,
      Scott

        • 1. Re: Seam messages example

          I had the same problem.

          It seems that this example is broken in Seam 1.0.0.CR2.

          Try it with the Seam 1.0beta2 version. The mentioned example works on this older version.

          • 2. Re: Seam messages example
            gavin.king

            Oops, there was a bug in the build script. ejb-jar.xml was not getting included in the EJB jar.

            • 3. Re: Seam messages example
              scottdawson

              So the fix is easy. Edit the build.xml in examples/messages, adding the ejb-jar.xml to the EJB fileset:

               <!-- EJB3 -->
               <fileset id="example.ejb3.root"
               dir="resources">
               <include name="import.sql"/>
               <include name="seam.properties"/>
               <include name="META-INF/persistence.xml"/>
               <include name="META-INF/ejb-jar.xml"/>
               </fileset>
              

              Then it works correctly. Thanks Gavin and Marcio.

              Regards,
              Scott