4 Replies Latest reply on May 6, 2008 12:16 PM by Shane Bryzak

    how to define scope for a component in components.xml

    Jaime Martin Apprentice

      hi,
      I´m using Seam 2.0.1.GA and JBoss 4.2.2.
      In my components.xml I´ve defined several entity-query components. They have the default conversation scope. For instance:


          <framework:entity-query name="reportOutputView"
                                  ejbql="select rstReportOutput from RstReportOutput rstReportOutput">
              <framework:restrictions>
                  <value>rstReportOutput.id.reportCode = #{RstReportOutputPathComp.reportCode}</value>
                  <value>rstReportOutput.id.roType = #{RstReportOutputPathComp.roType}</value>
              </framework:restrictions>                                    
          </framework:entity-query>                  
      



      In order to achieve some performance issues, I want some of the components defined there to have a session scope.
      Have I defined them in a java class, I would have done this without any problem. For instance:


      @Name("reportOutputView")
      @Scope (org.jboss.seam.ScopeType.SESSION)
      public class ReportOutputViewextends EntityQuery {
      ...}
      



      is there a way to define the scope for a component in the components.xml file?
      thanks in advance!