3 Replies Latest reply on Nov 14, 2006 11:26 AM by ci

    Seam components in different jars

    breako

      Is it ok to have seam components in different jars?
      I presume to do this all Ineed to do is ensure that each jar has a seam.properties file, this would mean my application would have more than one seam.properties file overall is this ok?

        • 1. Re: Seam components in different jars
          gregory.pierce

          I have a similar situation, but for some reason my application isn't working and I'm chatting with Gavin about it.

          I can tell you this much though, if you don't have multiple seam.properties it definitely WILL NOT work :)

          • 2. Re: Seam components in different jars

            I have a similar problem, a component is in the second jar.

            Seam from cvs, JBoss 4.0.5.GA.

            Component

            @Scope(ScopeType.STATELESS)
            @Name("localeStuff")
            @Intercept(InterceptionType.NEVER)
            public class LocaleStuff {
             public void select(ValueChangeEvent event) {...}
            }

            lives in add.jar. It is set up similar to jboss-seam.jar in application.xml:
            ...
             <module>
             <java>jboss-seam.jar</java>
             </module>
            
             <module>
             <java>add.jar</java>
             </module>
            ...

            The add.jar is put into ear file as jboss-seam.jar is.

            The component is used in xhtml file:
            ...
             <h:selectOneMenu valueChangeListener="#{localeStuff.select}"
             onchange="submit();" styleClass="smallselect">
             <f:selectItems value="#{localeSelector.supportedLocales}"/>
             </h:selectOneMenu>
            ...


            But when I access a page, I had:
            /abc.xhtml @40,72 valueChangeListener="#{localeStuff.select}": Target Unreachable, identifier 'localeStuff' resolved to null


            Can components be put into different jars and how to do it correctly?

            • 3. Re: Seam components in different jars

              A-ha, I put an empty seam.properties file into the add.jar and it works now. Good, but very weird... Should be placed in FAQ?